Graphics Reference
In-Depth Information
P '
V u
WC
P '
P '
OC
y
V v
V w
P y
x
M
P o
z
OC to WC
Transformation
P z
Figure 16.17.
Transforming the anchoring positions of an orthonormal basis.
such that
P o
=
P o M
,
P y
=
P y M
,
.
P z
=
P z M
.
Now, we can compute
V y
P y
P o ,
=
V z
P z
P o ,
=
and
V z .
In this way, the resulting orthonormal basis is
V x =
V y ×
V x ,
V w
,
V u ,
V v ,
V w
=
V z ×
V x ,
Orthonormal basis
=
where
V u
=
V z .
=
V v
Notice that we must explicitly normalize the vectors V w , V u ,and V v . List-
ing 16.22 shows the implementation that computes the orthonormal basis of the
Source file.
Model _ Simulation.cpp
file in the Model folder of
the D3D _ SceneGraphIn3D
project.
shusui scene node. At label A, we gain access to the M t and M s transforms. At
label B, the general transformation M is computed by concatenating M t and M s
transforms on the matrix stack. The orthonormal basis anchor positions P o , P y ,
and P z are then transformed. The vectors for the orthonormal basis ( V w , V u ,and
Search WWH ::




Custom Search