|
A complete set of math classes (including the
SPAposition class described in section
Key Aspects of C++) provides the foundation needed to describe any geometry. This section introduces some of the math foundation classes that have been implemented in
ACIS.
ACIS laws are a tool that uses the math foundation and extends it even further.
|
|
|
Note
|
The math foundation is also implemented in Scheme. The Scheme data types and Scheme extensions related to mathematics can be found in online help.
|
|
|
The following list summarizes the main math foundation classes. These classes are described in detail in reference templates in online help.
|
|
|
SPAposition
|
Stores the
xyz coordinates of a position and provides methods for accessing them. Positions can't be added.
|
|
|
SPAvector
|
Similar to
SPAposition in that it has three coordinate components,
x,
y, and
z. Instances of
SPAvector can be added. It also has a method
len for returning its magnitude.
|
|
|
SPAunit_vector
|
Similar to
SPAvector, but always has a magnitude of 1. Therefore, it has no
len method.
|
|
|
SPAmatrix
|
Represents rotation or reflection of models in 3D. This is always 3 X 3. Therefore, it has a determinant of +1 or -1. (The concept of a matrix not limited to 3 X 3 is available through laws.)
|
|
|
SPAtransf
|
Used for rotation, reflection, and translation of a model in 3D. The
SPAtransf constructor should not be called directly. Instead, the friend functions
rotate_transf,
reflect_transf, and
translate_transf should be used. They can be combined to make composite transforms through the use of overloaded operators.
|
|
|
SPApar_pos
|
Represents a location in the parametric space of the surface. This is sometimes called parameter position (u,v).
|
|
|
SPApar_dir
|
Represents a change in the surface parameter space (du,
dv).
|
|
|
SPAparameter
|
Available for completeness. This is a real number.
|
|
|
SPAinterval
|
Represents a range in
R1. This is made up of two values, the low value and the high value, which are real numbers.
|
|
|
SPAbox
|
Defines a region bounded by three pairs of perpendicular planes aligned in the
x,
y, and
z directions. It is like a geometric expedient in that it is a very nice way of expressing a region of interest independent of the complexity of the geometry within the area. Boxes can be expressed as the two
SPApositions on the diagonal or as three
SPAintervals.
|
|
|
Some other
C++ classes related to mathematics include:
|
|
|
mass_property
|
Defines a class for manipulating mass properties.
|
|
|
moments
|
Manipulates generic mass properties.
|
|
|
SPApar_box
|
Defines a bounding box in parameter space by four values of class
SPAparameter:
low_u,
high_u,
low_v,
high_v.
|
|
|
SPApar_vec
|
Defines a vector (du,
dv) in 2D parameter-space.
|
|
|
param_string
|
References parameters.
|
|
|
position_array
|
Creates dynamic arrays of positions.
|
|
|
pt_derivs
|
A class to contain a point and up to 4 derivatives.
|
|
|
surf_normcone
|
Provides a return value for
normal_cone which returns a cone bounding the surface normal.
|
|
|
surf_princurv
|
Provides the return value for the principle curvature functions, returning two directions and two curvatures for a surface.
|
|
|
symtensor
|
Defines a symmetric 3 X 3 tensor.
|
|
|
tensor
|
Defines a 3 X 3 tensor.
|