Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

class Geo::GeoNonAABoundingBox

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

Functions

NameDescription
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

NameDescription
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.


Anchor
a181e8d5621ee16bf602b1e4dba2fb53c
a181e8d5621ee16bf602b1e4dba2fb53c

bool Geo::GeoNonAABoundingBox::ContainsPoint

...

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

...

Returns true if the supplied point is inside the box.


Anchor
abcb132a95aea3d48eff974a5a80f1ae6
abcb132a95aea3d48eff974a5a80f1ae6

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.


Anchor
a3eb0f9f8e982d150fed5771d47444159
a3eb0f9f8e982d150fed5771d47444159

Geo::GeoNonAABoundingBox::GeoNonAABoundingBox

...

public: GeoNonAABoundingBox()

...

Constructors.


Anchor
a54578d0ea90f9e716f218ae479c5849b
a54578d0ea90f9e716f218ae479c5849b

Geo::GeoNonAABoundingBox::GeoNonAABoundingBox

...

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

...

Constructors.


Anchor
a3a6eddf4ba050146f21268ec973898e7
a3a6eddf4ba050146f21268ec973898e7

Geo::GeoNonAABoundingBox::GeoNonAABoundingBox

...

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

...

Constructors.


Anchor
a95230ae8d1f0f49b8903963d192ba95d
a95230ae8d1f0f49b8903963d192ba95d

GeoBoundingBox Geo::GeoNonAABoundingBox::GetAxisAlignedBoundingBox

...

public: GeoBoundingBox GetAxisAlignedBoundingBox() const

...

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


Anchor
a73016d7560f7056d8f8becbb951ac5d1
a73016d7560f7056d8f8becbb951ac5d1

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).


Anchor
ad5fac3ae18ab4f2ac518a3fd48cd1823
ad5fac3ae18ab4f2ac518a3fd48cd1823

Geo::v128 Geo::GeoNonAABoundingBox::GetCentre

...

public: Geo::v128 GetCentre() const

...

Returns the position at the centre of the box.


Anchor
a6b58e7aaec01d4d07303b4efdb84bf93
a6b58e7aaec01d4d07303b4efdb84bf93

void Geo::GeoNonAABoundingBox::GetCorners

...

public: void GetCorners
(
    v128 corners
) const

...

Fills in the given array with the 8 corner points.


Anchor
a36811b910290bd87ae13e8315d479723
a36811b910290bd87ae13e8315d479723

void Geo::GeoNonAABoundingBox::GetEdges

...

public: void GetEdges
(
    BboxEdge edges
) const

...

Fills in the given array with the 12 edges.


Anchor
acb850252d3a1fae059c5c23c422aead1
acb850252d3a1fae059c5c23c422aead1

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.


Anchor
a870961b2876d266230287d136705c632
a870961b2876d266230287d136705c632

Geo::Matrix Geo::GeoNonAABoundingBox::GetInvWorldMatrix

...

public: Geo::Matrix GetInvWorldMatrix() const

...

From world space to cube map space.


Anchor
a4c02df1058458426b3e06749b5568b1d
a4c02df1058458426b3e06749b5568b1d

Geo::v128 Geo::GeoNonAABoundingBox::GetPosition

...

public: Geo::v128 GetPosition() const

...

Gets the corner of this box.


Anchor
a95750bdff373ce950e60f38704c49db4
a95750bdff373ce950e60f38704c49db4

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.


Anchor
ab41814e3d9c1ed87978f1100a291194a
ab41814e3d9c1ed87978f1100a291194a

Geo::Matrix Geo::GeoNonAABoundingBox::GetWorldMatrix

...

public: Geo::Matrix GetWorldMatrix() const

...

From cubemap space to world space.


Anchor
ad2f853c24061d280e48d1403e099f184
ad2f853c24061d280e48d1403e099f184

bool Geo::GeoNonAABoundingBox::IntersectsBoundingBox

...

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

...

Determines if this box intersects the given box.


Anchor
aa214405cae33a3553c037b322d22f361
aa214405cae33a3553c037b322d22f361

bool Geo::GeoNonAABoundingBox::Load

...

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

...

Load this object from an IGeoStream.


Anchor
a22db811bedeb88c8a750b6bdaa9536c5
a22db811bedeb88c8a750b6bdaa9536c5

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.


Anchor
a4f6775e222df3fcf590c5e73a2b32965
a4f6775e222df3fcf590c5e73a2b32965

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.


Anchor
aa31aea2b033c2fc5fde52ef43b29bae5
aa31aea2b033c2fc5fde52ef43b29bae5

bool Geo::GeoNonAABoundingBox::Save

...

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

...

Save this object to an IGeoStream.


Anchor
af477b4c8b4d0268a8030959745e53f2a
af477b4c8b4d0268a8030959745e53f2a

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.