The CDXBnds region functions are useful for testing whether the bounds are empty or NULL, or whether they intersect other bounds, as well as for normalizing bounds or creating bounds from unions and intersections of objects.
Member Functions
BoundsAreEmpty Tests whether the bounds are empty. BoundsAreNull Tests whether the bounds are NULL. IntersectBounds( const CDXB_C& Bounds1, const CDXB_C& Bounds2 ) Determines whether the two specified bounds intersect. IntersectBounds( const CDXB_C& OtherBounds ) Determines whether the two specified bounds intersect. NormalizeBounds Sets all of the minimum bounds less than or equal to the maximum bounds. TestIntersect Tests whether the specified bounds intersect the data object. UnionBounds Creates a union of the two specified bounds and assigns the result to the data object.
Tests whether the bounds are empty.
Syntax
BOOL BoundsAreEmpty(void) const;
Return Value
Returns TRUE if the the maximum bound was less than or equal to the minimum bound along one of the dimensions. Returns FALSE if the data object has a positive size along all dimensions.
Tests whether the bounds are NULL.
Syntax
BOOL BoundsAreNull(void) const;
Return Value
Returns TRUE if all the minimum/maximum values equal zero. Returns FALSE if one or more minimum/maximum values are not zero.
Determines whether the two specified bounds intersect.
Syntax
BOOL IntersectBounds( const CDXB_C &Bounds1, const CDXB_C &Bounds2 );
Parameters
- Bounds1
- [in] First bounds to use.
- Bounds2
- [in] Second bounds to use.
Return Value
Returns TRUE if the objects intersect or FALSE if they do not intersect.
Determines whether the two specified bounds intersect.
Syntax
BOOL IntersectBounds( const CDXB_C &OtherBounds );
Parameters
- OtherBounds
- [in] Bounds to intersect with the data object.
Return Value
Returns TRUE if the objects intersect or FALSE if they do not intersect.
Makes all of the minimum bounds less than or equal to the maximum bounds.
Syntax
void NormalizeBounds(void);
Return Value
No return value.
Remarks
This function exchanges any bounds' minimum/maximum values to make sure that the minimum value is less than or equal to the maximum value along each dimension.
Tests whether the specified bounds intersect the data object.
Syntax
BOOL TestIntersect( const CDXB_C &Other ) const;
Parameters
- Other
- [in] Object to test.
Return Value
Returns TRUE if the objects intersect. Returns FALSE if they do not intersect.
Creates a union of the two specified bounds and assigns the result to the data object.
Syntax
void UnionBounds( const CDXB_C &Bounds1, const CDXB_C &Bounds2 );
Parameters
- Bounds1
- [in] First bounds to create a union from.
- Bounds2
- [in] Second bounds to create a union from.
Return Value
No return value.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.