A 3D arbitrarily oriented bounding box.

This data structure represents a box in 3D space. The local axes of this box can be arbitrarily oriented/rotated with respect to the global world coordinate system. This allows OBBs to more tightly bound objects than AABBs do, which always align with the world space axes. This flexibility has the drawback that the geometry tests and operations involving OBBs are more costly, and representing an OBB in memory takes more space (15 floats vs 6 floats).

OBB | A 3D arbitrarily oriented bounding box. |

pos | The center position of this OBB. |

r | Stores half-sizes to x, y and z directions in the local space of this OBB. |

axis | Specifies normalized direction vectors for the local axes. [noscript] |

ctor (+1 overload) | The default constructor does not initialize any members of this class. [opaque-qtscript]. |

SetNegativeInfinity() | Sets this structure to a degenerate OBB that does not have any volume. |

SetFrom(aabb) (+6 overloads) | Sets this OBB from an AABB. |

SetFromApproximate(...) | Sets this OBB to enclose the given point cloud. |

ToPolyhedron()[const] | Converts this OBB to a polyhedron. |

MinimalEnclosingAABB()[const] | Returns the tightest AABB that contains this OBB. |

MaximalContainedAABB()[const] | Returns the largest AABB that can fit inside this OBB. |

MinimalEnclosingSphere()[const] | Returns the smallest sphere that contains this OBB. |

MaximalContainedSphere()[const] | Returns the largest sphere that can fit inside this OBB. |

Size()[const] | Returns the side lengths of this OBB in its local x, y and z directions. |

HalfSize()[const] | Returns the half-side lengths of this OBB in its local x, y and z directions. |

Diagonal()[const] | Returns a diagonal vector of this OBB. |

HalfDiagonal()[const] | Returns Diagonal()/2. |

WorldToLocal()[const] | Computes the transformation matrix that maps from the global (world) space of this OBB to the local space of this OBB. |

LocalToWorld()[const] | Computes the transformation matrix that maps from the local space of this OBB to the global (world) space of this OBB. |

IsFinite()[const] | Tests if this OBB is finite. |

IsDegenerate()[const] | Tests if this OBB is degenerate. |

CenterPoint()[const] | Returns the center point of this OBB in global (world) space of this OBB. |

Centroid()[const] | Returns the center of mass of this OBB. |

Volume()[const] | Computes the volume of this OBB. |

SurfaceArea()[const] | Computes the total surface area of the faces of this OBB. |

PointInside(x,y,z)[const] | Generates a point inside this OBB. |

Edge(edgeIndex)[const] | Returns an edge of this OBB. |

CornerPoint(cornerIndex)[const] | Returns a corner point of this OBB. |

PointOnEdge(edgeIndex,u)[const] | Returns a point on an edge of this OBB. |

FaceCenterPoint(faceIndex)[const] | Returns the point at the center of the given face of this OBB. |

FacePoint(faceIndex,u,v)[const] | Generates a point at the surface of the given face of this OBB. |

FacePlane(faceIndex)[const] | Returns the plane of the given face of this OBB. |

GetCornerPoints(outPointArray)[const] | Fills an array with all the eight corner points of this OBB. |

GetFacePlanes(outPlaneArray)[const] | Fills an array with all the six planes of this OBB. |

RandomPointInside(rng)[const] | Generates a random point inside this OBB. |

RandomPointOnSurface(rng)[const] | Generates a random point on a random face of this OBB. |

RandomPointOnEdge(rng)[const] | Generates a random point on a random edge of this OBB. |

RandomCornerPoint(rng)[const] | Picks a random corner point of this OBB. |

Translate(offset) | Translates this OBB in world space. |

Scale(...) (+1 overload) | Applies a uniform scale to this OBB. |

Transform(transform) (+3 overloads) | Applies a transformation to this OBB. |

ClosestPoint(point)[const] | Computes the closest point inside this OBB to the given point. |

Distance(point)[const] (+1 overload) | Computes the distance between this OBB and the given object. |

Contains(point)[const] (+7 overloads) | Tests if the given object is fully contained inside this OBB. |

Intersects(aabb)[const] (+11 overloads) | Tests whether this OBB and the given object intersect. |

Enclose(point) | Expands this OBB to enclose the given object. The axis directions of this OBB remain intact. |

Triangulate(...)[const] | Generates an unindexed triangle mesh representation of this OBB. |

ToEdgeList(outPos)[const] | Generates an edge list representation of the edges of this OBB. |

ExtremePointsAlongDirection(...)[static] | Finds the two extreme points along the given direction vector from the given point array. |

PCAEnclosingOBB(...)[static] | Generates an OBB that encloses the given point set. |

NumVerticesInTriangulation(...)[static] | Returns the number of vertices that the Triangulate() function will output with the given subdivision parameters. |

NumVerticesInEdgeList()[static] | Returns the number of vertices that the ToEdgeList() function will output. |