Transforming a 3D graphic

Transformation, is the process of altering every point in a graphic to resize (scale), reorient (rotate), or move (translate) the graphic. MGraphic3D has the transformation functions shown in Figure 145. TranslateBy, RotateBy, and ScaleBy let you transform a 3-D graphic without using a matrix. You supply the values, and their default implementations create a temporary matrix and call the TransformBy function, which takes an instance of TGrafMatrix3D as a parameter. It is important to know that transformations change the points of the 3-D graphic directly without copying the original points.

Figure 145 shows the relationships of the MGraphic3D and TGrafMatrix3D classes. TGrafMatrix3D is a 4-by-4 matrix for performing algebraic operations on a set of coordinate points (regular points, rational points, or vectors) that define a 3D graphic. TGrafMatrix3D is described at length in Chapter 12.


The examples for this section use a rounded box sweep. You can find more information on rounded box sweeps and the many other types of sweeps available in Chapter 15.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker