FBoxSphereBounds

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

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Math/BoxSphereBounds.h

Include

#include "Math/BoxSphereBounds.h"

Syntax

struct FBoxSphereBounds

Remarks

Structure for a combined axis aligned bounding box and bounding sphere with the same origin. (28 bytes).

Variables

Name Description

Public variable

FVector

 

BoxExtent

Holds the extent of the bounding box.

Public variable

FVector

 

Origin

Holds the origin of the bounding box and sphere.

Public variable

float

 

SphereRadius

Holds the radius of the bounding sphere.

Constructors

Name Description

Public function

FBoxSphereBounds()

Default constructor.

Public function

FBoxSphereBounds

(
    EForceInit
)

Creates and initializes a new instance.

Public function

FBoxSphereBounds

(
    const FBox& Box
)

Creates and initializes a new instance the given Box.

Public function

FBoxSphereBounds

(
    const FSphere& Sphere
)

Creates and initializes a new instance for the given sphere.

Public function

FBoxSphereBounds

(
    const FBox& Box,
    const FSphere& Sphere
)

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

Public function

FBoxSphereBounds

(
    const FVector* Points,
    uint32 NumPoints
)

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

Public function

FBoxSphereBounds

(
    const FVector& InOrigin,
    const FVector& InBoxExtent,
    float InSphereRadius
)

Creates and initializes a new instance from the specified parameters.

Functions

Name Description

Public function Static

bool

 

BoxesIntersect

(
    const FBoxSphereBounds& A,
    const FBoxSphereBounds& B
)

Test whether the boxes from two BoxSphereBounds intersect/overlap.

Public function Const

float

 

ComputeSquaredDistanceFromBoxToPoint

(
    const FVector& Point
)

Calculates the squared distance from a point to a bounding box

Public function Const

bool

 

ContainsNaN()

Public function Const

void

 

DiagnosticCheckNaN()

Public function Const

FBoxSphereBo...

 

ExpandBy

(
    float ExpandAmount
)

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

Public function Const

FBox

 

GetBox()

Gets the bounding box.

Public function Const

FVector

 

GetBoxExtrema

(
    uint32 Extrema
)

Gets the extrema for the bounding box.

Public function Const

FSphere

 

GetSphere()

Gets the bounding sphere.

Public function Static

bool

 

SpheresIntersect

(
    const FBoxSphereBounds& A,
    const FBoxSphereBounds& B,
    float Tolerance
)

Test whether the spheres from two BoxSphereBounds intersect/overlap.

Public function Const

FString

 

ToString()

Get a textual representation of this bounding box.

Public function Const

FBoxSphereBo...

 

TransformBy

(
    const FMatrix& M
)

Gets a bounding volume transformed by a matrix.

Public function Const

FBoxSphereBo...

 

TransformBy

(
    const FTransform& M
)

Gets a bounding volume transformed by a FTransform object.

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FBoxSphereBounds& Other
)

Compare bounding volume this and Other.

Public function Const

FBoxSphereBo...

 

operator+

(
    const FBoxSphereBounds& Other
)

Constructs a bounding volume containing both this and B.

Public function Const

bool

 

operator==

(
    const FBoxSphereBounds& Other
)

Compare bounding volume this and Other.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss