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. Parametersconst OBB &obbThe oriented bounding box to convert into this AABB. See AlsoWork in progress:Todo: in void AABB::SetFrom(const OBB &obb): Implement SetFrom(Polyhedron). Syntaxvoid AABB::SetFrom(const Sphere &s); [6 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. Syntaxvoid AABB::SetFrom(const float4 *pointArray, int numPoints); [9 lines of code]Sets this AABB to enclose the given set of points. Parametersconst float4 *pointArrayA pointer to an array of points to enclose inside an AABB. intnumPointsThe number of elements in the pointArray list. See Also |