A min-max axis-aligned 2D bounding box.
More...
#include <LSPAabb2d.h>
List of all members.
Detailed Description
A min-max axis-aligned 2D bounding box.
Class CAabb2d Description: A min-max axis-aligned 2D bounding box.
Member Function Documentation
CVector2 LSE_CALL lsp::CAabb2d::ClosestPointToPoint |
( |
const CVector2 & |
_vPoint | ) |
const |
Gets the closest point on this AABB to a given point.
- Parameters:
-
_vPoint | The 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.
LSVOID LSE_CALL lsp::CAabb2d::ComputeAabbFromAabbAndMatrix |
( |
const CAabb2d & |
_aabb2Other, |
|
|
const CMatrix4x4 & |
_mTrans |
|
) |
| |
Compute an AABB from an existing AABB with a matrix-stored translation. The matrix must be row-major.
- Parameters:
-
_aabb2Other | The source bounding box to transform by the given matrix and store in this object. |
_mTrans | The matrix used to transform _aabb2Other into this bounding box. |
LSVOID LSE_CALL lsp::CAabb2d::ComputeAabbFromPointArray |
( |
const CVector2 * |
_pvPoints, |
|
|
LSUINT32 |
_uiTotal |
|
) |
| |
Compute an AABB from a set of points given in the form of an array of CVector2's.
- Parameters:
-
_vPoints | The array of points to enclose. |
_uiTotal | The number of points in the array to which _vPoints points. |
LSVOID LSE_CALL lsp::CAabb2d::Encompass |
( |
const CAabb2d & |
_aabb2Other | ) |
|
Change the size of the AABB to encompass another AABB.
- Parameters:
-
_aabb2Other | The bounding box to fully encompass by this bounding box. |
LSVOID LSE_CALL lsp::CAabb2d::Encompass |
( |
const CVector2 & |
_vOther | ) |
|
Change the size of the AABB to encompass a point.
- Parameters:
-
_vOther | The point to fully encompass by this bounding box. |
LSREAL LSE_CALL lsp::CAabb2d::GetArea |
( |
| ) |
const |
Gets its area.
- Returns:
- Returns the area of this bounding box.
LSVOID LSE_CALL lsp::CAabb2d::GetBox |
( |
CVector2 |
_vPoints[4] | ) |
const |
Fill an array of 4 vectors with the vertices of the bounding box represented by this object.
- Parameters:
-
_vPoints | An array of at least 4 vectors to be filled with the points at the corners of this bounding box. |
CVector2 LSE_CALL lsp::CAabb2d::GetCenter |
( |
| ) |
const |
Gets the center of the bounding box.
- Returns:
- Returns a point marking the center of this bounding box.
LSE_INLINE LSREAL LSE_CALL lsp::CAabb2d::GetSizeX |
( |
| ) |
const |
Gets its X size.
- Returns:
- Returns the length of this bounding box along the X axis.
LSE_INLINE LSREAL LSE_CALL lsp::CAabb2d::GetSizeY |
( |
| ) |
const |
Gets its Y size.
- Returns:
- Returns the length of this bounding box along the Y axis.
LSREAL LSE_CALL lsp::CAabb2d::GetSqDistFromPoint |
( |
const CVector2 & |
_vPoint | ) |
const |
Gets the distance from the given point to this AABB.
- Parameters:
-
_vPoint | The 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.
LSVOID LSE_CALL lsp::CAabb2d::MakeInfinitelySmall |
( |
| ) |
|
Make the box infinitely small.
Member Data Documentation
The maximum X-, Y-, and Z- axis values.
The minimum X-, Y-, and Z- axis values.
The documentation for this class was generated from the following file:
- F:/My Projects/LSEngine/Modules/LSPhysicsLib/Src/BoundingBoxes/LSPAabb2d.h