A SERVICE OF

logo

82
Chapter 6: Placing Shapes in a Scene
When you reverse the order of the transformations, the end result is different. Since the
center of rotation is the origin, the rotation transformation lifts the object above the X
axis.
Placing Geometries in World Space
Multiple transformation nodes can orient and size all shapes in a scene graph into the
space of the root node. The space of the root node is called world space.
World space is the coordinate system of the root node in which all shapes in a scene graph
can reside. Local space is a coordinate system in a subsection of a scene graph.
Cosmo 3D Matrices
Many geometry variables are dened in local space. To translate those values into the
world space you use a transformation matrix. The transformation matrix is a 4 × 4 matrix
of type csMatrix4f that contains scaling, translation, and rotation information. You can
set the matrix explicitly or, more easily, you can use class methods to generate a
transformation matrix.
Cosmo 3D matrices are column major, which means their members are ordered in the
following way:
0123
4567
8 9 10 11
12 13 14 15
You can set a transform matrix directly, or you can use csContext methods to scale and
orient a shape in world space.