Implements a rectangular 2D Box. 更多...
#include <Box2D.h>
Public 成员函数 | |
| FORCEINLINE float | ComputeSquaredDistanceToPoint (const FVector2D &Point) const |
| Calculates the distance of a point to this box. 更多... | |
| FBox2D | ExpandBy (const float W) const |
| Increase the bounding box volume. 更多... | |
| FBox2D () | |
| Default constructor (no initialization). | |
| FBox2D (const FVector2D &InMin, const FVector2D &InMax) | |
| Creates and initializes a new box from the specified parameters. 更多... | |
| CORE_API | FBox2D (const FVector2D *Points, const int32 Count) |
| Creates and initializes a new box from the given set of points. 更多... | |
| CORE_API | FBox2D (const TArray< FVector2D > &Points) |
| Creates and initializes a new box from an array of points. 更多... | |
| FBox2D (EForceInit) | |
| Creates and initializes a new box. 更多... | |
| FBox2D (int32) | |
| Creates and initializes a new box. 更多... | |
| float | GetArea () const |
| Gets the box area. 更多... | |
| FVector2D | GetCenter () const |
| Gets the box's center point. 更多... | |
| void | GetCenterAndExtents (FVector2D ¢er, FVector2D &Extents) const |
| Get the center and extents 更多... | |
| FORCEINLINE FVector2D | GetClosestPointTo (const FVector2D &Point) const |
| Calculates the closest point on or inside the box to a given point in space. 更多... | |
| FVector2D | GetExtent () const |
| Gets the box extents around the center. 更多... | |
| FVector2D | GetSize () const |
| Gets the box size. 更多... | |
| void | Init () |
| Set the initial values of the bounding box to Zero. | |
| FORCEINLINE bool | Intersect (const FBox2D &other) const |
| Checks whether the given box intersects this box. 更多... | |
| bool | IsInside (const FBox2D &Other) const |
| Checks whether the given box is fully encapsulated by this box. 更多... | |
| bool | IsInside (const FVector2D &TestPoint) const |
| Checks whether the given point is inside this box. 更多... | |
| bool | operator!= (const FBox2D &Other) const |
| Compares two boxes for inequality. 更多... | |
| FBox2D | operator+ (const FBox2D &Other) const |
| Gets the result of addition to this bounding volume. 更多... | |
| FBox2D | operator+ (const FVector2D &Other) const |
| Gets the result of addition to this bounding volume. 更多... | |
| FORCEINLINE FBox2D & | operator+= (const FBox2D &Other) |
| Adds to this bounding box to include a new bounding volume. 更多... | |
| FORCEINLINE FBox2D & | operator+= (const FVector2D &Other) |
| Adds to this bounding box to include a given point. 更多... | |
| bool | operator== (const FBox2D &Other) const |
| Compares two boxes for equality. 更多... | |
| FVector2D & | operator[] (int32 Index) |
| Gets reference to the min or max of this bounding volume. 更多... | |
| FBox2D | ShiftBy (const FVector2D &Offset) const |
| Shift bounding box position. 更多... | |
| FString | ToString () const |
| Get a textual representation of this box. 更多... | |
Public 属性 | |
| bool | bIsValid |
| Holds a flag indicating whether this box is valid. | |
| FVector2D | Max |
| Holds the box's maximum point. | |
| FVector2D | Min |
| Holds the box's minimum point. | |
友元 | |
| FArchive & | operator<< (FArchive &Ar, FBox2D &Box) |
| Serializes the bounding box. 更多... | |
Implements a rectangular 2D Box.
|
inline |
Creates and initializes a new box.
The box extents are initialized to zero and the box is marked as invalid.
|
inlineexplicit |
Creates and initializes a new box.
The box extents are initialized to zero and the box is marked as invalid.
| EForceInit | Force Init Enum. |
Creates and initializes a new box from the specified parameters.
| InMin | The box's minimum point. |
| InMax | The box's maximum point. |
| CORE_API FBox2D::FBox2D | ( | const FVector2D * | Points, |
| const int32 | Count | ||
| ) |
Creates and initializes a new box from the given set of points.
| Points | Array of Points to create for the bounding volume. |
| Count | The number of points. |
Creates and initializes a new box from an array of points.
| Points | Array of Points to create for the bounding volume. |
|
inline |
Calculates the distance of a point to this box.
| Point | The point. |
|
inline |
Increase the bounding box volume.
| W | The size to increase volume by. |
|
inline |
|
inline |
Calculates the closest point on or inside the box to a given point in space.
| Point | The point in space. |
|
inline |
Gets the box extents around the center.
|
inline |
| FORCEINLINE bool FBox2D::Intersect | ( | const FBox2D & | other | ) | const |
Checks whether the given box intersects this box.
| other | bounding box to test intersection |
|
inline |
Checks whether the given box is fully encapsulated by this box.
| Other | The box to test for encapsulation within the bounding volume. |
|
inline |
Checks whether the given point is inside this box.
| Point | The point to test. |
|
inline |
Compares two boxes for inequality.
| Other | The other box to compare with. |
Gets the result of addition to this bounding volume.
| Other | The other volume to add to this. |
Gets the result of addition to this bounding volume.
| Other | The other point to add to this. |
Adds to this bounding box to include a new bounding volume.
| Other | The bounding volume to increase the bounding volume to. |
Adds to this bounding box to include a given point.
| Other | The point to increase the bounding volume to. |
|
inline |
Compares two boxes for equality.
| Other | The other box to compare with. |
|
inline |
Gets reference to the min or max of this bounding volume.
| Index | The index into points of the bounding volume. |
Shift bounding box position.
| The | offset vector to shift by. |
| FORCEINLINE FString FBox2D::ToString | ( | ) | const |
Get a textual representation of this box.
Serializes the bounding box.
| Ar | The archive to serialize into. |
| Box | The box to serialize. |