engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | 友元 | 所有成员列表
FBox结构体 参考

Implements an axis-aligned box. 更多...

#include <Box.h>

被 TBVTree< InElementType, InAllocator >::FElementBox 继承.

Public 成员函数

FORCEINLINE float ComputeSquaredDistanceToPoint (const FVector &Point) const
 Calculates the distance of a point to this box. 更多...
 
FBox ExpandBy (const FVector &Neg, const FVector &Pos) const
 Increases the box size. 更多...
 
FORCEINLINE FBox ExpandBy (const FVector &V) const
 Increases the box size. 更多...
 
FORCEINLINE FBox ExpandBy (float W) const
 Increases the box size. 更多...
 
 FBox ()
 Default constructor (no initialization).
 
 FBox (const FVector &InMin, const FVector &InMax)
 Creates and initializes a new box from the specified extents. 更多...
 
CORE_API FBox (const FVector *Points, int32 Count)
 Creates and initializes a new box from the given set of points. 更多...
 
CORE_API FBox (const TArray< FVector > &Points)
 Creates and initializes a new box from an array of points. 更多...
 
 FBox (EForceInit)
 Creates and initializes a new box with zero extent and marks it as invalid. 更多...
 
FORCEINLINE FVector GetCenter () const
 Gets the center point of this box. 更多...
 
FORCEINLINE void GetCenterAndExtents (FVector &center, FVector &Extents) const
 Gets the center and extents of this box. 更多...
 
FORCEINLINE FVector GetClosestPointTo (const FVector &Point) const
 Calculates the closest point on or inside the box to a given point in space. 更多...
 
FORCEINLINE FVector GetExtent () const
 Gets the extents of this box. 更多...
 
FORCEINLINE FVector GetSize () const
 Gets the size of this box. 更多...
 
FORCEINLINE float GetVolume () const
 Gets the volume of this box. 更多...
 
FORCEINLINE void Init ()
 Set the initial values of the bounding box to Zero.
 
FORCEINLINE bool Intersect (const FBox &other) const
 Checks whether the given bounding box intersects this bounding box. 更多...
 
FORCEINLINE bool IntersectXY (const FBox &Other) const
 Checks whether the given bounding box intersects this bounding box in the XY plane. 更多...
 
CORE_API FBox InverseTransformBy (const FTransform &M) const
 Gets a bounding volume transformed by an inverted FTransform object. 更多...
 
FORCEINLINE bool IsInside (const FBox &Other) const
 Checks whether a given box is fully encapsulated by this box. 更多...
 
FORCEINLINE bool IsInside (const FVector &In) const
 Checks whether the given location is inside this box. 更多...
 
FORCEINLINE bool IsInsideOrOn (const FVector &In) const
 Checks whether the given location is inside or on this box. 更多...
 
FORCEINLINE bool IsInsideXY (const FBox &Other) const
 Checks whether the given box is fully encapsulated by this box in the XY plane. 更多...
 
FORCEINLINE bool IsInsideXY (const FVector &In) const
 Checks whether the given location is inside this box in the XY plane. 更多...
 
FORCEINLINE FBox MoveTo (const FVector &Destination) const
 Moves the center of bounding box to new destination. 更多...
 
FORCEINLINE FBox operator+ (const FBox &Other) const
 Gets the result of addition to this bounding volume. 更多...
 
FORCEINLINE FBox operator+ (const FVector &Other) const
 Gets the result of addition to this bounding volume. 更多...
 
FORCEINLINE FBox & operator+= (const FBox &Other)
 Adds to this bounding box to include a new bounding volume. 更多...
 
FORCEINLINE FBox & operator+= (const FVector &Other)
 Adds to this bounding box to include a given point. 更多...
 
FORCEINLINE bool operator== (const FBox &Other) const
 Compares two boxes for equality. 更多...
 
FORCEINLINE FVector & operator[] (int32 Index)
 Gets reference to the min or max of this bounding volume. 更多...
 
CORE_API FBox Overlap (const FBox &Other) const
 Returns the overlap FBox of two box 更多...
 
FORCEINLINE FBox ShiftBy (const FVector &Offset) const
 Shifts the bounding box position. 更多...
 
FString ToString () const
 Get a textual representation of this box. 更多...
 
CORE_API FBox TransformBy (const FMatrix &M) const
 Gets a bounding volume transformed by a matrix. 更多...
 
CORE_API FBox TransformBy (const FTransform &M) const
 Gets a bounding volume transformed by a FTransform object. 更多...
 
CORE_API FBox TransformProjectBy (const FMatrix &ProjM) const
 Transforms and projects a world bounding box to screen space 更多...
 

静态 Public 成员函数

static FBox BuildAABB (const FVector &Origin, const FVector &Extent)
 Utility function to build an AABB from Origin and Extent 更多...
 

Public 属性

uint8 IsValid
 Holds a flag indicating whether this box is valid.
 
FVector Max
 Holds the box's maximum point.
 
FVector Min
 Holds the box's minimum point.
 

友元

FArchive & operator<< (FArchive &Ar, FBox &Box)
 Serializes the bounding box. 更多...
 
void operator<< (FStructuredArchive::FSlot Slot, FBox &Box)
 Serializes the bounding box. 更多...
 

详细描述

Implements an axis-aligned box.

Boxes describe an axis-aligned extent in three dimensions. They are used for many different things in the Engine and in games, such as bounding volumes, collision detection and visibility calculation.

构造及析构函数说明

◆ FBox() [1/4]

FBox::FBox ( EForceInit  )
inlineexplicit

Creates and initializes a new box with zero extent and marks it as invalid.

参数
EForceInitForce Init Enum.

◆ FBox() [2/4]

FBox::FBox ( const FVector &  InMin,
const FVector &  InMax 
)
inline

Creates and initializes a new box from the specified extents.

参数
InMinThe box's minimum point.
InMaxThe box's maximum point.

◆ FBox() [3/4]

CORE_API FBox::FBox ( const FVector *  Points,
int32  Count 
)

Creates and initializes a new box from the given set of points.

参数
PointsArray of Points to create for the bounding volume.
CountThe number of points.

◆ FBox() [4/4]

CORE_API FBox::FBox ( const TArray< FVector > &  Points)

Creates and initializes a new box from an array of points.

参数
PointsArray of Points to create for the bounding volume.

成员函数说明

◆ BuildAABB()

static FBox FBox::BuildAABB ( const FVector &  Origin,
const FVector &  Extent 
)
inlinestatic

Utility function to build an AABB from Origin and Extent

参数
OriginThe location of the bounding box.
ExtentHalf size of the bounding box.
返回
A new axis-aligned bounding box.

◆ ComputeSquaredDistanceToPoint()

FORCEINLINE float FBox::ComputeSquaredDistanceToPoint ( const FVector &  Point) const
inline

Calculates the distance of a point to this box.

参数
PointThe point.
返回
The distance.

◆ ExpandBy() [1/3]

FBox FBox::ExpandBy ( const FVector &  Neg,
const FVector &  Pos 
) const
inline

Increases the box size.

参数
NegThe size to increase the volume by in the negative direction (positive values move the bounds outwards)
PosThe size to increase the volume by in the positive direction (positive values move the bounds outwards)
返回
A new bounding box.

◆ ExpandBy() [2/3]

FORCEINLINE FBox FBox::ExpandBy ( const FVector &  V) const
inline

Increases the box size.

参数
VThe size to increase the volume by.
返回
A new bounding box.

◆ ExpandBy() [3/3]

FORCEINLINE FBox FBox::ExpandBy ( float  W) const
inline

Increases the box size.

参数
WThe size to increase the volume by.
返回
A new bounding box.

◆ GetCenter()

FORCEINLINE FVector FBox::GetCenter ( ) const
inline

Gets the center point of this box.

返回
The center point.
参见
GetCenterAndExtents, GetExtent, GetSize, GetVolume

◆ GetCenterAndExtents()

FORCEINLINE void FBox::GetCenterAndExtents ( FVector &  center,
FVector &  Extents 
) const
inline

Gets the center and extents of this box.

参数
center[out]Will contain the box center point.
Extents[out]Will contain the extent around the center.
参见
GetCenter, GetExtent, GetSize, GetVolume

◆ GetClosestPointTo()

FORCEINLINE FVector FBox::GetClosestPointTo ( const FVector &  Point) const

Calculates the closest point on or inside the box to a given point in space.

参数
PointThe point in space.
返回
The closest point on or inside the box.

◆ GetExtent()

FORCEINLINE FVector FBox::GetExtent ( ) const
inline

Gets the extents of this box.

返回
The box extents.
参见
GetCenter, GetCenterAndExtents, GetSize, GetVolume

◆ GetSize()

FORCEINLINE FVector FBox::GetSize ( ) const
inline

Gets the size of this box.

返回
The box size.
参见
GetCenter, GetCenterAndExtents, GetExtent, GetVolume

◆ GetVolume()

FORCEINLINE float FBox::GetVolume ( ) const
inline

Gets the volume of this box.

返回
The box volume.
参见
GetCenter, GetCenterAndExtents, GetExtent, GetSize

◆ Intersect()

FORCEINLINE bool FBox::Intersect ( const FBox &  other) const

Checks whether the given bounding box intersects this bounding box.

参数
OtherThe bounding box to intersect with.
返回
true if the boxes intersect, false otherwise.

◆ IntersectXY()

FORCEINLINE bool FBox::IntersectXY ( const FBox &  Other) const

Checks whether the given bounding box intersects this bounding box in the XY plane.

参数
OtherThe bounding box to test intersection.
返回
true if the boxes intersect in the XY Plane, false otherwise.

◆ InverseTransformBy()

CORE_API FBox FBox::InverseTransformBy ( const FTransform &  M) const

Gets a bounding volume transformed by an inverted FTransform object.

参数
MThe transformation object to perform the inversely transform this box with.
返回
The transformed box.

◆ IsInside() [1/2]

FORCEINLINE bool FBox::IsInside ( const FBox &  Other) const
inline

Checks whether a given box is fully encapsulated by this box.

参数
OtherThe box to test for encapsulation within the bounding volume.
返回
true if box is inside this volume.

◆ IsInside() [2/2]

FORCEINLINE bool FBox::IsInside ( const FVector &  In) const
inline

Checks whether the given location is inside this box.

参数
InThe location to test for inside the bounding volume.
返回
true if location is inside this volume.
参见
IsInsideXY

◆ IsInsideOrOn()

FORCEINLINE bool FBox::IsInsideOrOn ( const FVector &  In) const
inline

Checks whether the given location is inside or on this box.

参数
InThe location to test for inside the bounding volume.
返回
true if location is inside this volume.
参见
IsInsideXY

◆ IsInsideXY() [1/2]

FORCEINLINE bool FBox::IsInsideXY ( const FBox &  Other) const
inline

Checks whether the given box is fully encapsulated by this box in the XY plane.

参数
OtherThe box to test for encapsulation within the bounding box.
返回
true if box is inside this box in the XY plane.

◆ IsInsideXY() [2/2]

FORCEINLINE bool FBox::IsInsideXY ( const FVector &  In) const
inline

Checks whether the given location is inside this box in the XY plane.

参数
InThe location to test for inside the bounding box.
返回
true if location is inside this box in the XY plane.
参见
IsInside

◆ MoveTo()

FORCEINLINE FBox FBox::MoveTo ( const FVector &  Destination) const
inline

Moves the center of bounding box to new destination.

参数
Thedestination point to move center of box to.
返回
A new bounding box.

◆ operator+() [1/2]

FORCEINLINE FBox FBox::operator+ ( const FBox &  Other) const
inline

Gets the result of addition to this bounding volume.

参数
OtherThe other volume to add to this.
返回
A new bounding volume.

◆ operator+() [2/2]

FORCEINLINE FBox FBox::operator+ ( const FVector &  Other) const
inline

Gets the result of addition to this bounding volume.

参数
OtherThe other point to add to this.
返回
A new bounding volume.

◆ operator+=() [1/2]

FORCEINLINE FBox & FBox::operator+= ( const FBox &  Other)

Adds to this bounding box to include a new bounding volume.

参数
Otherthe bounding volume to increase the bounding volume to.
返回
Reference to this bounding volume after resizing to include the other bounding volume.

◆ operator+=() [2/2]

FORCEINLINE FBox & FBox::operator+= ( const FVector &  Other)

Adds to this bounding box to include a given point.

参数
Otherthe point to increase the bounding volume to.
返回
Reference to this bounding box after resizing to include the other point.

◆ operator==()

FORCEINLINE bool FBox::operator== ( const FBox &  Other) const
inline

Compares two boxes for equality.

返回
true if the boxes are equal, false otherwise.

◆ operator[]()

FORCEINLINE FVector & FBox::operator[] ( int32  Index)
inline

Gets reference to the min or max of this bounding volume.

参数
Indexthe index into points of the bounding volume.
返回
a reference to a point of the bounding volume.

◆ Overlap()

CORE_API FBox FBox::Overlap ( const FBox &  Other) const

Returns the overlap FBox of two box

参数
OtherThe bounding box to test overlap
返回
the overlap box. It can be 0 if they don't overlap

◆ ShiftBy()

FORCEINLINE FBox FBox::ShiftBy ( const FVector &  Offset) const
inline

Shifts the bounding box position.

参数
OffsetThe vector to shift the box by.
返回
A new bounding box.

◆ ToString()

FORCEINLINE FString FBox::ToString ( ) const

Get a textual representation of this box.

返回
A string describing the box.

◆ TransformBy() [1/2]

CORE_API FBox FBox::TransformBy ( const FMatrix &  M) const

Gets a bounding volume transformed by a matrix.

参数
MThe matrix to transform by.
返回
The transformed box.
参见
TransformProjectBy

◆ TransformBy() [2/2]

CORE_API FBox FBox::TransformBy ( const FTransform &  M) const

Gets a bounding volume transformed by a FTransform object.

参数
MThe transformation object.
返回
The transformed box.
参见
TransformProjectBy

◆ TransformProjectBy()

CORE_API FBox FBox::TransformProjectBy ( const FMatrix &  ProjM) const

Transforms and projects a world bounding box to screen space

参数
ProjMThe projection matrix.
返回
The transformed box.
参见
TransformBy

友元及相关函数文档

◆ operator<< [1/2]

FArchive & operator<< ( FArchive &  Ar,
FBox &  Box 
)
friend

Serializes the bounding box.

参数
ArThe archive to serialize into.
BoxThe box to serialize.
返回
Reference to the Archive after serialization.

◆ operator<< [2/2]

void operator<< ( FStructuredArchive::FSlot  Slot,
FBox &  Box 
)
friend

Serializes the bounding box.

参数
SlotThe structured archive slot to serialize into.
BoxThe box to serialize.

该结构体的文档由以下文件生成: