Functions | |
HC_BOOLEAN | Compute_Circumcuboid (const char *segment, HC_POINT *min, HC_POINT *max) |
HC_BOOLEAN | Compute_Circumcuboid_By_Key (HC_KEY key, HC_POINT *min, HC_POINT *max) |
HC_BOOLEAN Compute_Circumcuboid | ( | const char * | segment, |
HC_POINT * | min, | ||
HC_POINT * | max | ||
) |
Returns points defining a cuboid that circumscribes the geometry within a segment.
segment | - Segment name to use for the calculation. |
min | - The lower-most nearest diagonal point (xmin,ymin,zmin) of the cuboid to encompass the geometry contained within the segment. Returned to user. 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. Returned to user. Passed by reference in all languages. |
This function returns the axis-aligned bounding cuboid associated with a database entity. The bounding volume returned is computed on demand---it does not reflect the bounding volume stored at the segment, if any. The routine, Show_Bounding_Cuboid() , can be used for that purpose. The volume returned is expressed in oru.
Compute_Circumcuboid, the standard variant, allows only for segments. The By_Key variant, however, allows for keys that refer to any sort of geometry (in addition to segments). The standard variant allows for the normal wildcards associated with a segment specification.
The By_Key variant will fail if the specified key in variant does not refer to anything valid. The standard variant will fail if the specified segment in the does not match at least one segment, or all matched segments are empty of any geometry.
Transform-dependent geometry (e.g. markers, text) contributes only its insertion point. A reasonable way to handle markers would be to add a small pad to the min and max result. Special handling is needed to account for text, however. HOOPS/MVO (distributed as open source) contains a good example of that special handling (hint: it involves Compute_Text_Extent() ).
Temporary geometry created "on the fly" in the midst of I.M. callbacks will never contribute to any bounding volumes. The computed bounding volume will be with respect to geometry that has been inserted into the database.
When called on a large segment tree, this function can become expensive, so use sparingly.
HC_BOOLEAN Compute_Circumcuboid_By_Key | ( | HC_KEY | key, |
HC_POINT * | min, | ||
HC_POINT * | max | ||
) |
Similar to Compute_Circumcuboid(), but operates on an object referenced by an HC_KEY.
key | - Key of the segment used for the calculation. |
min | - The lower-most nearest diagonal point (xmin,ymin,zmin) of the cuboid to encompass the geometry contained within the segment. Returned to user. 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. Returned to user. Passed by reference in all languages. |
No additional details. See Compute_Circumcuboid()