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

Syntax

void OBB::Triangulate(int numFacesX, int numFacesY, int numFacesZ, float4 *outPos, float4 *outNormal, float2 *outUV, bool ccwIsFrontFacing) const; [9 lines of code]

Generates an unindexed triangle mesh representation of this OBB.

Parameters

intnumFacesXThe number of faces to generate along the X axis. This value must be >= 1. intnumFacesYThe number of faces to generate along the Y axis. This value must be >= 1. intnumFacesZThe number of faces to generate along the Z axis. This value must be >= 1. float4 *outPos [out]An array of size numVertices which will receive a triangle list of vertex positions. Cannot be null.float4 *outNormal [out]An array of size numVertices which will receive vertex normals. If this parameter is null, vertex normals are not returned.float2 *outUV [out]An array of size numVertices which will receive vertex UV coordinates. If this parameter is null, a UV mapping is not generated. The number of vertices that outPos, outNormal and outUV must be able to contain is (x*y + x*z + y*z)*2*6. If x==y==z==1, then a total of 36 vertices are required. Call NumVerticesInTriangulation to obtain this value.

See Also

ToPolyhedron(), ToEdgeList(), NumVerticesInTriangulation().