#include <OrientedBoxTypes.h>
◆ TOrientedBox2() [1/5]
◆ TOrientedBox2() [2/5]
Create axis-aligned box with given Origin and Extents
◆ TOrientedBox2() [3/5]
Create oriented box with given Origin, X Axis and Extents
◆ TOrientedBox2() [4/5]
Create oriented box with given Origin, Angle (in radians) and Extents
◆ TOrientedBox2() [5/5]
Create oriented box from axis-aligned box
◆ Area()
◆ AxisX()
◆ AxisY()
- Returns
- Y axis of the box (the X axis rotated 90 degrees counter-clockwise)
◆ Center()
◆ ClosestPoint()
Find closest point on box
- Parameters
-
- Returns
- Closest point on box. Input point is returned if it is inside box.
◆ Contains()
- Returns
- true if box contains point
◆ Diagonal()
- Returns
- vector from minimum-corner to maximum-corner of box
◆ DistanceSquared()
Find squared distance to box.
- Parameters
-
- Returns
- Squared distance from point to box, or 0 if point is inside box
◆ EnumerateCorners()
Call CornerPointFunc(TVector2<RealType>) for each of the 4 box corners. Order is the same as GetCorner(X).
◆ FromLocalSpace()
- Returns
- Point transformed from the local space of the box (Origin at box center, Axes aligned to box)
◆ GetAxis()
- Returns
- an axis of the box
◆ GetCorner()
- Parameters
-
| Index | corner index in range 0-3 |
- Returns
- Corner point on the box identified by the given index. Ordering is: [ (-x,-y), (x,-y), (x,y), (-x,y) ]
◆ GetCornerSide()
Get whether the corner at Index (see GetCorner documentation comment) is in the negative or positive direction for each axis
- Parameters
-
| Index | corner index in range 0-4 |
- Returns
- Index2i with 0 or 1 for each axis, 0 if corner is in the negative direction for that axis, 1 if in the positive direction
◆ Perimeter()
◆ SetAngleRadians()
◆ TestCorners()
Call CornerPointPredicate(TVector2<RealType>) for each of the 4 box corners, with early-out if any call returns false
- Returns
- true if all tests pass
◆ ToLocalSpace()
- Returns
- Point transformed to the local space of the box (Origin at box center, Axes aligned to box)
◆ UnitPositive()
- Returns
- box with unit dimensions where minimum corner is at origin
◆ UnitZeroCentered()
- Returns
- box with unit dimensions centered at origin
◆ Extents
Half-dimensions of box measured along the two axes
◆ Origin
◆ UnitAxisX
The documentation for this struct was generated from the following file: