|
 |
> Nicolas Alvarez <nic### [at] gmail is the best com> wrote:
>
>> Also, how would you handle this?
>> sphere {
>> <1,2,3>, 0.5
>> translate <12,35,61>
>> texture { some_complex_texture }
>> translate y*2
>> }
>> The first translate doesn't affect the texture, the second does.
>>
>
> Just like POV does (correct me if I am wrong): when translate is encountered
> it translates the whole object. At the time of first translate, no texture
> is specified yet (=null, I suppose). At the time of the second the sphere's
> 'texture' field is non-null, thus transformed with the object. The final
> state is that de texture has been translated twice.
>
> In new SDL, it would be the same: the translate() method (or whatever it
> will be) of an object (or its derived) will apply on whatever there is
> inside the current object. You could have also written
>
> sphere {
> <1,2,3>, 0.5
> translate <12,35,61>
> texture { some_complex_texture translate 100*x}
> translate y*2
> }
>
> with 3 translations for the texture.
>
> Bruno
>
>
You missed my point (because I didn't make it so clear :P). How would
you handle that *and* allow syntax like this?
sphere.translate[0]="<5,0,0>"
I think it's a bad idea to allow changing individual transformation
statements after the object has been created.
Post a reply to this message
|
 |