class Geo GeoBoundingBox

This is the documentation for Enlighten.

class Geo GeoBoundingBox

class Geo::GeoBoundingBox

This class represents an axis aligned bounding box.

Variables

Name

Description

Name

Description

Geo::v128 v[2]

A min and max position pair.

Functions

Name

Description

Name

Description

AddDebugLines(Geo::GeoArray< DebugLine > &)

Appends to the contents of the given array with the lines making up the bounding box.

CalculateSolidAngle(v128 const &)

calculates the solid angle of the box as visible from viewPos

ClosestPointInBox(const Geo::v128 &)

Compute the closest point in the box to p.

ContainsBox(const Geo::GeoBoundingBox &)

Is a box contained by the box?

ContainsPoint(const Geo::v128 &)

Is a point in the box?

ContainsPoint2D(const Geo::v128 &)

Is a point in the box? Only tests xy.

EnclosePoint(const v128 &)

Enlarge this bounding box to include the given point.

ExpandBy(const v128 &)

Expands this bounding box by the given amount in each of the three axes (in both directions).

GeoBoundingBox()

Constructor - makes an empty bounding box.

GeoBoundingBox(float, float, float, float, float, float)

Create a bounding box defined by two extreme points.

GeoBoundingBox(const GeoBoundingBox &)

Copy Constructor.

GetCenter()

Return the center of this bounding box.

GetCorners(v128 *)

Return the 8 corner points.

GetDebugLines(Geo::GeoArray< DebugLine > &)

Replaces the contents of the given array with the lines making up the bounding box.

GetDistanceFrom(const GeoBoundingBox &)

Distance between two bounding boxes (0 if they intersect)

GetLargestFace()

Return the largest face of this bounding box.

GetLongestSide()

Return the longest side of this bounding box.

GetLongestSideIdx()

Returns the index of the longest axis.

GetMax()

Return the maxumum in each axis of this bounding box.

GetMin()

Return the minimum in each axis of this bounding box.

GetShortestSide()

Return the shortest side of this bounding box.

GetSize()

Return the size of this bounding box in each axis.

GetSurfaceArea()

Return the surface area of this bounding box.

GetVolume()

Return the volume of this bounding box.

IntersectsBoundingBox(const GeoBoundingBox &)

Returns true if the bounding boxes mutually olaps.

IntersectsLightCone(const Geo::v128 &, const Geo::v128 &, float, float)

Returns true if the bounding box intersects the light cone.

IntersectsRay(const Geo::v128 &, const Geo::v128 &, float &)

Returns true if the bounding box intersects the ray. If intersects then tHit return the distance to the hit.

IntersectsSphere(Geo::v128, float)

Returns true if the bounding box overlaps the sphere.

IntersectsSphere(const GeoBoundingSphere &)

Returns true if the bounding box overlaps the sphere.

IsEmpty()

Returns true if the bbox is empty (ie uninitialised)

operator[](Geo::u32)

Indexed access to the two extreme points that define this bounding box (index must be 0 or 1).

operator+(const GeoBoundingBox &)

Compute and return the union of this bounding with another.

operator+=(const v128 &)

Enlarge this bounding box to include the given point.

operator+=(const GeoBoundingBox &)

Compute the inplace union of this bounding box and another.

SetEmpty()

Resets the box to it's default empty state.

Transform(const Geo::Matrix &)

Returns a new transformed bounding box.