|
GearBlocks
The GearBlocks Lua scripting API
|
A bounding box. More...
Public Member Functions | |
| BoundsProxy (Vector3Proxy center, Vector3Proxy size) | |
| Constructor. | |
| Vector3Proxy | ClosestPoint (Vector3Proxy point) |
| Find the closest point on the bounding box. | |
| bool | Contains (Vector3Proxy point) |
| Tests if a point is contained within the bounding box. | |
| void | Encapsulate (Vector3 point) |
| Grow the bounds to encapsulate the point. | |
| void | Encapsulate (BoundsProxy otherBounds) |
| Grow the bounds to encapsulate the other bounds. | |
| void | Expand (float amount) |
| Expand the bounds by increasing its size by an amount along each side. | |
| void | Expand (Vector3Proxy amount) |
| Expand the bounds by increasing its size by an amount along each side. | |
| bool | Intersects (BoundsProxy bounds) |
| Test if another bounding box intersects this one. | |
| void | SetMinMax (Vector3Proxy min, Vector3Proxy max) |
| Set the bounding box from min and max values. | |
| float | SqrDistance (Vector3Proxy point) |
| Find the smallest squared distance between a point and the bounding box. | |
Static Public Member Functions | |
| static bool | operator== (BoundsProxy lhs, BoundsProxy rhs) |
| Compare two bounds. | |
| static bool | operator!= (BoundsProxy lhs, BoundsProxy rhs) |
| Compare two bounds. | |
Properties | |
| Vector3Proxy | Center [get, set] |
| The box's centre. | |
| Vector3Proxy | Extents [get, set] |
| The box's extents. | |
| Vector3Proxy | Size [get, set] |
| The box's size. | |
| Vector3Proxy | Min [get, set] |
| The box's minimal point. | |
| Vector3Proxy | Max [get, set] |
| The box's maximal point. | |
A bounding box.
Static methods available in Lua via the "Bounds" global, for example:
| SmashHammer.Scripting.BoundsProxy.BoundsProxy | ( | Vector3Proxy | center, |
| Vector3Proxy | size | ||
| ) |
Constructor.
| center | The center to initialise with. |
| size | The size to initialise with. |
| Vector3Proxy SmashHammer.Scripting.BoundsProxy.ClosestPoint | ( | Vector3Proxy | point | ) |
Find the closest point on the bounding box.
| point | The point to test. |
| bool SmashHammer.Scripting.BoundsProxy.Contains | ( | Vector3Proxy | point | ) |
Tests if a point is contained within the bounding box.
| point | The point to test. |
true if the point is inside the bounding box; otherwise, false.| void SmashHammer.Scripting.BoundsProxy.Encapsulate | ( | Vector3 | point | ) |
Grow the bounds to encapsulate the point.
| point | The point to encapsulate. |
| void SmashHammer.Scripting.BoundsProxy.Encapsulate | ( | BoundsProxy | otherBounds | ) |
Grow the bounds to encapsulate the other bounds.
| otherBounds | The bounds to encapsulate. |
| void SmashHammer.Scripting.BoundsProxy.Expand | ( | float | amount | ) |
Expand the bounds by increasing its size by an amount along each side.
| amount | The amount to expand by. |
| void SmashHammer.Scripting.BoundsProxy.Expand | ( | Vector3Proxy | amount | ) |
Expand the bounds by increasing its size by an amount along each side.
| amount | The amount to expand by. |
| bool SmashHammer.Scripting.BoundsProxy.Intersects | ( | BoundsProxy | bounds | ) |
Test if another bounding box intersects this one.
| bounds | The other bounds to test. |
true if the bounding boxes intersect; otherwise, false.| void SmashHammer.Scripting.BoundsProxy.SetMinMax | ( | Vector3Proxy | min, |
| Vector3Proxy | max | ||
| ) |
Set the bounding box from min and max values.
| min | The minimal corner of the box. |
| max | The maximal corner of the box. |
| float SmashHammer.Scripting.BoundsProxy.SqrDistance | ( | Vector3Proxy | point | ) |
Find the smallest squared distance between a point and the bounding box.
| point | The point to test. |
|
static |
Compare two bounds.
| lhs | The first bounds. |
| rhs | The second bounds. |
true if the bounds are equal; otherwise, false.
|
static |
Compare two bounds.
| lhs | The first bounds. |
| rhs | The second bounds. |
true if the bounds are not equal; otherwise, false.
|
getset |
The box's centre.
The central position of the box.
|
getset |
The box's extents.
The extents of the box (half the size).
|
getset |
The box's size.
The size of the box (twice the extents).
|
getset |
The box's minimal point.
The minimal corner of the box (center - extents).
|
getset |
The box's maximal point.
The maximal corner of the box (center + extents).