OxMBounds Class
This is the base class for all bounding-volume and intersection classes. OxMBounds itself can be considered a null volume - it never intersects with any other volumes, and the Valid method always returns False.
Intersection testing with these classes is designed to "just work". As far as the public API is concerned there's just one Intersects method - it works from any OxMBounds subclass, and with any OxMBounds subclass, but note that tests between 2D and 3D bounds will currently always return False. Also note that point-vs.-point collisions are tested to within OxMath.kEpsilonCoarse to account for rounding errors.
Tip: Review the Intersection.rbp example project included in the download archive for an example implementation.
Properties
-
Position As OxMVector3
The center position of the bounds in 2D or 3D space. The Z coordinate is currently ignored for 2D bounds.
Methods
-
Intersects ( bounds As OxMBounds ) As Boolean
Returns True if this volume intersects the passed volume.
Note: Although it's legal to test for intersections between 2D and 3D bounds, those tests will currently always return False. -
Valid As Boolean
Returns True if this volume is valid for intersection testing (i.e. not a degenerate volume).