Navigation
API > API/Runtime > API/Runtime/GeometryCore
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/OrientedBoxTypes.h |
| Include | #include "OrientedBoxTypes.h" |
| Source | /Engine/Source/Runtime/GeometryCore/Public/Intersection/IntersectionQueries3.h |
Syntax
template<typename RealType>
struct TOrientedBox3
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TVector< RealType > | Extents | Half-dimensions of box measured along the three axes | |
| TFrame3< RealType > | Frame | 3D position (center) and orientation (axes) of the box |
Constructors
| Type | Name | Description | |
|---|---|---|---|
TOrientedBox3
(
const TAxisAlignedBox3< RealType >& AxisBox |
Create oriented box from axis-aligned box | ||
TOrientedBox3
(
const TVector< RealType >& Origin, |
Create axis-aligned box with given Origin and Extents | ||
TOrientedBox3
(
const TFrame3< RealType >& FrameIn, |
Create oriented box with given Frame and Extents |
Functions
| Type | Name | Description | |
|---|---|---|---|
| TVector< RealType > | AxisX () |
||
| TVector< RealType > | AxisY () |
||
| TVector< RealType > | AxisZ () |
||
| TVector< RealType > | Center () |
||
| TVector< RealType > | ClosestPoint
(
const TVector< RealType >& Point |
Find closest point on box | |
| bool | |||
| TVector< RealType > | Diagonal () |
||
| RealType | DistanceSquared
(
TVector< RealType > Point |
Find squared distance to box. | |
| void | EnumerateCorners
(
PointFuncType CornerPointFunc |
Call CornerPointFunc(FVector3) for each of the 8 box corners. | |
| TVector< RealType > | GetAxis
(
int AxisIndex |
||
| TVector< RealType > | GetCorner
(
int Index |
Corners [ (-x,-y), (x,-y), (x,y), (-x,y) ], -z, then +z | |
| 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 | |
| TOrientedBox3< RealType > | Merge
(
const TOrientedBox3< RealType >& Other, |
Create a merged TOrientedBox, encompassing this box and one other. | |
| RealType | SignedDistance
(
TVector< RealType > Point |
Find signed distance to box surface | |
| RealType | SurfaceArea () |
||
| bool | TestCorners
(
PointPredicateType CornerPointPredicate |
Call CornerPointPredicate(FVector3) for each of the 8 box corners, with early-out if any call returns false | |
| TOrientedBox3< RealType > | UnitPositive () |
||
| TOrientedBox3< RealType > | |||
| RealType | Volume () |