Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Math
Inheritance Hierarchy
- TBox
- TBVTree::FElementBox
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Math/Box.h |
| Include | #include "Math/Box.h" |
Syntax
template<typename T>
struct TBox
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint8 | IsValid | Holds a flag indicating whether this box is valid. | |
| TVector< T > | Max | Holds the box's maximum point. | |
| TVector< T > | Min | Holds the box's minimum point. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| constexpr | TBox () |
Default constructor. | |
| constexpr | TBox
(
ENoInit |
Creates a new box without initialization. | |
| constexpr | TBox
(
EForceInit |
Creates and initializes a new box with zero extent and marks it as invalid. | |
| Creates and initializes a new box from an array of points. | |||
| Conversion from other type. | |||
| constexpr | TBox
(
EForceInit, |
||
| Creates and initializes a new box from the specified extents. | |||
| Creates and initializes a new box from the given set of points. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| TBox< T > | Utility function to build an AABB from Origin and Extent | ||
| T | ComputeSquaredDistanceToBox
(
const TBox< T >& Box |
Calculates squared distance between two boxes. | |
| T | ComputeSquaredDistanceToPoint
(
const TVector< T >& Point |
Calculates the distance of a point to this box. | |
| bool | ContainsNaN () |
||
| void | |||
| bool | Check against another box for equality, within specified error limits. | ||
| TBox< T > | Returns a box of increased size. | ||
| TBox< T > | Returns a box of increased size. | ||
| TBox< T > | ExpandBy
(
T W |
Returns a box of increased size. | |
| TVector< T > | GetCenter () |
Gets the center point of this box. | |
| void | GetCenterAndExtents
(
TVector< T >& Center, |
Gets the center and extents of this box. | |
| TVector< T > | GetClosestPointTo
(
const TVector< T >& Point |
Calculates the closest point on or inside the box to a given point in space. | |
| TVector< T > | GetExtent () |
Gets the extents of this box. | |
| TVector< T > | GetSize () |
Gets the size of this box. | |
| void | GetVertices
(
TVector< T >(&) Vertices |
Get the vertices that make up this box. | |
| T | GetVolume () |
Gets the volume of this box. | |
| void | Init () |
Set the initial values of the bounding box to Zero. | |
| bool | Checks whether the given bounding box intersects this bounding box. | ||
| bool | IntersectXY
(
const TBox< T >& Other |
Checks whether the given bounding box intersects this bounding box in the XY plane. | |
| TBox< T > | InverseTransformBy
(
const TTransform< T >& M |
Gets a bounding volume transformed by an inverted TTransform |
|
| bool | Checks whether a given box is fully encapsulated by this box. | ||
| bool | Checks whether the given location is inside this box. | ||
| bool | IsInsideOrOn
(
const TVector< T >& In |
Checks whether the given location is inside or on this box. | |
| bool | IsInsideOrOnXY
(
const TVector< T >& In |
Checks whether the given location is inside or on this box in the XY plane. | |
| bool | IsInsideXY
(
const TVector< T >& In |
Checks whether the given location is inside this box in the XY plane. | |
| bool | IsInsideXY
(
const TBox< T >& Other |
Checks whether the given box is fully encapsulated by this box in the XY plane. | |
| TBox< T > | Returns a box with its center moved to the new destination. | ||
| TBox< T > | Returns the overlap TBox |
||
| bool | Serialize
(
FStructuredArchive::FSlot Slot |
||
| bool | |||
| bool | SerializeFromMismatchedTag
(
FName StructTag, |
||
| TBox< T > | Returns a box with its position shifted. | ||
| FString | ToString () |
Get a textual representation of this box. | |
| TBox< T > | TransformBy
(
const TMatrix< T >& M |
Gets a bounding volume transformed by a matrix. | |
| TBox< T > | TransformBy
(
const TTransform< T >& M |
Gets a bounding volume transformed by a TTransform |
|
| TBox< T > | TransformProjectBy
(
const TMatrix< T >& ProjM |
Returns the current world bounding box transformed and projected to screen space |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator!=
(
const TBox< T >& Other |
Compares two boxes for inequality. | |
| TVector< T > & | operator[]
(
int32 Index |
Gets reference to the min or max of this bounding volume. | |
| TBox< T > | Gets the result of addition to this bounding volume. | ||
| TBox< T > | Gets the result of addition to this bounding volume. | ||
| TBox< T > & | operator+=
(
const TBox< T >& Other |
Adds to this bounding box to include a new bounding volume. | |
| TBox< T > & | operator+=
(
const TVector< T >& Other |
Adds to this bounding box to include a given point.TBox |
|
| bool | operator==
(
const TBox< T >& Other |
Compares two boxes for equality. |
Typedefs
| Name | Description |
|---|---|
| FReal |