#include <box3.h>
Class Description
- See also:
- Class Point3, Class
Matrix3.
- Description:
- This class represents a 3D box volume described by two 3D
corner coordinates. Box3
provides methods that return individual coordinates of the box,
scale and translate it, retrieve its center, modify its size,
expand it to include points or other boxes, and determine if points
are inside the box. All methods are implemented by the system.
- Data Members:
- Point3
pmin,pmax;
The corners of the 3D box.
Constructor & Destructor Documentation
Member Function Documentation
void MakeCube |
( |
const Point3 & |
p, |
|
|
float |
side |
|
) |
|
|
- Parameters:
- const Point3&
p
Specifies the center point of the cube.
float side
Specifies the side length.
Point3 Center |
( |
|
) |
const [inline] |
Point3 Width |
( |
|
) |
const [inline] |
Point3 operator[] |
( |
int |
i |
) |
const |
- Parameters:
- int i
Specifies the corner to retrieve (0 <= i <= 7)
- Returns:
- The 'i-th' corner point as a Point3.
- Parameters:
- const Point3&
p
Specifies the point to expand the box to include.
- Parameters:
- const Box3&
b
Specifies the Box3 to
expand this box to include.
- Parameters:
- float s
Specifies the scale factor for this Box3.
void Translate |
( |
const Point3 & |
p |
) |
|
- Parameters:
- const Point3
&p
Specifies the distance to translate the box.
void EnlargeBy |
( |
float |
s |
) |
|
void IncludePoints |
( |
Point3 * |
pts, |
|
|
int |
numpoints, |
|
|
Matrix3 * |
tm = NULL |
|
) |
|
|
- Parameters:
- const Matrix3& tm
Specifies the matrix to transform the box corners by.
- Returns:
- Nonzero if the box is empty; otherwise 0.
int Contains |
( |
const Point3 & |
p |
) |
const |
- Parameters:
- const Point3&
p
Specifies the point to check.
- Returns:
- Nonzero if the specified point is contained in this box;
otherwise 0.
int Contains |
( |
const Box3 & |
b |
) |
const |
- Parameters:
- const Box3&
b
Specifies the box to check.
- Returns:
- Nonzero if the specified box is entirely contained within this
box; otherwise 0.
- Operators:
int Intersects |
( |
const Box3 & |
b |
) |
const |
Member Data Documentation