Navigation
API > API/Runtime > API/Runtime/GeometryCore
TOrientedBox3 is a non-axis-aligned 3D box defined by a 3D frame and extents along the axes of that frame The frame is at the center of the box.
| Name | TOrientedBox3 |
| Type | struct |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/OrientedBoxTypes.h |
| Include Path | #include "OrientedBoxTypes.h" |
| Source | /Engine/Source/Runtime/GeometryCore/Public/Intersection/IntersectionQueries3.h |
Syntax
template<typename RealType>
struct TOrientedBox3
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TOrientedBox3
(
const TVector< RealType >& Origin, |
Create axis-aligned box with given Origin and Extents | OrientedBoxTypes.h | |
| OrientedBoxTypes.h | |||
TOrientedBox3
(
const TAxisAlignedBox3< RealType >& AxisBox |
Create oriented box from axis-aligned box | OrientedBoxTypes.h | |
TOrientedBox3
(
const FOrientedBox& Box |
Convert from CoreMath's FOrientedBox. | OrientedBoxTypes.h | |
TOrientedBox3
(
const TFrame3< RealType >& FrameIn, |
Create oriented box with given Frame and Extents | OrientedBoxTypes.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Extents | TVector< RealType > | Half-dimensions of box measured along the three axes | OrientedBoxTypes.h | |
| Frame | TFrame3< RealType > | 3D position (center) and orientation (axes) of the box | OrientedBoxTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TVector< RealType > AxisX() |
OrientedBoxTypes.h | ||
TVector< RealType > AxisY() |
OrientedBoxTypes.h | ||
TVector< RealType > AxisZ() |
OrientedBoxTypes.h | ||
TVector< RealType > Center() |
OrientedBoxTypes.h | ||
| Find closest point on box | OrientedBoxTypes.h | ||
bool Contains
(
const TVector< RealType >& Point |
OrientedBoxTypes.h | ||
TVector< RealType > Diagonal() |
OrientedBoxTypes.h | ||
RealType DistanceSquared
(
TVector< RealType > Point |
Find squared distance to box. | OrientedBoxTypes.h | |
void EnumerateCorners
(
PointFuncType CornerPointFunc |
Call CornerPointFunc(FVector3) for each of the 8 box corners. | OrientedBoxTypes.h | |
TVector< RealType > GetAxis
(
int AxisIndex |
OrientedBoxTypes.h | ||
| Corners [ (-x,-y), (x,-y), (x,y), (-x,y) ], -z, then +z | OrientedBoxTypes.h | ||
bool Intersects
(
const TAxisAlignedBox3< RealType >& OtherBox, |
OrientedBoxTypes.h | ||
bool Intersects
(
const TOrientedBox3& OtherBox, |
OrientedBoxTypes.h | ||
bool IsValid() |
OrientedBoxTypes.h | ||
TOrientedBox3< RealType > Merge
(
const TOrientedBox3< RealType >& Other, |
Create a merged TOrientedBox, encompassing this box and one other. | OrientedBoxTypes.h | |
TOrientedBox3< RealType > ReparameterizedCloserToWorldFrame() |
Transform the frame of the oriented box so its local axes are closer to the corresponding world axes (Does not change the shape of the box, just re-orders the axes if needed) | OrientedBoxTypes.h | |
RealType SignedDistance
(
TVector< RealType > Point |
Find signed distance to box surface | OrientedBoxTypes.h | |
RealType SurfaceArea() |
OrientedBoxTypes.h | ||
bool TestCorners
(
PointPredicateType CornerPointPredicate |
Call CornerPointPredicate(FVector3) for each of the 8 box corners, with early-out if any call returns false | OrientedBoxTypes.h | |
RealType Volume() |
OrientedBoxTypes.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FIndex3i GetCornerSide
(
int Index |
Get whether the corner at Index (see diagram in GetCorner documentation comment) is in the negative or positive direction for each axis | OrientedBoxTypes.h | |
static TOrientedBox3< RealType > UnitPositive() |
OrientedBoxTypes.h | ||
static TOrientedBox3< RealType > UnitZeroCentered() |
OrientedBoxTypes.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator FOrientedBox() |
Convert to CoreMath's FOrientedBox. | OrientedBoxTypes.h |