C++ Java Unity
C++ Reference
Obb3D Class Reference

Detailed Description

A 3D oriented bounding box.

Public Member Functions

 Obb3D ()
 Constructor. More...
 
 Obb3D (const Obb3D &other)
 Copy constructor. More...
 
 Obb3D (const Vec3F &nCenter, const Vec3F &nHalfExtents, float nRotationZ)
 Construct from center, half extents and rotation. More...
 
virtual const Vec3FgetCenter () const
 Get the center of the bounding box. More...
 
virtual const Vec3FgetHalfExtents () const
 Get the half width, depth, and height of the bounding box. More...
 
virtual float getRotationZ () const
 Get the rotation of the bounding box. More...
 
virtual ~Obb3D ()
 

Protected Attributes

Vec3F center
 
Vec3F halfExtents
 
float rotation
 

Constructor & Destructor Documentation

Obb3D ( )

Constructor.

Obb3D ( const Obb3D other)

Copy constructor.

Obb3D ( const Vec3F nCenter,
const Vec3F nHalfExtents,
float  nRotationZ 
)

Construct from center, half extents and rotation.

Parameters
nCenterThe center of the box.
nHalfExtentsThe half width, half height and half-depth of the (unrotated) box
nRotationZCounter-clock-wise rotation angle around the Z axis, in radians
virtual ~Obb3D ( )
virtual

Member Function Documentation

virtual const Vec3F& getCenter ( ) const
virtual

Get the center of the bounding box.

virtual const Vec3F& getHalfExtents ( ) const
virtual

Get the half width, depth, and height of the bounding box.

virtual float getRotationZ ( ) const
virtual

Get the rotation of the bounding box.

Returns
the counter-clock-wise rotation angle of the bounding box around the Z axis, in radians.

Member Data Documentation

Vec3F center
protected
Vec3F halfExtents
protected
float rotation
protected