User Guide
258 APPENDIX E
equivalent to orthonormal 3x3 matrices and are stored internally as quaternions. This allows them to be smoothly
interpolated or “blended” to give intermediate rotations.)
For objects in the scene, a ‘pivot point’ is assigned at object creation which is used for rotation purposes. This point
is not revealed in the interface currently, and will vary based upon numerous variables such as the use of scale and
translate tools. Therefore, do not rely on the object pivot being in a known location. Instead, use an anchor in world
space to act as the pivot. An example of this approach can be seen in the ‘rotateContinous’ preset script included with
the Atmosphere application.
Lastly, ‘rotation’ measured for objects in an Atmosphere scene are in the units of Radians (where a complete circle =
pi * 2).
Global Methods
Rotation(various...)
Creates a new Rotation(rotational transformation object). The following parameter styles are understood:
• Rotation() - The identity Rotation(no rotation at all)
• Rotation(‘X’, .7) - Rotate by .7 radians around X.
• Rotation(‘Y’, .3) - Rotate by .3 radians around Y.
• Rotation(‘Z’, .9) - Rotate by .9 radians around Z.
• Rotation(‘XZY’, .7, .9, .3) - Rotate around Y by .3, Z by .9, then X by .7
(Rotations are processed from right to left.)
• Rotation(vec, angle) - Rotate around Vector ‘vec’ by ‘angle’ radians.
• Rotation(r1, r2) - Rotate by Rotation r2, then by Rotation r1 (think ‘r1 of r2’)
• Rotation(‘X’, .7, r2) - Rotate by Rotation r2, then around X by .7
• Rotation(r1.toString()) - decoding from an encoded string.
• Rotation(r1, r2.toString(), ‘X’, .7, ...) - Any number of concatenations are allowed.
critter.orientation = Rotation(‘Y’, critter.yRotation);
Properties
inverse
The inverse (opposite) of the rotation.
// Relative rotation from a to b
rel = Rotation(b, a.inverse);
type
Returns the type of object as a string (‘Rotation’).
tempObject = Rotation(‘X’, .7);
chat.print(tempObject.type); //Returns ‘Rotation’










