struct BBox

book_4_sparkGenerated
code_blocksInput

Description

An Axis Aligned Bounding Box (AABB) used for spatial calculations and collision detection.

Members

Static Members

Member NameSummary
FromHeightAndRadiusCreates a bounding box from a height and radius.
FromPositionAndSizeCreates a bounding box from a center position and size.
FromBoxesCreates a bounding box that encompasses a collection of bounding boxes.
FromPointsCreates a bounding box that encompasses a collection of points.

Instance Members

Member NameSummary
TranslateTranslates the bounding box by a given vector.
RotateRotates the bounding box by a given rotation.
TransformTransforms the bounding box by a given transformation matrix.
ContainsChecks if a point or another bounding box is contained within this bounding box.
OverlapsChecks if another bounding box overlaps with this bounding box.
AddPointExpands the bounding box to include a given point.
AddBBoxExpands the bounding box to include another bounding box.
GrowGrows the bounding box by a specified amount.
ClosestPointFinds the closest point on the bounding box to a given point.
TraceTraces a ray against the bounding box and returns if it hits.
GetVolumeGet the volume of this AABB.
SnapSnaps the bounding box to a grid of a given size.

Properties

Property NameSummary
CornersAn enumerable that contains all corners of this AABB.
CenterCalculated center of the AABB.
SizeCalculated size of the AABB on each axis.
ExtentsThe extents of the bbox. This is half the size.
RandomPointInsideReturns a random point within this AABB.
RandomPointOnEdgeReturns a random point on the edge of this AABB.
VolumeReturns the physical volume of this AABB.

Fields

Field NameSummary
MinsThe minimum corner extents of the AABB.
MaxsThe maximum corner extents of the AABB.