"L. Spiro Engine"
Public Member Functions | Public Attributes

lsp::CObb Class Reference

An oriented bounding box. More...

#include <LSPObb.h>

List of all members.

Public Member Functions

CVector3 LSE_CALL ClosestPointToPoint (const CVector3 &_vPoint) const
LSREAL LSE_CALL GetSqDistFromPoint (const CVector3 &_vPoint) const
CObb LSE_CALL Transform (const CMatrix4x4 &_mTransform) const

Public Attributes

CVector3 m_vCenter
CVector3 m_vAxes [3]
CVector3 m_vExtents

Detailed Description

An oriented bounding box.

Class CObb Description: An oriented bounding box. Oriented bounding boxes attempt to make the tightest rectangular block around an object, using any axis for the fit. Because their orientations can be arbitrary, collision tests against them can be more expensive, but they provide fewer false-positives.


Member Function Documentation

CVector3 LSE_CALL lsp::CObb::ClosestPointToPoint ( const CVector3 &  _vPoint) const

Get the closest point on this OBB to a given point.

Parameters:
_vPointThe point from which the closest point on this bounding box is to be calculated.
Returns:
Returns the closest point on this box from the given point.
LSREAL LSE_CALL lsp::CObb::GetSqDistFromPoint ( const CVector3 &  _vPoint) const

Get the distance from the given point to this OBB.

Parameters:
_vPointThe point from which the distance to this bounding box is to be calculated.
Returns:
Returns the squared distance from the closest point on this box to the given point to the given point.
CObb LSE_CALL lsp::CObb::Transform ( const CMatrix4x4 &  _mTransform) const

Create a new bounding box that represents the result of this bounding box transformed by the given matrix.

Parameters:
_mTransformThe matrix transform.
Returns:
Returns a new OBB representing this OBB transformed by the given matrix.

Member Data Documentation

CVector3 lsp::CObb::m_vAxes[3]

The local X-, Y-, and Z- axis directions.

The center of the box.

The positive half-width extents along each axis.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator