Contents Functions Classes Topics User Forum CVS

G3D::AABox Class Reference

#include <AABox.h>

List of all members.

Public Member Functions

 AABox ()
 AABox (const Vector3 &v)
 AABox (const Vector3 &low, const Vector3 &high)
void set (const Vector3 &low, const Vector3 &high)
void serialize (class BinaryOutput &b) const
void deserialize (class BinaryInput &b)
const Vector3low () const
const Vector3high () const
Vector3 center () const
double extent (int a) const
Vector3 extent () const
bool culledBy (const class Plane *plane, int numPlanes, int32 &cullingPlaneIndex, const uint32 testMask, uint32 &childMask) const
bool culledBy (const class Plane *plane, int numPlanes, int32 &cullingPlaneIndex=dummy, const uint32 testMask=0xFFFFFF) const
void split (const Vector3::Axis &axis, float location, AABox &low, AABox &high) const
bool culledBy (const Array< Plane > &plane, int32 &cullingPlaneIndex, const uint32 testMask, uint32 &childMask) const
bool culledBy (const Array< Plane > &plane, int32 &cullingPlaneIndex=dummy, const uint32 testMask=-1) const
bool contains (const Vector3 &point) const
float surfaceArea () const
float area () const
float volume () const
Vector3 randomInteriorPoint () const
Vector3 randomSurfacePoint () const
Box toBox () const
bool intersects (const AABox &other) const
bool intersects (const class Sphere &other) const
AABox intersect (const AABox &other) const
unsigned int hashCode () const
bool operator== (const AABox &b) const
bool operator!= (const AABox &b) const
void getBounds (AABox &out) const

Static Public Member Functions

static const AABoxmaxFinite ()
static const AABoxinf ()
static const AABoxzero ()


Detailed Description

An axis-aligned box.


Constructor & Destructor Documentation

G3D::AABox::AABox  )  [inline]
 

Does not initialize the fields

G3D::AABox::AABox const Vector3 v  )  [inline]
 

Constructs a zero-area AABox at v.

G3D::AABox::AABox const Vector3 low,
const Vector3 high
[inline]
 

Assumes that low is less than or equal to high along each dimension. To have this automatically enforced, use AABox(low.min(high), low.max(high));


Member Function Documentation

float G3D::AABox::area  )  const [inline]
 

Vector3 G3D::AABox::center  )  const [inline]
 

Returns the centroid of the box.

bool G3D::AABox::contains const Vector3 point  )  const [inline]
 

bool G3D::AABox::culledBy const Array< Plane > &  plane,
int32 cullingPlaneIndex = dummy,
const uint32  testMask = -1
const
 

Conservative culling test that does not produce a mask for children.

bool G3D::AABox::culledBy const Array< Plane > &  plane,
int32 cullingPlaneIndex,
const uint32  testMask,
uint32 childMask
const
 

Conservative culling test for up to 32 planes. Returns true if there exists a plane[p] for which the entire object is in the negative half space (opposite the plane normal).

testMask and childMask are used for optimizing bounding volume hierarchies. The version of this method that produces childMask is slower than the version without; it should only be used for parent nodes.

Parameters:
cullingPlaneIndex The index of the first plane for which the entire object is in the negative half-space. The function exits early when one plane is found. -1 when the function returns false (i.e. when no plane culls the whole object).
testMask If bit p is 0, the bounding volume automatically passes the culling test for plane[p] (i.e. it is known that the volume is entirely within the positive half space). The function must return false if testMask is 0 and test all planes when testMask is -1 (0xFFFFFFFF).
childMask Test mask for the children of this volume.

bool G3D::AABox::culledBy const class Plane plane,
int  numPlanes,
int32 cullingPlaneIndex = dummy,
const uint32  testMask = 0xFFFFFF
const
 

Deprecated:
Use culledBy(Array<Plane>&)

bool G3D::AABox::culledBy const class Plane plane,
int  numPlanes,
int32 cullingPlaneIndex,
const uint32  testMask,
uint32 childMask
const
 

Deprecated:
Use culledBy(Array<Plane>&)

void G3D::AABox::deserialize class BinaryInput b  ) 
 

Vector3 G3D::AABox::extent  )  const [inline]
 

double G3D::AABox::extent int  a  )  const [inline]
 

Distance from corner(0) to the next corner along axis a.

void G3D::AABox::getBounds AABox out  )  const [inline]
 

unsigned int G3D::AABox::hashCode  )  const [inline]
 

const Vector3& G3D::AABox::high  )  const [inline]
 

static const AABox& G3D::AABox::inf  )  [inline, static]
 

AABox G3D::AABox::intersect const AABox other  )  const [inline]
 

Return the intersection of the two boxes

bool G3D::AABox::intersects const class Sphere other  )  const
 

Returns true if there is any overlap.

Referenced Code:
Jim Arvo's algorithm from Graphics Gems II

bool G3D::AABox::intersects const AABox other  )  const
 

Returns true if there is any overlap

const Vector3& G3D::AABox::low  )  const [inline]
 

static const AABox& G3D::AABox::maxFinite  )  [inline, static]
 

The largest possible finite box.

bool G3D::AABox::operator!= const AABox b  )  const [inline]
 

bool G3D::AABox::operator== const AABox b  )  const [inline]
 

Vector3 G3D::AABox::randomInteriorPoint  )  const
 

Vector3 G3D::AABox::randomSurfacePoint  )  const
 

void G3D::AABox::serialize class BinaryOutput b  )  const
 

void G3D::AABox::set const Vector3 low,
const Vector3 high
[inline]
 

Assumes that low is less than or equal to high along each dimension.

void G3D::AABox::split const Vector3::Axis axis,
float  location,
AABox low,
AABox high
const
 

Splits the box into two AABoxes along the specified axis. low contains the part that was closer to negative infinity along axis, high contains the other part. Either may have zero volume.

float G3D::AABox::surfaceArea  )  const [inline]
 

Deprecated:

class Box G3D::AABox::toBox  )  const
 

Deprecated:
use Box constructor

float G3D::AABox::volume  )  const [inline]
 

static const AABox& G3D::AABox::zero  )  [inline, static]
 


The documentation for this class was generated from the following file:
Generated on Mon Jul 17 11:50:45 2006 for G3D by doxygen 1.4.5
Hosted by SourceForge.net Logo