BBoxclass
An Axis Aligned Bounding Box.
Constructors2
Showing 2 constructors
No results match this filter.
Methods19
Showing 19 methods
public BBox AddBBox(BBox point)
Returns this bbox but stretched to include given bbox
| Parameter | Type | Description |
|---|---|---|
| point | BBox | — |
public BBox AddPoint(Vector3 point)
Returns this bbox but stretched to include given point
| Parameter | Type | Description |
|---|---|---|
| point | Vector3 | — |
public Vector3 ClosestPoint(Vector3 point)
Returns the closest point on this AABB to another point
| Parameter | Type | Description |
|---|---|---|
| point | Vector3 | — |
public static BBox FromBoxes(System.Collections.Generic.IEnumerable`1<BBox> boxes)
| Parameter | Type | Description |
|---|---|---|
| boxes | IEnumerable<BBox> | — |
public static BBox FromHeightAndRadius(float height, float radius)
Creates an AABB of `radius` length and depth, and given `height`
| Parameter | Type | Description |
|---|---|---|
| height | float | — |
| radius | float | — |
public static BBox FromPoints(System.Collections.Generic.IEnumerable`1<Vector3> points, float size = 0)
| Parameter | Type | Description |
|---|---|---|
| points | IEnumerable<Vector3> | — |
| size = 0 | float | — |
public float GetEdgeDistance(Vector3 localPos)
Calculates the shortest distance from the specified local position to the nearest edge of the shape.
| Parameter | Type | Description |
|---|---|---|
| localPos | Vector3 | — |
float—public float GetVolume()
Get the volume of this AABB
Obsolete: Use BBox.Volume instead.
float—public BBox Grow(float skin)
Return a slightly bigger box
| Parameter | Type | Description |
|---|---|---|
| skin | float | — |
public bool Overlaps(BBox b)
Returns true if this AABB somewhat overlaps given AABB
| Parameter | Type | Description |
|---|---|---|
| b | BBox | — |
bool—public BBox Rotate(Rotation rotation)
Rotate this box by this amount and return
| Parameter | Type | Description |
|---|---|---|
| rotation | Rotation | — |
public BBox Snap(float distance)
Snap this AABB to a grid
| Parameter | Type | Description |
|---|---|---|
| distance | float | — |
public bool Trace(Ray ray, float distance, float hitDistance)
Trace a ray against this box. If hit then return the distance.
| Parameter | Type | Description |
|---|---|---|
| ray | Ray | — |
| distance | float | — |
| hitDistance | float | — |
bool—No results match this filter.
Properties7
Showing 7 properties
public System.Collections.Generic.IEnumerable`1<Vector3> BBox.Corners { get; set; }
An enumerable that contains all corners of this AABB.
public float BBox.Volume { get; set; }
Returns the physical volume of this AABB.
float—No results match this filter.