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