Graphics Reference
In-Depth Information
Fig. 2.10 Three common pivot locations used for object-level transformations: object center,
bottom center, and one of the bottom corners
Fig. 2.11 Object based coordinates move with the object and are editable. World-based coordinates
cannot be modifi e d
CG application. The default location is usually the center of the object (Fig. 2.10 ).
However, there are many reasons a user might want to change this, so pivots are
treated as separate components that can be edited by the user.
A transformation matrix wouldn't work without a local axis for your object. A
local axis looks like the group of three axes displayed at the global origin, but it
is located in the middle of your object. Most programs allow you to move and
reorient the local axis, but the important thing is that you have one. For a rotation
animation, the rotation values stored in the transform matrix would be based on
the location of the object's local origin instead of the global origin. This is a good
thing, because otherwise your object might rotate around the wrong pivot point.
Set it to the corner of your triangle, and it will rotate around that corner instead
(Fig. 2.11 ).
To animate an object, a state of the matrix is stored for each frame of anima-
tion, and is used to modify the position, size, and rotation values of the object
over time.
Search WWH ::




Custom Search