Back to class index
AABB[Class Summary]
minPoint
maxPoint
ctor (+3 overloads)
MinX()[const]
MinY()[const]
MinZ()[const]
MaxX()[const]
MaxY()[const]
MaxZ()[const]
SetNegativeInfinity()
SetFromCenterAndSize(center,size)
SetFrom(obb) (+2 overloads)
ToPolyhedron()[const]
ToOBB()[const]
MinimalEnclosingSphere()[const]
MaximalContainedSphere()[const]
IsFinite()[const]
IsDegenerate()[const]
CenterPoint()[const]
Centroid()[const]
PointInside(x,y,z)[const]
Edge(edgeIndex)[const]
CornerPoint(cornerIndex)[const]
PointOnEdge(edgeIndex,u)[const]
FaceCenterPoint(faceIndex)[const]
FacePoint(faceIndex,u,v)[const]
FaceNormal(faceIndex)[const]
FacePlane(faceIndex)[const]
GetCornerPoints(outPointArray)[const]
GetFacePlanes(outPlaneArray)[const]
Size()[const]
HalfSize()[const]
Diagonal()[const]
HalfDiagonal()[const]
Volume()[const]
SurfaceArea()[const]
RandomPointInside(rng)[const]
RandomPointOnSurface(rng)[const]
RandomPointOnEdge(rng)[const]
RandomCornerPoint(rng)[const]
Translate(offset)
Scale(...) (+1 overload)
TransformAsAABB(transform) (+3 overloads)
Transform(transform)[const] (+3 overloads)
ClosestPoint(targetPoint)[const]
Distance(point)[const] (+1 overload)
Contains(point)[const] (+8 overloads)
Intersects(ray,dNear,dFar)[const] (+11 overloads)
ProjectToAxis(axis,dMin,dMax)[const]
Enclose(point) (+10 overloads)
Triangulate(...)[const]
ToEdgeList(outPos)[const]
Intersection(aabb)[const]
IntersectRayAABB(...)[const]
MinimalEnclosingAABB(...)[static]
ExtremePointsAlongAABB(...)[static]
FromCenterAndSize(...)[static]
NumVerticesInTriangulation(...)[static]
NumVerticesInEdgeList()[static]

AABB::SetFrom

Syntax

void AABB::SetFrom(const OBB &obb); [5 lines of code]

Sets this AABB to enclose the given OBB.

This function computes the minimal axis-aligned bounding box for the given oriented bounding box. If the orientation of the OBB is not aligned with the world axes, this conversion is not exact and loosens the volume of the bounding box.

Performance

0.053μsecs/call ≈ 18.74M calls/second ≈ 312.3k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

Work in progress:

Todo: in void AABB::SetFrom(const OBB &obb):
Implement SetFrom(Polyhedron).

Syntax

void AABB::SetFrom(const Sphere &s); [5 lines of code]

Sets this AABB to enclose the given sphere.

This function computes the smallest possible AABB (in terms of volume) that contains the given sphere, and stores the result in this structure.

Performance

12.316nsecs/call ≈ 81.2M calls/second ≈ 1.35M calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

Syntax

void AABB::SetFrom(const float3 *pointArray, int numPoints); [9 lines of code]

Sets this AABB to enclose the given set of points.

Parameters

const float3 *pointArrayA pointer to an array of points to enclose inside an AABB. intnumPointsThe number of elements in the pointArray list.

Performance

8.21nsecs/call ≈ 121.8M calls/second ≈ 2.03M calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

See Also

MinimalEnclosingAABB().

Leave a Comment

Name:
Comments:
Captcha:captcha image Type in the black symbols:
Back to class index