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

Structure for a combined axis aligned bounding box and bounding sphere with the same origin. 更多...

#include <BoxSphereBounds.h>

Public 成员函数

FORCEINLINE float ComputeSquaredDistanceFromBoxToPoint (const FVector &Point) const
 Calculates the squared distance from a point to a bounding box 更多...
 
FORCEINLINE FBoxSphereBounds ExpandBy (float ExpandAmount) const
 Increase the size of the box and sphere by a given size. 更多...
 
 FBoxSphereBounds ()
 Default constructor.
 
 FBoxSphereBounds (const FBox &Box)
 Creates and initializes a new instance the given Box. 更多...
 
 FBoxSphereBounds (const FBox &Box, const FSphere &Sphere)
 Creates and initializes a new instance from the given Box and Sphere. 更多...
 
 FBoxSphereBounds (const FSphere &Sphere)
 Creates and initializes a new instance for the given sphere.
 
 FBoxSphereBounds (const FVector &InOrigin, const FVector &InBoxExtent, float InSphereRadius)
 Creates and initializes a new instance from the specified parameters. 更多...
 
 FBoxSphereBounds (const FVector *Points, uint32 NumPoints)
 Creates and initializes a new instance from the given set of points. 更多...
 
FORCEINLINE FBoxSphereBounds (EForceInit)
 Creates and initializes a new instance. 更多...
 
FORCEINLINE FBox GetBox () const
 Gets the bounding box. 更多...
 
FVector GetBoxExtrema (uint32 Extrema) const
 Gets the extrema for the bounding box. 更多...
 
FORCEINLINE FSphere GetSphere () const
 Gets the bounding sphere. 更多...
 
FORCEINLINE bool operator!= (const FBoxSphereBounds &Other) const
 Compare bounding volume this and Other. 更多...
 
FORCEINLINE FBoxSphereBounds operator+ (const FBoxSphereBounds &Other) const
 Constructs a bounding volume containing both this and B. 更多...
 
FORCEINLINE bool operator== (const FBoxSphereBounds &Other) const
 Compare bounding volume this and Other. 更多...
 
FString ToString () const
 Get a textual representation of this bounding box. 更多...
 
CORE_API FBoxSphereBounds TransformBy (const FMatrix &M) const
 Gets a bounding volume transformed by a matrix. 更多...
 
CORE_API FBoxSphereBounds TransformBy (const FTransform &M) const
 Gets a bounding volume transformed by a FTransform object. 更多...
 

静态 Public 成员函数

static FORCEINLINE bool BoxesIntersect (const FBoxSphereBounds &A, const FBoxSphereBounds &B)
 Test whether the boxes from two BoxSphereBounds intersect/overlap. 更多...
 
static FORCEINLINE bool SpheresIntersect (const FBoxSphereBounds &A, const FBoxSphereBounds &B, float Tolerance=KINDA_SMALL_NUMBER)
 Test whether the spheres from two BoxSphereBounds intersect/overlap. 更多...
 

Public 属性

FVector BoxExtent
 Holds the extent of the bounding box.
 
FVector Origin
 Holds the origin of the bounding box and sphere.
 
float SphereRadius
 Holds the radius of the bounding sphere.
 

友元

FArchive & operator<< (FArchive &Ar, FBoxSphereBounds &Bounds)
 Serializes the given bounding volume from or into the specified archive. 更多...
 
FBoxSphereBounds Union (const FBoxSphereBounds &A, const FBoxSphereBounds &B)
 Constructs a bounding volume containing both A and B. 更多...
 

详细描述

Structure for a combined axis aligned bounding box and bounding sphere with the same origin.

(28 bytes).

构造及析构函数说明

◆ FBoxSphereBounds() [1/5]

FORCEINLINE FBoxSphereBounds::FBoxSphereBounds ( EForceInit  )
inlineexplicit

Creates and initializes a new instance.

参数
EForceInitForce Init Enum.

◆ FBoxSphereBounds() [2/5]

FBoxSphereBounds::FBoxSphereBounds ( const FVector &  InOrigin,
const FVector &  InBoxExtent,
float  InSphereRadius 
)
inline

Creates and initializes a new instance from the specified parameters.

参数
InOriginorigin of the bounding box and sphere.
InBoxExtenthalf size of box.
InSphereRadiusradius of the sphere.

◆ FBoxSphereBounds() [3/5]

FBoxSphereBounds::FBoxSphereBounds ( const FBox &  Box,
const FSphere &  Sphere 
)
inline

Creates and initializes a new instance from the given Box and Sphere.

参数
BoxThe bounding box.
SphereThe bounding sphere.

◆ FBoxSphereBounds() [4/5]

FBoxSphereBounds::FBoxSphereBounds ( const FBox &  Box)
inline

Creates and initializes a new instance the given Box.

The sphere radius is taken from the extent of the box.

参数
BoxThe bounding box.

◆ FBoxSphereBounds() [5/5]

FORCEINLINE FBoxSphereBounds::FBoxSphereBounds ( const FVector *  Points,
uint32  NumPoints 
)

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

The sphere radius is taken from the extent of the box.

参数
PointsThe points to be considered for the bounding box.
NumPointsNumber of points in the Points array.

成员函数说明

◆ BoxesIntersect()

static FORCEINLINE bool FBoxSphereBounds::BoxesIntersect ( const FBoxSphereBounds &  A,
const FBoxSphereBounds &  B 
)
inlinestatic

Test whether the boxes from two BoxSphereBounds intersect/overlap.

参数
AFirst BoxSphereBounds to test.
BSecond BoxSphereBounds to test.
返回
true if boxes intersect, false otherwise.

◆ ComputeSquaredDistanceFromBoxToPoint()

FORCEINLINE float FBoxSphereBounds::ComputeSquaredDistanceFromBoxToPoint ( const FVector &  Point) const
inline

Calculates the squared distance from a point to a bounding box

参数
PointThe point.
返回
The distance.

◆ ExpandBy()

FORCEINLINE FBoxSphereBounds FBoxSphereBounds::ExpandBy ( float  ExpandAmount) const
inline

Increase the size of the box and sphere by a given size.

参数
ExpandAmountThe size to increase by.
返回
A new box with the expanded size.

◆ GetBox()

FORCEINLINE FBox FBoxSphereBounds::GetBox ( ) const
inline

Gets the bounding box.

返回
The bounding box.

◆ GetBoxExtrema()

FVector FBoxSphereBounds::GetBoxExtrema ( uint32  Extrema) const
inline

Gets the extrema for the bounding box.

参数
Extrema1 for positive extrema from the origin, else negative
返回
The boxes extrema

◆ GetSphere()

FORCEINLINE FSphere FBoxSphereBounds::GetSphere ( ) const
inline

Gets the bounding sphere.

返回
The bounding sphere.

◆ operator!=()

FORCEINLINE bool FBoxSphereBounds::operator!= ( const FBoxSphereBounds &  Other) const

Compare bounding volume this and Other.

参数
OtherThe other bounding volume.
返回
true of they do not match.

◆ operator+()

FORCEINLINE FBoxSphereBounds FBoxSphereBounds::operator+ ( const FBoxSphereBounds &  Other) const

Constructs a bounding volume containing both this and B.

参数
OtherThe other bounding volume.
返回
The combined bounding volume.

◆ operator==()

FORCEINLINE bool FBoxSphereBounds::operator== ( const FBoxSphereBounds &  Other) const

Compare bounding volume this and Other.

参数
OtherThe other bounding volume.
返回
true of they match.

◆ SpheresIntersect()

static FORCEINLINE bool FBoxSphereBounds::SpheresIntersect ( const FBoxSphereBounds &  A,
const FBoxSphereBounds &  B,
float  Tolerance = KINDA_SMALL_NUMBER 
)
inlinestatic

Test whether the spheres from two BoxSphereBounds intersect/overlap.

参数
AFirst BoxSphereBounds to test.
BSecond BoxSphereBounds to test.
ToleranceError tolerance added to test distance.
返回
true if spheres intersect, false otherwise.

◆ ToString()

FORCEINLINE FString FBoxSphereBounds::ToString ( ) const

Get a textual representation of this bounding box.

返回
Text describing the bounding box.

◆ TransformBy() [1/2]

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

Gets a bounding volume transformed by a matrix.

参数
MThe matrix.
返回
The transformed volume.

◆ TransformBy() [2/2]

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

Gets a bounding volume transformed by a FTransform object.

参数
MThe FTransform object.
返回
The transformed volume.

友元及相关函数文档

◆ operator<<

FArchive & operator<< ( FArchive &  Ar,
FBoxSphereBounds &  Bounds 
)
friend

Serializes the given bounding volume from or into the specified archive.

参数
ArThe archive to serialize from or into.
BoundsThe bounding volume to serialize.
返回
The archive..

◆ Union

FBoxSphereBounds Union ( const FBoxSphereBounds &  A,
const FBoxSphereBounds &  B 
)
friend

Constructs a bounding volume containing both A and B.

This is a legacy version of the function used to compute primitive bounds, to avoid the need to rebuild lighting after the change.


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