This is the documentation for Enlighten.

class Geo GeoNonAABoundingBox

class Geo::GeoNonAABoundingBox

Non axis aligned bounding box. Note the "m_Pos" of this class is the CORNER (origin), not the centre.

Functions

Name Description
ContainsPoint(const Geo::v128 &)

Returns true if the supplied point is inside the box.

DistanceToPoint(const Geo::v128 &)

Returns the shortest distance from the supplied point to the box. NOTE: Returns a negative distance for points inside the box.

GeoNonAABoundingBox()

Constructors.

GeoNonAABoundingBox(const Geo::GeoBoundingBox &)

Constructors.

GeoNonAABoundingBox(const Geo::v128, const Geo::v128, const Geo::v128)

Constructors.

GetAxisAlignedBoundingBox()

Gets the minimum axis-aligned bounding box that contains this box.

GetBasis(s32)

Gets the basis vector defining the X, Y or Z principal axis of this box (0 = X, 1 = Y, 2 = Z).

GetCentre()

Returns the position at the centre of the box.

GetCorners(v128)

Fills in the given array with the 8 corner points.

GetEdges(BboxEdge)

Fills in the given array with the 12 edges.

GetFaces(BboxFace)

Fills in the given array with the 6 faces. Each face's vertices will be ordered counter-clockwise when viewed from the outside of the bbox.

GetInvWorldMatrix()

From world space to cube map space.

GetPosition()

Gets the corner of this box.

GetSize()

Gets a vector containing the edge lengths of this box in each of X, Y and Z.

GetWorldMatrix()

From cubemap space to world space.

IntersectsBoundingBox(const Geo::GeoNonAABoundingBox &)

Determines if this box intersects the given box.

Load(Geo::IGeoInputStream &)

Load this object from an IGeoStream.

MapFromLocalUnitCube(const Geo::v128 &)

Map a point in the local unit coordinate system of the volume box to WC.

MapToLocalUnitCube(const Geo::v128 &)

Map a WC point to the local unit coordinate system of the volume box.

Save(Geo::IGeoStream &)

Save this object to an IGeoStream.

SetMatrices()

Initialise a non axis aligned bounding box given an origin, an orthonormal basis of 3 unit vectors and the extent size of the the basis vectors.

Variables

Name Description
Geo::v128 m_Basis[3]

An orthonormal basis (of unit vectors) describing the orientation of the box.

Geo::Matrix m_LU2WC

Matrix mapping from local to world coordinates.

Geo::v128 m_Pos

Origin (corner) of the axis aligned box.

Geo::v128 m_Size

Size of the bounding volume (in the basis).

Geo::Matrix m_WC2LU

Matrix mapping from world to local coordinates.


bool Geo::GeoNonAABoundingBox::ContainsPoint


public: bool ContainsPoint
(
    const Geo::v128 & p
) const


Returns true if the supplied point is inside the box.


float Geo::GeoNonAABoundingBox::DistanceToPoint


public: float DistanceToPoint
(
    const Geo::v128 & p
) const


Returns the shortest distance from the supplied point to the box. NOTE: Returns a negative distance for points inside the box.


Geo::GeoNonAABoundingBox::GeoNonAABoundingBox


public: GeoNonAABoundingBox()


Constructors.


Geo::GeoNonAABoundingBox::GeoNonAABoundingBox


public: GeoNonAABoundingBox
(
    const Geo::GeoBoundingBox & axisAlignedBox
)


Constructors.


Geo::GeoNonAABoundingBox::GeoNonAABoundingBox


public: GeoNonAABoundingBox
(
    const Geo::v128 position,
    const Geo::v128 size,
    const Geo::v128 basis
)


Constructors.


GeoBoundingBox Geo::GeoNonAABoundingBox::GetAxisAlignedBoundingBox


public: GeoBoundingBox GetAxisAlignedBoundingBox() const


Gets the minimum axis-aligned bounding box that contains this box.


Geo::v128 Geo::GeoNonAABoundingBox::GetBasis


public: Geo::v128 GetBasis
(
    s32 axis
) const


Gets the basis vector defining the X, Y or Z principal axis of this box (0 = X, 1 = Y, 2 = Z).


Geo::v128 Geo::GeoNonAABoundingBox::GetCentre


public: Geo::v128 GetCentre() const


Returns the position at the centre of the box.


void Geo::GeoNonAABoundingBox::GetCorners


public: void GetCorners
(
    v128 corners
) const


Fills in the given array with the 8 corner points.


void Geo::GeoNonAABoundingBox::GetEdges


public: void GetEdges
(
    BboxEdge edges
) const


Fills in the given array with the 12 edges.


void Geo::GeoNonAABoundingBox::GetFaces


public: void GetFaces
(
    BboxFace faces
) const


Fills in the given array with the 6 faces. Each face's vertices will be ordered counter-clockwise when viewed from the outside of the bbox.


Geo::Matrix Geo::GeoNonAABoundingBox::GetInvWorldMatrix


public: Geo::Matrix GetInvWorldMatrix() const


From world space to cube map space.


Geo::v128 Geo::GeoNonAABoundingBox::GetPosition


public: Geo::v128 GetPosition() const


Gets the corner of this box.


Geo::v128 Geo::GeoNonAABoundingBox::GetSize


public: Geo::v128 GetSize() const


Gets a vector containing the edge lengths of this box in each of X, Y and Z.


Geo::Matrix Geo::GeoNonAABoundingBox::GetWorldMatrix


public: Geo::Matrix GetWorldMatrix() const


From cubemap space to world space.


bool Geo::GeoNonAABoundingBox::IntersectsBoundingBox


public: bool IntersectsBoundingBox
(
    const Geo::GeoNonAABoundingBox & box
) const


Determines if this box intersects the given box.


bool Geo::GeoNonAABoundingBox::Load


public: bool Load
(
    Geo::IGeoInputStream & stream
)


Load this object from an IGeoStream.


Geo::v128 Geo::GeoNonAABoundingBox::MapFromLocalUnitCube


public: Geo::v128 MapFromLocalUnitCube
(
    const Geo::v128 & p
) const


Map a point in the local unit coordinate system of the volume box to WC.


Geo::v128 Geo::GeoNonAABoundingBox::MapToLocalUnitCube


public: Geo::v128 MapToLocalUnitCube
(
    const Geo::v128 & p
) const


Map a WC point to the local unit coordinate system of the volume box.


bool Geo::GeoNonAABoundingBox::Save


public: bool Save
(
    Geo::IGeoStream & stream
) const


Save this object to an IGeoStream.


bool Geo::GeoNonAABoundingBox::SetMatrices


public: bool SetMatrices()


Initialise a non axis aligned bounding box given an origin, an orthonormal basis of 3 unit vectors and the extent size of the the basis vectors.

NOTE: The basis should be orthonormal, thus forming a valid box.