POV-Ray : Newsgroups : povray.windows : how to group objects together as one object? : Re: how to group objects together as one object? Server Time: 24 Sep 2020 21:06:58 GMT
  Re: how to group objects together as one object?  
From: Alain
Date: 29 Jun 2011 17:28:45
Le 2011/06/29 12:13, Marina a écrit :
> I'm aware of the #declare function but it's not working for me.
> I have a set of mirrors and beams (cylinders) that I need to move as one big
> object so I don't have to deal with the complications of moving every single of
> the 20 pieces by themselves.
>
> How exactly do I do this? I just learned the program a couple of days ago.
> Thanks!
>
>

union{...}

It's base porpose is exactly what you want: Give the possibility to 
manipulate several objects as if they where just one.
Just add "union{" before those 20 objects, then put a "}" after the last 
(you may want to leave 1 or 2 blank lines here).

You can now place some rotate, scale and translate between the last 
object and the "}" and those thansformations will affect all your 
objects as one.

If you add some texture to the union AFTER the last object, it will be 
applyed to any object that don't already have one.
If this texture is applyed before the transforms, the transforms will 
affect it: It will move, rotate and scale with the whole union.



Alain


Post a reply to this message

Copyright 2003-2008 Persistence of Vision Raytracer Pty. Ltd.