Typedefs and Utility Structures
3DLDF defines a number of data types for various reasons, e.g., for the
sake of convenience, for use in conditional compilation, or as return
values of functions. Some of these data types can be defined using
typedef
, while others are defined as structs
.
The typedefs and utility structures described in this chapter are
found in pspglb.web
. Others, that contain objects of types
defined in 3DLDF, are described in subsequent chapters.
Synonymous either with float or double , depending on the
values of the preprocessor variables LDF_REAL_FLOAT and
LDF_REAL_DOUBLE . The meaning of real is determined by
means of conditional compilation. If real is float , 3DLDF
will require less memory than if real is double , but its
calculations will be less precise. real is "typedeffed" to
float by default.
|
real_pair first second
|
typedef |
Synonymous with pair<real, real> .
|
real_triple first second third
|
struct |
All three data elements of real_triple are reals .
It also has two constructors, described below. There are no other
member functions.
|
void real_triple (void)
|
Constructor |
void real_triple (real a, real b, real c)
|
Constructor |
The constructor taking no arguments sets first , second ,
and third to 0. The constructor taking three real
arguments sets first to a, second to b, and
third to c.
|
A Matrix is a 4 X 4
array of real , e.g.,
Matrix M; == real M[4][4] .
It is used in class Transform for storing transformation
matrices. See Transforms, and See Transform Reference, for more
information.
|
real_short first second
|
typedef |
Synonymous with pair<real, signed short> .
It is the return type of Plane::get_distance() .
|
bool_pair first second
|
typedef |
Synonymous with pair<bool, bool> .
|
bool_real first second
|
typedef |
Synonymous with pair<bool, real> .
|