Back to class index
OBB[Class Summary]
pos
r
axis
ctor (+1 overload)
SetNegativeInfinity()
SetFrom(aabb) (+6 overloads)
SetFromApproximate(...)
ToPolyhedron()[const]
MinimalEnclosingAABB()[const]
MaximalContainedAABB()[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]
Volume()[const]
SurfaceArea()[const]
PointInside(x,y,z)[const]
Edge(edgeIndex)[const]
CornerPoint(cornerIndex)[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(aabb)[const] (+11 overloads)
Enclose(point)
Triangulate(...)[const]
ToEdgeList(outPos)[const]
ExtremePointsAlongDirection(...)[static]
PCAEnclosingOBB(...)[static]
NumVerticesInTriangulation(...)[static]
NumVerticesInEdgeList()[static]

OBB::Scale

Syntax

void OBB::Scale(const float3 &centerPoint, float scaleFactor); [4 lines of code]

Applies a uniform scale to this OBB.

This function scales this OBB structure in-place, using the given center point as the origin for the scaling operation.

Parameters

const float3 &centerPointSpecifies the center of the scaling operation, in global (world) space. floatscaleFactorThe uniform scale factor to apply to each global (world) space axis.

Performance

1.03μsecs/call ≈ 970.48k calls/second ≈ 16.17k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

See Also

Translate(), Transform().

Syntax

void OBB::Scale(const float3 &centerPoint, const float3 &scaleFactor); [6 lines of code]

Applies a non-uniform scale to the local axes of this OBB.

This function scales this OBB structure in-place, using the given global space center point as the origin for the scaling operation.

Parameters

const float3 &centerPointSpecifies the center of the scaling operation, in global (world) space. const float3 &scaleFactorThe non-uniform scale factors to apply to each local axis of this OBB.

Performance

2.049μsecs/call ≈ 488.16k calls/second ≈ 8.14k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

See Also

Translate(), Transform().

Work in progress:

Bug: in void OBB::Scale(const float3 &centerPoint, const float3 &scaleFactor):
This scales in global axes, not local axes.

Leave a Comment

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