neo::collision::AABB Class Reference

#include <collision/aabb.h>

Inheritance diagram for neo::collision::AABB:

Inheritance graph
[legend]
Collaboration diagram for neo::collision::AABB:

Collaboration graph
[legend]
List of all members.

Detailed Description

Axis-aligned bounding box
Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

 AABB (const math::Vector3 &dim=math::Vector3::ZERO)
 Initialize data.
 AABB (const math::Vector3 &globalTrans, const math::Vector3 &localTrans, const math::Quaternion &globalRot, const math::Quaternion &localRot, const math::Vector3 &dim)
 Initialize data.
virtual ~AABB ()
 Free resources.
const math::Vector3getDimension () const
 Get dimension.
void setDimension (const math::Vector3 &dim)
 Set dimension.
virtual bool intersect (const math::Vector3 &point, bool earlyout=true) const
 Intersection test with point.
virtual bool intersect (const AABB *p_volume, bool earlyout=true) const
 Intersection test with AABB.
virtual bool intersect (const OBB *p_volume, bool earlyout=true) const
 Intersection test with OBB.
virtual bool intersect (const Sphere *p_volume, bool earlyout=true) const
 Intersection test with Sphere.
virtual bool collision (const math::Vector3 &point, const math::Vector3 &direction, ContactSet *p_set, float tmax) const
 Collision test with ray.
virtual void scale (float factor)
 Scale volume.
virtual Volumeclone () const
 Clone volume.
AABBoperator= (const AABB &aabb)
 Copy values.

Protected Attributes

math::Vector3 _dim
 Dimension.


Constructor & Destructor Documentation

neo::collision::AABB::AABB ( const math::Vector3 dim = math::Vector3::ZERO  )  [inline]

Parameters:
dim Dimension

neo::collision::AABB::AABB ( const math::Vector3 globalTrans,
const math::Vector3 localTrans,
const math::Quaternion globalRot,
const math::Quaternion localRot,
const math::Vector3 dim 
) [inline]

Parameters:
globalTrans Global translation
localTrans Local translation
globalRot Global rotation
localRot Local rotation
dim Dimension


Member Function Documentation

const math::Vector3 & neo::collision::AABB::getDimension (  )  const [inline]

Returns:
Dimension

void neo::collision::AABB::setDimension ( const math::Vector3 dim  )  [inline]

Parameters:
dim New dimension

virtual bool neo::collision::AABB::intersect ( const math::Vector3 point,
bool  earlyout = true 
) const [virtual]

Parameters:
point Point
earlyout If true, perform early-out test with radius
Returns:
true if point intersect with volume (lies inside volume), false if not

Implements neo::collision::Volume.

virtual bool neo::collision::AABB::intersect ( const AABB p_volume,
bool  earlyout = true 
) const [virtual]

Parameters:
p_volume AABB
earlyout If true, perform early-out test with radius
Returns:
true if volumes intersect, false if not

Implements neo::collision::Volume.

virtual bool neo::collision::AABB::intersect ( const OBB p_volume,
bool  earlyout = true 
) const [virtual]

Parameters:
p_volume OBB
earlyout If true, perform early-out test with radius
Returns:
true if volumes intersect, false if not

Implements neo::collision::Volume.

virtual bool neo::collision::AABB::intersect ( const Sphere p_volume,
bool  earlyout = true 
) const [virtual]

Parameters:
p_volume Sphere
earlyout If true, perform early-out test with radius
Returns:
true if volumes intersect, false if not

Implements neo::collision::Volume.

virtual bool neo::collision::AABB::collision ( const math::Vector3 point,
const math::Vector3 direction,
ContactSet p_set,
float  tmax 
) const [virtual]

Parameters:
point Point of origin
direction Direction
p_set Contact set
tmax Maximum time
Returns:
true if point intersect with volume (lies inside volume), false if not

Implements neo::collision::Volume.

virtual void neo::collision::AABB::scale ( float  factor  )  [virtual]

Scale dimension of volume

Parameters:
factor Scaling factor

Implements neo::collision::Volume.

virtual Volume* neo::collision::AABB::clone (  )  const [virtual]

Create an exact duplicate of this volume

Returns:
Duplicate object

Implements neo::collision::Volume.

AABB& neo::collision::AABB::operator= ( const AABB aabb  ) 

Copy values from reference volume

Parameters:
aabb Volume to copy values from


The documentation for this class was generated from the following file:
Generated on Sat Feb 17 20:51:01 2007 for NeoEngine 2 - Evolution by  doxygen 1.5.1