Back to class index
| AABB::SetFromSyntaxvoid AABB::SetFrom(const OBB &obb); [5 lines of code]Sets this AABB to enclose the given OBB. This function computes the minimal axis-aligned bounding box for the given oriented bounding box. If the orientation of the OBB is not aligned with the world axes, this conversion is not exact and loosens the volume of the bounding box. Performance0.053μsecs/call ≈ 18.74M calls/second ≈ 312.3k calls/frame (@ 60fps). Work in progress:Todo: in void AABB::SetFrom(const OBB &obb): Implement SetFrom(Polyhedron). Syntaxvoid AABB::SetFrom(const Sphere &s); [5 lines of code]Sets this AABB to enclose the given sphere. This function computes the smallest possible AABB (in terms of volume) that contains the given sphere, and stores the result in this structure. Performance12.316nsecs/call ≈ 81.2M calls/second ≈ 1.35M calls/frame (@ 60fps). Syntaxvoid AABB::SetFrom(const float3 *pointArray, int numPoints); [9 lines of code]Sets this AABB to enclose the given set of points. Parametersconst float3 *pointArrayA pointer to an array of points to enclose inside an AABB. intnumPointsThe number of elements in the pointArray list. Performance8.21nsecs/call ≈ 121.8M calls/second ≈ 2.03M calls/frame (@ 60fps). See AlsoLeave a Comment |