aabbox3d Class Template Reference

#include <aabbox3d.h>


Detailed Description

template<class T>
class irr::core::aabbox3d< T >

Has some useful methods used with occlusion culling or clipping.

Public Member Functions

Data Fields


Constructor & Destructor Documentation

aabbox3d (  )  [inline]

aabbox3d ( const vector3d< T > &  min,
const vector3d< T > &  max 
) [inline]

aabbox3d ( const vector3d< T > &  init  )  [inline]

aabbox3d ( minx,
miny,
minz,
maxx,
maxy,
maxz 
) [inline]


Member Function Documentation

void addInternalBox ( const aabbox3d< T > &  b  )  [inline]

Adds an other bounding box to the bounding box, causing it to grow bigger, if the box is outside of the box

Parameters:
b,: Other bounding box to add into this box.

void addInternalPoint ( x,
y,
z 
) [inline]

Adds a point to the bounding box, causing it to grow bigger, if point is outside of the box.

Parameters:
x,: X Coordinate of the point to add to this box.
y,: Y Coordinate of the point to add to this box.
z,: Z Coordinate of the point to add to this box.

void addInternalPoint ( const vector3d< T > &  p  )  [inline]

Adds a point to the bounding box, causing it to grow bigger, if point is outside of the box

Parameters:
p,: Point to add into the box.

EIntersectionRelation3D classifyPlaneRelation ( const plane3d< f32 > &  plane  )  const [inline]

Classifies a relation with a plane.

Parameters:
plane,: Plane to classify relation to.
Returns:
Returns ISREL3D_FRONT if the box is in front of the plane, ISREL3D_BACK if the box is back of the plane, and ISREL3D_CLIPPED if is on both sides of the plane.

vector3d<T> getCenter (  )  const [inline]

void getEdges ( vector3d< T > *  edges  )  const [inline]

stores all 8 edges of the box into a array

Parameters:
edges,: Pointer to array of 8 edges

vector3d<T> getExtent (  )  const [inline]

aabbox3d<T> getInterpolated ( const aabbox3d< T > &  other,
f32  d 
) const [inline]

Calculates a new interpolated bounding box.

Parameters:
other,: other box to interpolate between
d,: value between 0.0f and 1.0f.

bool intersectsWithBox ( const aabbox3d< T > &  other  )  const [inline]

Determinates if the box intersects with an other box.

Parameters:
other,: Other box to check a intersection with.
Returns:
Returns true if there is a intersection with the other box, otherwise false.

bool intersectsWithLine ( const vector3d< T > &  linemiddle,
const vector3d< T > &  linevect,
halflength 
) const [inline]

Tests if the box intersects with a line

Returns:
Returns true if there is an intersection and false if not.

bool intersectsWithLine ( const line3d< T > &  line  )  const [inline]

Tests if the box intersects with a line

Parameters:
line,: Line to test intersection with.
Returns:
Returns true if there is an intersection and false if not.

bool isEmpty (  )  const [inline]

returns if the box is empty, which means that there is no space within the min and the max edge.

bool isFullInside ( const aabbox3d< T > &  other  )  const [inline]

bool isPointInside ( const vector3d< T > &  p  )  const [inline]

Determinates if a point is within this box.

Parameters:
p,: Point to check.
Returns:
Returns true if the point is withing the box, and false if it is not.

bool isPointTotalInside ( const vector3d< T > &  p  )  const [inline]

Determinates if a point is within this box and its borders.

Parameters:
p,: Point to check.
Returns:
Returns true if the point is withing the box, and false if it is not.

bool operator!= ( const aabbox3d< T > &  other  )  const [inline]

bool operator== ( const aabbox3d< T > &  other  )  const [inline]

void repair (  )  [inline]

void reset ( const vector3d< T > &  initValue  )  [inline]

void reset ( const aabbox3d< T > &  initValue  )  [inline]

void reset ( x,
y,
z 
) [inline]


Field Documentation

vector3d<T> MaxEdge

vector3d<T> MinEdge


Generated on Fri Apr 27 14:47:02 2007 for IrrSpintz by  doxygen 1.5.1-p1