SolidKit3D.BoundingBox struct

From Solid Graphics Wiki

Jump to: navigation, search
SolidKit3D.BoundingBox struct
Namespace: SolidKit3D
Base type: (None)
Assembly: SolidKit.dll
Platform: .NET

The BoundingBox struct specifies axis alligned bounding box in 3D space. The class is used mainly for purposes of coarse collision detection tests.


Fields

Field name Type Description
MinX float Minimimum bounding box's X coordinate
ManX float Maximim bounding box's X coordinate
MinY float Minimimum bounding box's Y coordinate
ManY float Maximim bounding box's Y coordinate
MinZ float Minimimum bounding box's Z coordinate
ManZ float Maximim bounding box's Z coordinate

Field name Type Description
BoundingBoxOfEverything BoundingBox A static variable of BoundingBox type. The BoundingBoxOfEverything has all it's min fields initialized to -float.MinValue and max fields to float.MaxValue. It represents biggest bounding box possible and all Intersects method calls using it will return true.
Empty BoundingBox A static variable of BoundingBox type. The Empty bounding box has it's fields initialized so it's min value is greater than it's max values.

Methods

Method name Description
Set Set's object's field values to specified parameters.
Add Extends bounding box to include specified parameter's bounding box. The Add method is overloaded to take various parameter types, such as point, PointList, TriangleByRefList, Shape, PolyLine, BoundingBox, a shape transformed by given Matrix4x4f. If the bounding box already encloses the specified parameter's bounding box then the function does nothing.
AddSphere Extends bounding box to include specified sphere parameter. If the bounding box already encloses the specified sphere then the function does nothing.
MakeCube If the bounding box is not already a cube then the method extends it to make it a cube.
Intersects Returns true if specified object intersects, touches, or lies inside the bounding box. The method is overloaded and can take Point, BoundingBox, LineSegment type as a parameter. Otherwise returns false.
IsInside Returns true if the bounding box instance is inside specified bounding box parameter. Otherwise returns false.
IsTouching Returns true if another bounding box boundary is within Settings.MinDistance of the bounding box instance.
Move Moves the bounding box by specified vector.
Expand Expands the bounding box by specified size.
Scale Multiplies bounding box by specified factor.
MaxExtent Returns maximum extend of the bonding box. For example if the box is longest in the X dimension then the method returns value of MaxX minus MinX.
BoundingSphereRadius Returns radius of a minimum sized bounding sphere which completely encloses the bounding box.
Center Returns center point of the bounding box.
GetShape Returns bounding box as a shape object.
IsEmpty Returns true if the bounding box is an "empty" bounding box. Otherwise returns false.

See Also


   


SolidKit Library Documentation

Personal tools