Functions | |
void | Set_Bounding_Cuboid (const HC_POINT *min, const HC_POINT *max) |
void | DSet_Bounding_Cuboid (const HC_DPOINT *min, const HC_DPOINT *max) |
void | Set_Bounding_Cuboid_By_Key (HC_KEY key, const HC_POINT *min, const HC_POINT *max) |
Specifies the cuboid used by HOOPS to circumscribe the geometry within a segment.
min | - The lower-most nearest diagonal point (xmin,ymin,zmin) of the cuboid to encompass the geometry contained within the segment. Passed by reference in all languages. |
max | - The upper-most distant diagonal point (xmax,ymax,zmax) of the cuboid to encompass the geometry contained within the segment. Passed by reference in all languages. |
HOOPS uses three different types of bounding volumes internally: rectangles (right rectangular figures in the Z=0 plane), spheres, and cuboids (right rectangular prisms aligned with the coordinate axes). The user does not get to choose which volume is used by HOOPS since HOOPS figures that out and uses what's optimal for the scene.
Bounding volumes are enabled by the system option "bounding volumes". This tells the system to generate bounding volumes for new geometry, and to propagate them up the tree, transforming and merging as it goes up. Bounding volumes, with few exceptions are never stored on geometry—only on segments. The bounding volume at a segment is given in object-relative-units (oru), and so does not account for any transforms local to that segment.
Users gain further control of bounding volumes with the control update flags. "Bounding volume retention" is the default for segments and means that bounding volumes should be attached to the segment. Even if this is off, the bounding volume can propagate higher in the tree—it just won't be stored at that particular segment.
If the user turns retention off and then on, the bounding volume may need recomputation, which is forced by the "compute bounding volume" control update flag. When HOOPS walks the tree during drawing or selection, it checks the current segment for a bounding volume. If one is present, it is clipped against the view. If the volume is entirely outside the view, processing does not proceed down that branch of the tree. For trees with some degree of spatial organization, this results in good performance as objects go off-screen.
The bounding volume specified is set and reflects the bounding volume stored at the segment. The corresponding routine Show_Bounding_Cuboid() can be used to see what has been set. The volume returned is expressed in oru, as usual.
void DSet_Bounding_Cuboid | ( | const HC_DPOINT * | min, |
const HC_DPOINT * | max | ||
) |
Similar to Set_Bounding_Cuboid(), but operates on double-precision data.
min | - The lower-most nearest diagonal point (xmin,ymin,zmin) of the cuboid to encompass the geometry contained within the segment. Passed by reference in all languages. |
max | - The upper-most distant diagonal point (xmax,ymax,zmax) of the cuboid to encompass the geometry contained within the segment. Passed by reference in all languages. |
Similar to Set_Bounding_Cuboid(), but operates on an object referenced by an HC_KEY.
key | - Key of the segment to use. |
min | - The lower-most nearest diagonal point (xmin,ymin,zmin) of the cuboid to encompass the geometry contained within the segment. Passed by reference in all languages. |
max | - The upper-most distant diagonal point (xmax,ymax,zmax) of the cuboid to encompass the geometry contained within the segment. Passed by reference in all languages. |
No additional details. See Set_Bounding_Cuboid()