#include <Box2D.h>
◆ FReal
◆ TBox2() [1/6]
Default constructor (no initialization).
◆ TBox2() [2/6]
Creates and initializes a new box.
The box extents are initialized to zero and the box is marked as invalid.
- Parameters
-
| EForceInit | Force Init Enum. |
◆ TBox2() [3/6]
Creates and initializes a new box from the specified parameters.
- Parameters
-
| InMin | The box's minimum point. |
| InMax | The box's maximum point. |
◆ TBox2() [4/6]
Creates and initializes a new box from the given set of points.
- Parameters
-
| Points | Array of Points to create for the bounding volume. |
| Count | The number of points. |
◆ TBox2() [5/6]
Creates and initializes a new box from an array of points.
- Parameters
-
| Points | Array of Points to create for the bounding volume. |
◆ TBox2() [6/6]
◆ BuildAABB()
Utility function to build an AABB from Origin and Extent
- Parameters
-
| Origin | The location of the bounding box. |
| Extent | Half size of the bounding box. |
- Returns
- A new axis-aligned bounding box.
◆ ComputeSquaredDistanceToPoint()
Calculates the distance of a point to this box.
- Parameters
-
- Returns
- The distance.
◆ Equals()
Checks for equality with error-tolerant comparison.
- Parameters
-
| Other | The box to compare. |
| Tolerance | Error tolerance. |
- Returns
- true if the boxes are equal within specified tolerance, otherwise false.
◆ ExpandBy() [1/2]
Increase the bounding box volume.
- Parameters
-
| W | The size to increase volume by. |
- Returns
- A new bounding box increased in size.
◆ ExpandBy() [2/2]
Returns a box of increased size.
- Parameters
-
| V | The size to increase the volume by. |
- Returns
- A new bounding box.
◆ GetArea()
◆ GetCenter()
◆ GetCenterAndExtents()
Get the center and extents
- Parameters
-
| center[out] | reference to center point |
| Extents[out] | reference to the extent around the center |
- See also
- GetArea, GetCenter, GetExtent, GetSize
◆ GetClosestPointTo()
Calculates the closest point on or inside the box to a given point in space.
- Parameters
-
- Returns
- The closest point on or inside the box.
◆ GetExtent()
◆ GetSize()
◆ Init()
Set the initial values of the bounding box to Zero.
◆ Intersect()
Checks whether the given box intersects this box.
- Parameters
-
| Other | bounding box to test intersection |
- Returns
- true if boxes intersect, false otherwise.
◆ IsInside() [1/2]
Checks whether the given box is fully encapsulated by this box.
- Parameters
-
| Other | The box to test for encapsulation within the bounding volume. |
- Returns
- true if box is inside this volume, false otherwise.
◆ IsInside() [2/2]
Checks whether the given point is inside this box.
- Parameters
-
- Returns
- true if the point is inside this box, otherwise false.
◆ IsInsideOrOn()
Checks whether the given point is inside or on this box.
- Parameters
-
- Returns
- true if point is inside or on this box, otherwise false.
- See also
- IsInside
◆ MoveTo()
Returns a box with its center moved to the new destination.
- Parameters
-
| Destination | The destination point to move center of box to. |
- Returns
- A new bounding box.
◆ operator!=()
Compares two boxes for inequality.
- Parameters
-
| Other | The other box to compare with. |
- Returns
- true if the boxes are not equal, false otherwise.
◆ operator+() [1/2]
Gets the result of addition to this bounding volume.
- Parameters
-
| Other | The other volume to add to this. |
- Returns
- A new bounding volume.
◆ operator+() [2/2]
Gets the result of addition to this bounding volume.
- Parameters
-
| Other | The other point to add to this. |
- Returns
- A new bounding volume.
◆ operator+=() [1/2]
Adds to this bounding box to include a new bounding volume.
- Parameters
-
| Other | The bounding volume to increase the bounding volume to. |
- Returns
- Reference to this bounding volume after resizing to include the other bounding volume.
◆ operator+=() [2/2]
Adds to this bounding box to include a given point.
- Parameters
-
| Other | The point to increase the bounding volume to. |
- Returns
- Reference to this bounding box after resizing to include the other point.
◆ operator==()
Compares two boxes for equality.
- Parameters
-
| Other | The other box to compare with. |
- Returns
- true if the boxes are equal, false otherwise.
◆ operator[]() [1/2]
Gets reference to the min or max of this bounding volume.
- Parameters
-
| Index | The index into points of the bounding volume. |
- Returns
- A reference to a point of the bounding volume.
◆ operator[]() [2/2]
Gets reference to the min or max of this bounding volume.
- Parameters
-
| Index | The index into points of the bounding volume. |
- Returns
- A const reference to a point of the bounding volume.
◆ Overlap()
Returns the overlap box of two boxes
- Parameters
-
| Other | The bounding box to test overlap |
- Returns
- the overlap box. Result will be invalid if they don't overlap
◆ Serialize()
◆ SerializeFromMismatchedTag()
◆ ShiftBy()
Shift bounding box position.
- Parameters
-
| The | offset vector to shift by. |
- Returns
- A new shifted bounding box.
◆ ToString()
Get a textual representation of this box.
- Returns
- A string describing the box.
◆ operator<<
Serializes the bounding box.
- Parameters
-
| Ar | The archive to serialize into. |
| Box | The box to serialize. |
- Returns
- Reference to the Archive after serialization.
◆ bIsValid
Holds a flag indicating whether this box is valid.
◆ Max
Holds the box's maximum point.
◆ Min
Holds the box's minimum point.
The documentation for this struct was generated from the following file:
- Engine/Source/Runtime/Core/Public/Math/Box2D.h