FSphere

Implements a basic sphere.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Math/Sphere.h"

Syntax

class FSphere

Remarks

Implements a basic sphere.

Variables

Name Description

Public variable

FVector

 

Center

The sphere's center point.

Public variable

float

 

W

The sphere's radius.

Constructors

Name Description

Public function

FSphere()

Default constructor (no initialization).

Public function

FSphere

(
    int32
)

Creates and initializes a new sphere.

Public function

FSphere

(
    EForceInit
)

Constructor.

Public function

FSphere

(
    FVector InV,
    float InW
)

Creates and initializes a new sphere with the specified parameters.

Public function

FSphere

(
    const FVector* Pts,
    int32 Count
)

Constructor.

Functions

Name Description

Public function Const

bool

 

Equals

(
    const FSphere& Sphere,
    float Tolerance
)

Check whether two spheres are the same within specified tolerance.

Public function Const

float

 

GetVolume()

Get volume of the current sphere

Public function Const

bool

 

Intersects

(
    const FSphere& Other,
    float Tolerance
)

Test whether this sphere intersects another.

Public function Const

bool

 

IsInside

(
    const FSphere& Other,
    float Tolerance
)

Check whether sphere is inside of another.

Public function Const

bool

 

IsInside

(
    const FVector& In,
    float Tolerance
)

Checks whether the given location is inside this sphere.

Public function Const

FSphere

 

TransformBy

(
    const FMatrix& M
)

Get result of Transforming sphere by Matrix.

Public function Const

FSphere

 

TransformBy

(
    const FTransform& M
)

Get result of Transforming sphere with Transform.

Operators

Name Description

Public function Const

FSphere

 

operator+

(
    const FSphere& Other
)

Gets the result of addition to this bounding volume.

Public function

FSphere &

 

operator+=

(
    const FSphere& Other
)

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

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