Unigine.WorldBoundBox Class
This class serves to construct the bounding box in double precision coordinates.
Bounding boxes has better precision quality but it takes more time for calculation in comparison with bounding spheres.
By using this class you can easily find the common bounding box for several objects by expanding the bounding box.
WorldBoundBox Class
Members
WorldBoundBox ( ) #
Default constructor. Creates an empty bounding box.WorldBoundBox ( dvec3 min, dvec3 max ) #
Constructor. Initializes new bounding box by minimum and maximum coordinates of the bounding box.Arguments
- dvec3 min - The bounding box minimum coordinates.
- dvec3 max - The bounding box maximum coordinates.
WorldBoundBox ( WorldBoundBox bb ) #
Constructor. Initializes new bounding box by using given bounding box.Arguments
- WorldBoundBox bb - Bounding box.
WorldBoundBox ( WorldBoundSphere bs ) #
Constructor. Initializes new bounding box by the using given bounding sphere.Arguments
- WorldBoundSphere bs - Bounding sphere.
void clear ( ) #
Clears the bounding box.void expand ( WorldBoundSphere bs ) #
Expands the current bounding box for including given bounding sphere.Arguments
- WorldBoundSphere bs - The bounding sphere.
void expand ( WorldBoundBox bb ) #
Expands the current bounding box for including given bounding box.Arguments
- WorldBoundBox bb - The bounding box.
void expand ( dvec3 point ) #
Expands the current bounding box for including given point.Arguments
- dvec3 point
int inside ( WorldBoundBox bb ) #
Checks if the bounding box is inside the bounding box.Arguments
- WorldBoundBox bb - The bounding box.
Return value
1 if the bounding box is inside the bounding box; otherwise, 0.int inside ( dvec3 min, dvec3 max ) #
Checks if the box is inside the bounding box.Arguments
- dvec3 min - The box minimum coordinates.
- dvec3 max - The box maximum coordinates.
Return value
1 if the box is inside the bounding box; otherwise, 0.int inside ( WorldBoundSphere bs ) #
Checks if the bounding sphere is inside the bounding box.Arguments
- WorldBoundSphere bs - The bounding sphere.
Return value
1 if the bounding sphere is inside the bounding box; otherwise, 0.int inside ( dvec3 point, double radius ) #
Checks if the sphere is inside the bounding box.Arguments
- dvec3 point - The coordinates of the center of the sphere.
- double radius - The sphere radius.
Return value
1 if the sphere is inside the bounding box; otherwise, 0.int insideAll ( WorldBoundBox bb ) #
Checks if the whole given bounding box is inside the current bounding box.Arguments
- WorldBoundBox bb - The bounding box.
Return value
1 if the whole box is inside the bounding box; otherwise, 0.int insideAll ( WorldBoundSphere bs ) #
Checks if the whole given bounding sphere is inside the current bounding box.Arguments
- WorldBoundSphere bs - The bounding sphere.
Return value
1 if the whole sphere is inside the bounding box; otherwise, 0.~WorldBoundBox ( ) #
Destructor.Last update:
2019-08-16
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)