Underlying geometry classes

The 3D computational geometry classes consist of TGPoint3D and TGBox3D. These classes are used for 3D geometric calculations and as basic building blocks for the other geometry classes. The 3D computational geometry classes have no corresponding MGraphic3D derived class and, except for TGBox3D, cannot be passed to a TGrafPort for rendering.

The point array classes consist of TGPointArray3D and TGRPointArray3D. These are low-level classes that do not perform any computation, but store and manipulate linear arrays of 3-D ordered points.

Descriptions of these classes are summarized here for your convenience while reading this manual. Refer to the online Class and Member Function descriptions for detailed information on these classes and their functions.

Points

The TGPoint3D class defines (x, y, z) coordinates that represent a point or vector on the 3D coordinate plane. The TGRPoint3D class defines a set of (x, y, z, w) coordinate values that represent a homogeneous (rational) point or vector on the 3D coordinate plane. The TGPoint and TGRPoint functions are shown
in Table 8.


3D point member functions
TGPoint3D CrossProduct Normalize VectorLength
DotProduct SetVectorLength
TGRPoint3D DivW DropW

Point arrays

TGPointArray3D handles arrays of TGPoint3Ds is the basis for TGPoint3DArray handlesTGPoint3Dnstances and is the basis for TGPolyline3D. TGRPoint3DArray handles arrays of TGRPoint3Ds and is the basis for TGCurve3D. The point array member functions are summarized in Table 9.


3D point array member functions
TGPoint3DArray and GetBounds Resize Swap
TGRPoint3DArray GetNumberofPoints Reverse
GetPoint SetPoint

3-D box

The TGBox3D class defines an axisaligned rectangular wireframe box that is defined by the coordinate points of the topleft corner and the bottomright corner. TGBox3D can be passed to a TGrafPort for rendering. Figure 142 shows a TGBox3D in the 3D coordinate plane.


The TGRect member functions for 3D boxes are summarized in Table 10.


3D boxes member functions
TGBox3D Contains GetSize Pin
EqualSize Inset SetCenter
ExtendTo IntersectWith SetSize
GetCenter IsEmpty SetMinPoint
GetMinPoint Offset SetMaxPoint
GetMaxPoint OrderPoints


[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