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.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback