Chunks
Moddable voxel sandbox for room-scale VR.
Public Member Functions | Public Attributes | List of all members
Chunks.Geometry.SweptAABB Struct Reference

Describes an axis aligned bounding box being projected along a line in a specific direction. More...

Public Member Functions

 SweptAABB (Vector origin, Vector size, Vector direction)
 Constructs a new SweptAABB with the given box center position, size, and direction of travel. More...
 
Vector GetPoint (float delta)
 Gets the new center of the bounding box after travelling delta units in the direction of the sweep. More...
 
void GetBroadPhaseBounds (float dist, out Vector min, out Vector max)
 Gets an axis aligned bounding box containing all positions the swept AABB will visit when moved dist units in the sweep direction. More...
 
void GetBounds (float dist, out Vector min, out Vector max)
 Gets the minimum and maximum bounds of the swept AABB after moving dist units in the sweep direction. More...
 

Public Attributes

readonly Vector Origin
 Starting center of the bounding box. More...
 
readonly Vector Size
 Width, height and depth of the bounding box. More...
 
readonly Vector Direction
 Direction the bounding box is swept. More...
 

Detailed Description

Describes an axis aligned bounding box being projected along a line in a specific direction.

Constructor & Destructor Documentation

Chunks.Geometry.SweptAABB.SweptAABB ( Vector  origin,
Vector  size,
Vector  direction 
)

Constructs a new SweptAABB with the given box center position, size, and direction of travel.

Parameters
originStarting center of the bounding box
sizeWidth, height and depth of the bounding box
directionDirection the bounding box is swept

Member Function Documentation

void Chunks.Geometry.SweptAABB.GetBounds ( float  dist,
out Vector  min,
out Vector  max 
)

Gets the minimum and maximum bounds of the swept AABB after moving dist units in the sweep direction.

Parameters
distDistance of travel
minOutputted destination bounds minimum
maxOutputted destination bounds maximum
void Chunks.Geometry.SweptAABB.GetBroadPhaseBounds ( float  dist,
out Vector  min,
out Vector  max 
)

Gets an axis aligned bounding box containing all positions the swept AABB will visit when moved dist units in the sweep direction.

Parameters
distDistance of travel
minOutputted broad phase bounds minimum
maxOutputted broad phase bounds maximum
Vector Chunks.Geometry.SweptAABB.GetPoint ( float  delta)

Gets the new center of the bounding box after travelling delta units in the direction of the sweep.

Parameters
deltaDistance of the point along the sweep

Member Data Documentation

readonly Vector Chunks.Geometry.SweptAABB.Direction

Direction the bounding box is swept.

readonly Vector Chunks.Geometry.SweptAABB.Origin

Starting center of the bounding box.

readonly Vector Chunks.Geometry.SweptAABB.Size

Width, height and depth of the bounding box.


The documentation for this struct was generated from the following file: