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