Back to class index
OBB[Class Summary]
pos
r
axis
ctor (+2 overloads)
SetNegativeInfinity()
SetFrom(aabb) (+5 overloads)
ToPolyhedron()[const]
ToPBVolume()[const]
MinimalEnclosingAABB()[const]
MinimalEnclosingSphere()[const]
MaximalContainedSphere()[const]
Size()[const]
HalfSize()[const]
Diagonal()[const]
HalfDiagonal()[const]
WorldToLocal()[const]
LocalToWorld()[const]
IsFinite()[const]
IsDegenerate()[const]
CenterPoint()[const]
Centroid()[const]
AnyPointFast()[const]
Volume()[const]
SurfaceArea()[const]
PointInside(x,y,z)[const]
Edge(edgeIndex)[const]
CornerPoint(cornerIndex)[const]
ExtremePoint(direction)[const] (+1 overload)
ProjectToAxis(...)[const]
UniqueFaceNormals(out)[const]
UniqueEdgeDirections(out)[const]
PointOnEdge(edgeIndex,u)[const]
FaceCenterPoint(faceIndex)[const]
FacePoint(faceIndex,u,v)[const]
FacePlane(faceIndex)[const]
GetCornerPoints(outPointArray)[const]
GetFacePlanes(outPlaneArray)[const]
RandomPointInside(rng)[const]
RandomPointOnSurface(rng)[const]
RandomPointOnEdge(rng)[const]
RandomCornerPoint(rng)[const]
Translate(offset)
Scale(...) (+1 overload)
Transform(transform) (+3 overloads)
ClosestPoint(point)[const]
Distance(point)[const] (+1 overload)
Contains(point)[const] (+7 overloads)
Intersects(obb,epsilon)[const] (+14 overloads)
Enclose(point)
Triangulate(...)[const]
ToEdgeList(outPos)[const]
ToString()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
Equals(rhs,epsilon)[const]
BitEquals(other)[const]
NumFaces()[static]
NumEdges()[static]
NumVertices()[static]
ExtremePointsAlongDirection(...)[static]
OptimalEnclosingOBB(...)[static]
NumVerticesInTriangulation(...)[static]
NumVerticesInEdgeList()[static]
FromString(str,outEndStr)[static] (+1 overload)

OBB::WorldToLocal

Syntax

float3x4 OBB::WorldToLocal() const; [6 lines of code]

Computes the transformation matrix that maps from the global (world) space of this OBB to the local space of this OBB.

In local space, the center of the OBB lies at (r.x,r.y,r.z), and the OBB is aligned along the cardinal axes, i.e. is an AABB. The local +X vector runs in the direction specified by axis[0], the +Y direction is specified by axis[1], and +Z by axis[2]. The size of the OBB is 2*r. In global (world) space, the center of the OBB lies at the point given by the pos member variable.

Return Value

This global (world) to local space transform can be represented using a float3x4 matrix. This function computes and returns the matrix that maps from the world space of this OBB to the local space of this OBB.

See Also

pos, r, axis.

Syntax

float3x4 OBB::LocalToWorld() const; [27 lines of code]

Computes the transformation matrix that maps from the local space of this OBB to the global (world) space of this OBB.

This mapping is the inverse of the transform computed by WorldToLocal().

Return Value

A matrix that transforms from the local space of this OBB to the global (world) space of this OBB.

See Also

pos, r, axis.

Work in progress:

Todo: in float3x4 OBB::LocalToWorld() const:
sse-matrix