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]
ToPBVolume()[const]
ToOBB()[const]
MinimalEnclosingSphere()[const]
MaximalContainedSphere()[const]
IsFinite()[const]
IsDegenerate()[const]
CenterPoint()[const]
Centroid()[const]
AnyPointFast()[const]
PointInside(x,y,z)[const]
Edge(edgeIndex)[const]
CornerPoint(cornerIndex)[const]
ExtremePoint(direction)[const] (+1 overload)
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] (+10 overloads)
Intersects(ray,dNear,dFar)[const] (+14 overloads)
ProjectToAxis(axis,dMin,dMax)[const]
UniqueFaceNormals(out)[const]
UniqueEdgeDirections(out)[const]
Enclose(point) (+11 overloads)
Triangulate(...)[const]
ToEdgeList(outPos)[const]
ToString()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
Intersection(aabb)[const]
IntersectLineAABB(...)[const]
IntersectLineAABB_CPP(...)[const]
Equals(rhs,epsilon)[const]
BitEquals(other)[const]
NumFaces()[static]
NumEdges()[static]
NumVertices()[static]
MinimalEnclosingAABB(...)[static]
ExtremePointsAlongAABB(...)[static]
FromCenterAndSize(...)[static]
NumVerticesInTriangulation(...)[static]
NumVerticesInEdgeList()[static]
FromString(str,outEndStr)[static] (+1 overload)

AABB::Triangulate

Syntax

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

Generates an unindexed triangle mesh representation of this AABB.

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.boolccwIsFrontFacingIf true, then the front-facing direction of the faces will be the sides with counterclockwise winding order. Otherwise, the faces are generated in clockwise winding order. 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().