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::PointOnEdge

Syntax

float3 OBB::PointOnEdge(int edgeIndex, float u) const; [26 lines of code]

Returns a point on an edge of this OBB.

Parameters

intedgeIndexThe index of the edge to generate a point to, in the range [0, 11].floatuA normalized value between [0,1]. This specifies the relative distance of the point along the edge.

Performance

16.421nsecs/call ≈ 60.9M calls/second ≈ 1.01M calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

See Also

PointInside(), Edge(), CornerPoint(), FaceCenterPoint(), FacePoint().

Work in progress:

Todo: in float3 OBB::PointOnEdge(int edgeIndex, float u) const:
Document which index generates which one.

Leave a Comment

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