Skip to content

Fixed Sphere

Struct · FFixedSphere

#include "Types/Sphere.h"

deterministic: safe in simulation code

Sphere using fixed-point arithmetic. Represents a sphere defined by center and radius.

FFixedVector Center

Editable in defaults and on instances · Blueprint read and write

Center of the sphere.

FFixedPoint Radius

Editable in defaults and on instances · Blueprint read and write

Radius of the sphere.

C++ members (20)
  • static FFixedSphere FromSphere(const FSphere& Sphere); Converts from Unreal’s FSphere.
  • FSphere ToSphere() const; Converts to Unreal’s FSphere.
  • FFixedPoint GetVolume() const; Returns the volume of the sphere (4/3 * Pi * r^3).
  • FFixedPoint GetSurfaceArea() const; Returns the surface area of the sphere (4 * Pi * r^2).
  • bool Contains(const FFixedVector& Point) const; Returns true if the sphere contains the given point.
  • bool Intersects(const FFixedSphere& Other) const; Returns true if this sphere intersects with another sphere.
  • bool IsInside(const FFixedSphere& Other) const; Returns true if this sphere is inside another sphere.
  • FFixedPoint GetDistanceToPoint(const FFixedVector& Point) const; Returns the distance from the sphere surface to a point (negative if inside).
  • FFixedVector GetClosestPoint(const FFixedVector& Point) const; Returns the closest point on the sphere surface to the given point.
  • FFixedSphere& ExpandToInclude(const FFixedVector& Point); Expands the sphere to include the given point.
  • FFixedSphere& ExpandToInclude(const FFixedSphere& Other); Expands the sphere to include another sphere.
  • FFixedSphere& Expand(FFixedPoint Amount); Expands the sphere radius by a given amount.
  • FFixedSphere GetExpanded(FFixedPoint Amount) const; Returns an expanded copy of the sphere.
  • FFixedSphere& Translate(const FFixedVector& Offset); Translates the sphere by a vector.
  • FFixedSphere GetTranslated(const FFixedVector& Offset) const; Returns a translated copy of the sphere.
  • bool operator==(const FFixedSphere& Other) const;
  • bool operator!=(const FFixedSphere& Other) const;
  • FFixedSphere operator+(const FFixedVector& Offset) const;
  • FFixedSphere& operator+=(const FFixedVector& Offset);
  • FString ToString() const;