"L. Spiro Engine"
|
An oriented bounding box in 2D. More...
#include <LSPObb2d.h>
Public Member Functions | |
CVector2 LSE_CALL | ClosestPointToPoint (const CVector2 &_vPoint) const |
LSREAL LSE_CALL | GetSqDistFromPoint (const CVector2 &_vPoint) const |
LSVOID LSE_CALL | Transform (const CMatrix4x4 &_mTransform, CObb2d &_oob2Ret) const |
Public Attributes | |
CVector2 | m_vCenter |
CVector2 | m_vAxes [2] |
CVector2 | m_vExtents |
An oriented bounding box in 2D.
Class CObb2d Description: An oriented bounding box in 2D. 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.
CVector2 LSE_CALL lsp::CObb2d::ClosestPointToPoint | ( | const CVector2 & | _vPoint | ) | const |
Get the closest point on this OBB to a given point.
_vPoint | The point from which the closest point on this bounding box is to be calculated. |
LSREAL LSE_CALL lsp::CObb2d::GetSqDistFromPoint | ( | const CVector2 & | _vPoint | ) | const |
Get the distance from the given point to this OBB.
_vPoint | The point from which the distance to this bounding box is to be calculated. |
LSVOID LSE_CALL lsp::CObb2d::Transform | ( | const CMatrix4x4 & | _mTransform, |
CObb2d & | _oob2Ret | ||
) | const |
Create a new bounding box that represents the result of this bounding box transformed by the given matrix.
_mTransform | The matrix transform. |
_oob2Ret | On return, this holds the transformed OBB. |
CVector2 lsp::CObb2d::m_vAxes[2] |
The local X- and Y- axis directions.
CVector2 lsp::CObb2d::m_vCenter |
The center of the box.
CVector2 lsp::CObb2d::m_vExtents |
The positive half-width extents along each axis.