Navigation
API > API/Runtime > API/Runtime/GeometryCore
| Name | TOrientedBox2 |
| Type | struct |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/OrientedBoxTypes.h |
| Include Path | #include "OrientedBoxTypes.h" |
Syntax
template<typename RealType>
struct TOrientedBox2
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| OrientedBoxTypes.h | |||
TOrientedBox2
(
const TAxisAlignedBox2< RealType >& AxisBox |
Create oriented box from axis-aligned box | OrientedBoxTypes.h | |
TOrientedBox2
(
const TVector2< RealType >& OriginIn, |
Create axis-aligned box with given Origin and Extents | OrientedBoxTypes.h | |
TOrientedBox2
(
const TVector2< RealType >& OriginIn, |
Create oriented box with given Origin, X Axis and Extents | OrientedBoxTypes.h | |
TOrientedBox2
(
const TVector2< RealType >& OriginIn, |
Create oriented box with given Origin, Angle (in radians) and Extents | OrientedBoxTypes.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Extents | TVector2< RealType > | Half-dimensions of box measured along the two axes | OrientedBoxTypes.h | |
| Origin | TVector2< RealType > | Center of the box. | OrientedBoxTypes.h | |
| UnitAxisX | TVector2< RealType > | X Axis of the box must be normalized. | OrientedBoxTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
RealType Area() |
OrientedBoxTypes.h | ||
TVector2< RealType > AxisX() |
OrientedBoxTypes.h | ||
TVector2< RealType > AxisY() |
OrientedBoxTypes.h | ||
TVector2< RealType > Center() |
OrientedBoxTypes.h | ||
| Find closest point on box | OrientedBoxTypes.h | ||
bool Contains
(
const TVector2< RealType >& Point |
OrientedBoxTypes.h | ||
TVector2< RealType > Diagonal() |
OrientedBoxTypes.h | ||
RealType DistanceSquared
(
const TVector2< RealType >& Point |
Find squared distance to box. | OrientedBoxTypes.h | |
void EnumerateCorners
(
PointFuncType CornerPointFunc |
Call CornerPointFunc(TVector2 |
OrientedBoxTypes.h | |
| OrientedBoxTypes.h | |||
TVector2< RealType > GetAxis
(
int AxisIndex |
OrientedBoxTypes.h | ||
TVector2< RealType > GetCorner
(
int Index |
OrientedBoxTypes.h | ||
RealType Perimeter() |
OrientedBoxTypes.h | ||
void SetAngleRadians
(
RealType AngleRad |
OrientedBoxTypes.h | ||
bool TestCorners
(
PointPredicateType CornerPointPredicate |
Call CornerPointPredicate(TVector2 |
OrientedBoxTypes.h | |
| OrientedBoxTypes.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FIndex2i GetCornerSide
(
int Index |
Get whether the corner at Index (see GetCorner documentation comment) is in the negative or positive direction for each axis | OrientedBoxTypes.h | |
static TOrientedBox2< RealType > UnitPositive() |
OrientedBoxTypes.h | ||
static TOrientedBox2< RealType > UnitZeroCentered() |
OrientedBoxTypes.h |