Blender V2.61 - r43446
Public Types | Public Member Functions | Friends

SG_BBox Class Reference

#include <SG_BBox.h>

List of all members.

Public Types

enum  intersect { INSIDE, INTERSECT, OUTSIDE }

Public Member Functions

 SG_BBox ()
 SG_BBox (const MT_Point3 &min, const MT_Point3 &max)
 SG_BBox (const SG_BBox &other, const MT_Transform &world)
 SG_BBox (const SG_BBox &other)
 ~SG_BBox ()
SG_BBoxoperator+= (const MT_Point3 &point)
SG_BBoxoperator+= (const SG_BBox &bbox)
SG_BBox operator+ (const SG_BBox &bbox2) const
SG_BBox transform (const MT_Transform &world) const
MT_Scalar volume () const
bool inside (const MT_Point3 &point) const
bool inside (const SG_BBox &other) const
bool outside (const SG_BBox &other) const
bool intersects (const SG_BBox &other) const
intersect test (const SG_BBox &other) const
void get (MT_Point3 *box, const MT_Transform &world) const
void getaa (MT_Point3 *box, const MT_Transform &world) const
void getmm (MT_Point3 *box, const MT_Transform &world) const
void split (SG_BBox &left, SG_BBox &right) const

Friends

class SG_Tree

Detailed Description

Bounding box class. Holds the minimum and maximum axis aligned points of a node's bounding box, in world coordinates.

Definition at line 54 of file SG_BBox.h.


Member Enumeration Documentation

Enumerator:
INSIDE 
INTERSECT 
OUTSIDE 

Definition at line 59 of file SG_BBox.h.


Constructor & Destructor Documentation

SG_BBox::SG_BBox ( )

Definition at line 39 of file SG_BBox.cpp.

SG_BBox::SG_BBox ( const MT_Point3 min,
const MT_Point3 max 
)

Definition at line 45 of file SG_BBox.cpp.

SG_BBox::SG_BBox ( const SG_BBox other,
const MT_Transform world 
)

Definition at line 51 of file SG_BBox.cpp.

SG_BBox::SG_BBox ( const SG_BBox other)

Definition at line 63 of file SG_BBox.cpp.

SG_BBox::~SG_BBox ( )

Definition at line 69 of file SG_BBox.cpp.


Member Function Documentation

void SG_BBox::get ( MT_Point3 box,
const MT_Transform world 
) const

Get the eight points that define this bounding box.

Parameters:
worlda world transform to apply to the produced points bounding box.

Definition at line 169 of file SG_BBox.cpp.

Referenced by SG_Tree::get(), and SG_Spatial::getBBox().

void SG_BBox::getaa ( MT_Point3 box,
const MT_Transform world 
) const

Get the eight points that define this axis aligned bounding box. This differs from SG_BBox::get() in that the produced box will be world axis aligned. The maximum & minimum local points will be transformed *before* splitting to 8 points.

Parameters:
worlda world transform to be applied.

Definition at line 181 of file SG_BBox.cpp.

References max, and min.

Referenced by SG_Spatial::getAABBox().

void SG_BBox::getmm ( MT_Point3 box,
const MT_Transform world 
) const

Definition at line 194 of file SG_BBox.cpp.

References max, and min.

Referenced by BL_ConvertBlenderObjects().

bool SG_BBox::inside ( const MT_Point3 point) const

Test if the given point is inside this bounding box.

Definition at line 140 of file SG_BBox.cpp.

Referenced by SG_Tree::inside(), SG_Spatial::inside(), inside(), intersects(), SG_TreeFactory::MakeTreeDown(), outside(), and test().

bool SG_BBox::inside ( const SG_BBox other) const

Test if the given bounding box is inside this bounding box.

Definition at line 147 of file SG_BBox.cpp.

References inside().

bool SG_BBox::intersects ( const SG_BBox other) const

Test if the given bounding box intersects this bounding box.

Definition at line 152 of file SG_BBox.cpp.

References inside().

SG_BBox SG_BBox::operator+ ( const SG_BBox bbox2) const

Definition at line 101 of file SG_BBox.cpp.

SG_BBox & SG_BBox::operator+= ( const SG_BBox bbox)

Enlarges the bounding box to contain the specified bound box.

Definition at line 93 of file SG_BBox.cpp.

SG_BBox & SG_BBox::operator+= ( const MT_Point3 point)

Enlarges the bounding box to contain the specified point.

Definition at line 73 of file SG_BBox.cpp.

bool SG_BBox::outside ( const SG_BBox other) const

Test if the given bounding box is outside this bounding box.

Definition at line 157 of file SG_BBox.cpp.

References inside().

void SG_BBox::split ( SG_BBox left,
SG_BBox right 
) const

Definition at line 201 of file SG_BBox.cpp.

Referenced by SG_TreeFactory::MakeTreeDown().

SG_BBox::intersect SG_BBox::test ( const SG_BBox other) const

Test the given bounding box with this bounding box.

Definition at line 162 of file SG_BBox.cpp.

References INSIDE, inside(), INTERSECT, and OUTSIDE.

Referenced by SG_TreeFactory::MakeTreeDown().

SG_BBox SG_BBox::transform ( const MT_Transform world) const

Definition at line 128 of file SG_BBox.cpp.

Referenced by SG_Spatial::inside().

MT_Scalar SG_BBox::volume ( ) const

Computes the volume of the bounding box.

Definition at line 108 of file SG_BBox.cpp.

References size().

Referenced by SG_TreeFactory::MakeTreeDown(), and SG_Tree::volume().


Friends And Related Function Documentation

friend class SG_Tree [friend]

Definition at line 135 of file SG_BBox.h.


The documentation for this class was generated from the following files: