Main Page | Class Hierarchy | Class List | Class Members

DVR::Math::AxisAlignedBox Class Reference

List of all members.

Public Member Functions

 AxisAlignedBox (Vector3 min, Vector3 max)
bool IsInside (Vector3 point)
void Transform (Matrix4 matrix)
void SetExtents (Vector3 min, Vector3 max)
void Scale (Vector3 factor)
void Merge (AxisAlignedBox box)
object Clone ()

Properties

Vector3 Center
Vector3 Maximum
Vector3 Minimum
Vector3[] Corners
bool IsNull
AxisAlignedBox Null

Detailed Description

A 3D box aligned with the x/y/z axes. This class represents a simple box which is aligned with the axes. Internally it only stores 2 points as the extremeties of the box, one which is the minima of all 3 axes, and the other which is the maxima of all 3 axes. This class is typically used for an axis-aligned bounding box (AABB) for collision and visibility determination.


Member Function Documentation

bool DVR::Math::AxisAlignedBox::IsInside Vector3  point  )  [inline]
 

Tells if the point is inside the box. The point to test with. True if the point is inside the box, False otherwise.

void DVR::Math::AxisAlignedBox::Merge AxisAlignedBox  box  )  [inline]
 

Allows for merging two boxes together (combining).

void DVR::Math::AxisAlignedBox::Scale Vector3  factor  )  [inline]
 

Scales the size of the box by the supplied factor. Factor of scaling to apply to the box.

void DVR::Math::AxisAlignedBox::SetExtents Vector3  min,
Vector3  max
[inline]
 

Sets both Minimum and Maximum at once, so that UpdateCorners only needs to be called once as well.

void DVR::Math::AxisAlignedBox::Transform Matrix4  matrix  )  [inline]
 


Property Documentation

Vector3 DVR::Math::AxisAlignedBox::Center [get]
 

Gets the center point of this bounding box.

Vector3 [] DVR::Math::AxisAlignedBox::Corners [get]
 

Returns an array of 8 corner points, useful for collision vs. non-aligned objects. If the order of these corners is important, they are as follows: The 4 points of the minimum Z face (note that because we use right-handed coordinates, the minimum Z is at the 'back' of the box) starting with the minimum point of all, then anticlockwise around this face (if you are looking onto the face from outside the box). Then the 4 points of the maximum Z face, starting with maximum point of all, then anticlockwise around this face (looking onto the face from outside the box). Like this:

1-----2 /| /| / | / | 5-----4 | | 0-|--3 | / | / |/ |/ 6-----7

bool DVR::Math::AxisAlignedBox::IsNull [get, set]
 

Gets/Sets the value of whether this box is null (i.e. not dimensions, etc).

Vector3 DVR::Math::AxisAlignedBox::Maximum [get, set]
 

Gets/Sets the maximum corner of the box.

Vector3 DVR::Math::AxisAlignedBox::Minimum [get, set]
 

Gets/Sets the minimum corner of the box.

AxisAlignedBox DVR::Math::AxisAlignedBox::Null [static, get]
 

Returns a null box


The documentation for this class was generated from the following file:
Generated on Tue Nov 30 22:19:44 2004 for DirectVolumeRenderer by doxygen 1.3.6