![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Box.h>
Public Types | |
| using | FReal = T |
Static Public Member Functions | |
| static TBox< T > | BuildAABB (const TVector< T > &Origin, const TVector< T > &Extent) |
Public Attributes | |
| TVector< T > | Min |
| TVector< T > | Max |
| uint8 | IsValid |
Friends | |
| FArchive & | operator<< (FArchive &Ar, TBox< T > &Box) |
| void | operator<< (FStructuredArchive::FSlot Slot, TBox< T > &Box) |
| using UE::Math::TBox< T >::FReal = T |
|
inlineconstexpr |
Default constructor. Creates a new box with uninitialized extents and marks it as invalid.
NOTE: This default constructor is unlike TVector, TMatrix etc. in that it actually initializes the instance. Ideally it should be = default; in the same way, but this would break backwards compatibility. It might be possible if the questionable IsValid field ever gets removed.
|
inlineexplicitconstexpr |
Creates a new box without initialization.
|
inlineexplicitconstexpr |
Creates and initializes a new box with zero extent and marks it as invalid.
|
inlineconstexpr |
|
inline |
Creates and initializes a new box from the specified extents.
| InMin | The box's minimum point. |
| InMax | The box's maximum point. |
|
inline |
|
inline |
Creates and initializes a new box from the given set of points.
| Points | Array of Points to create for the bounding volume. |
| Count | The number of points. |
|
inlineexplicit |
Creates and initializes a new box from an array of points.
| Points | Array of Points to create for the bounding volume. |
|
inlineexplicit |
|
inlineexplicit |
Creates and initializes a box that tightly encloses the given sphere.
| Sphere | The sphere being enclosed. |
|
inlinestatic |
Utility function to build an AABB from Origin and Extent
| Origin | The location of the bounding box. |
| Extent | Half size of the bounding box. |
|
inline |
Calculates squared distance between two boxes.
|
inline |
Calculates the distance of a point to this box.
| Point | The point. |
|
inline |
|
inline |
|
inline |
Check against another box for equality, within specified error limits.
Returns true if both bounding boxes are invalid. Returns false if one of the bounding boxes is invalid.
| Other | The box to check against. |
| Tolerance | Error tolerance. |
|
inline |
Returns a box of increased size.
| Neg | The size to increase the volume by in the negative direction (positive values move the bounds outwards) |
| Pos | The size to increase the volume by in the positive direction (positive values move the bounds outwards) |
|
inline |
Returns a box of increased size.
| V | The size to increase the volume by. |
|
inline |
Returns a box of increased size.
| W | The size to increase the volume by. |
|
inline |
Gets the center point of this box.
|
inline |
|
inline |
Calculates the closest point on or inside the box to a given point in space.
| Point | The point in space. |
|
inline |
Gets the (half) extents of this box.
|
inline |
Gets the size of this box.
| void UE::Math::TBox< T >::GetVertices | ( | TVector< T >(&) | Vertices[8] | ) | const |
Get the vertices that make up this box.
|
inline |
Gets the volume of this box.
|
inline |
Set the initial values of the bounding box to Zero.
|
inline |
Checks whether the given bounding box intersects this bounding box.
| Other | The bounding box to intersect with. |
|
inline |
Checks whether the given bounding box intersects this bounding box in the XY plane.
| Other | The bounding box to test intersection. |
| TBox< T > UE::Math::TBox< T >::InverseTransformBy | ( | const TTransform< T > & | M | ) | const |
Gets a bounding volume transformed by an inverted TTransform<T> object.
| M | The transformation object to perform the inversely transform this box with. |
|
inline |
Checks whether a given box is fully encapsulated by this box.
| Other | The box to test for encapsulation within the bounding volume. |
|
inline |
Checks whether the given location is inside this box.
| In | The location to test for inside the bounding volume. |
|
inline |
Checks whether a given box is fully encapsulated by this box.
| Other | The box to test for encapsulation within the bounding volume. |
|
inline |
Checks whether the given location is inside or on this box.
| In | The location to test for inside or on the bounding volume. |
|
inline |
Checks whether the given location is inside or on this box in the XY plane.
| In | The location to test for inside or on the bounding volume. |
|
inline |
Checks whether the given box is fully encapsulated by this box in the XY plane.
| Other | The box to test for encapsulation within the bounding box. |
|
inline |
Checks whether the given location is inside this box in the XY plane.
| In | The location to test for inside the bounding box. |
|
inline |
Returns a box with its center moved to the new destination.
| Destination | The destination point to move center of box to. |
|
inline |
Compares two boxes for inequality.
|
inline |
Gets the result of addition to this bounding volume.
| Other | The other volume to add to this. |
|
inline |
Gets the result of addition to this bounding volume.
| Other | The other point to add to this. |
|
inline |
Adds to this bounding box to include a new bounding volume.
| Other | the bounding volume to increase the bounding volume to. |
|
inline |
Adds to this bounding box to include a given point.
| Other | the point to increase the bounding volume to. |
|
inline |
Compares two boxes for equality.
Returns true if both bounding boxes are invalid. Returns false if one of the bounding boxes is invalid.
|
inline |
Gets reference to the min or max of this bounding volume.
| Index | the index into points of the bounding volume. |
|
inline |
| TBox< T > UE::Math::TBox< T >::Overlap | ( | const TBox< T > & | Other | ) | const |
Returns the overlap TBox<T> of two box
| Other | The bounding box to test overlap |
|
inline |
|
inline |
|
inline |
|
inline |
Returns a box with its position shifted.
| Offset | The vector to shift the box by. |
| UE_FORCEINLINE_HINT FString UE::Math::TBox< T >::ToCompactString | ( | ) | const |
Get a textual representation of this box, without min/max values if invalid.
| UE_FORCEINLINE_HINT FString UE::Math::TBox< T >::ToString | ( | ) | const |
Get a textual representation of this box.
| TBox< T > UE::Math::TBox< T >::TransformBy | ( | const TMatrix< T > & | M | ) | const |
Gets a bounding volume transformed by a matrix.
| M | The matrix to transform by. |
| TBox< T > UE::Math::TBox< T >::TransformBy | ( | const TTransform< T > & | M | ) | const |
Gets a bounding volume transformed by a TTransform<T> object.
| M | The transformation object. |
| TBox< T > UE::Math::TBox< T >::TransformProjectBy | ( | const TMatrix< T > & | ProjM | ) | const |
Returns the current world bounding box transformed and projected to screen space
| ProjM | The projection matrix. |
Serializes the bounding box.
| Ar | The archive to serialize into. |
| Box | The box to serialize. |
|
friend |
Serializes the bounding box.
| Slot | The structured archive slot to serialize into. |
| Box | The box to serialize. |
| uint8 UE::Math::TBox< T >::IsValid |
Holds a flag indicating whether this box is valid.
| TVector<T> UE::Math::TBox< T >::Max |
Holds the box's maximum point.
| TVector<T> UE::Math::TBox< T >::Min |
Holds the box's minimum point.