Game Development Reference
In-Depth Information
2.7, to set the transformation needed to go from local space to world
space, we would write:
Device->SetTransform(D3DTS_WORLD, &worldMatrix);
You see more of this method in the subsequent sections, where we
examine each stage.
2.3.1 Local Space
Local space, or modeling space, is the coordinate system in which we
define an object's triangle list. Local space is useful because it simpli-
fies the modeling process. Building a model around its own local
coordinate system is easier than building a model directly into the
world. For instance, local space allows us to construct a model without
regard to its position, size, or orientation in relation to other objects in
the world.
Figure 2.8: A teapot defined around its
own local coordinate system
2.3.2 World Space
Once we have constructed various models, each residing in their own
local coordinate system, we need to bring them together to form the
scene in one global (world) coordinate system. Objects in local space
are transformed to world space through a process called the world
transform , which usually consists of translations, rotations, and scaling
operations that set the position, orientation, and size of the model in
the world. The world transformation sets up all the objects in the world
in relationship to each other in position, size, and orientation.
Search WWH ::




Custom Search