|
 |
William Tracy wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Shay wrote:
>> How about:
>>
>> #local MyOb = difference {
>> sphere { 0, 1 translate y*2 rotate z*45 translate <2,3,4> }
>> object { Some Other Object }
>> }
>>
>> MyOb.subtrahend.transforms[1].addrotate(<0, 0, 15>);
>> MyOb.subtrahend.transforms[0] *= <1,0,0,0,0,1,0,0,0,0,0,1,0,5,0,1>
>
> Quick question for the group:
>
> Does anyone see any value in being able to use OO syntax to transform an
> object *after* it's declaration, in the general way shown in Shay's
> example? (I would like to hope that we could come up with a cleaner
> syntax than that.)
Yes. I think if you have a complicated scene where the position of
objects is either random or is changing during an animation, it is
better to have all the instantiations of objects in one place and
everything that positions it close together.
For an animation it could even mean that you can 'precompile' all
objects and don't have to reparse everything, but only reposition the
moving parts. But that might require saving an internal state to disk.
>
> In principle, it seems like it could be useful, but I can't actually
> come up with any concrete examples of things that couldn't be
> accomplished in the current SDL.
>
I can't either.
Post a reply to this message
|
 |