|
|
[Sorry for the strange title; I couldn't think of anything better.]
Assume that I've traced an object using the trace(...) command, including the
normal found at the object's surface (Norm).
GIVEN:
#declare ROTATION_1 = <50,100,150>; // just a different pre-declared rotation
to be used later
But now, I want to 'combine' the following with that rotation, somehow...
#declare MY_TRANSFORM =
transform{
#if(Norm.z < 0)
rotate 180*y
#else
#end
}
....plus a few other similar Norm-based #if transforms.
I want to end up with...
#declare NEW_ROTATION = <...the new combined stuff...>;
Assume that it has to be done in this order. and that I need the new final
rotation as a single separate entity (for use in a #debug statement, for
example). What would be the easiest magic way (or built-in tool) to combine the
original rotation with the transforms? I'm stumped...except for the brute-force
method of...
#declare NEW_ROTATION =
<50, 100 #if(Norm.z < 0) + 180 #else #end, 150>;
.... which could get really cumbersome.
Post a reply to this message
|
|