UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::TSphericalFibonacci< RealType > Class Template Reference

#include <SphericalFibonacci.h>

Public Member Functions

 TSphericalFibonacci (int32 NumPoints=64)
 
int32 Num () const
 
TVector< RealType > Point (int32 Index) const
 
TVector< RealType > operator[] (int32 Index) const
 
int32 FindIndex (const TVector< RealType > &P)
 

Public Attributes

int32 N = 64
 

Static Protected Member Functions

static RealType MultiplyAddFrac (RealType a, RealType b)
 

Detailed Description

template<typename RealType>
class UE::Geometry::TSphericalFibonacci< RealType >

A Spherical Fibonacci (SF) Point Set is a set of points that are roughly evenly distributed on a sphere. The points lie on a spiral, see https://dl.acm.org/doi/10.1145/2816795.2818131 for more information. The i-th SF point an N-point set can be calculated directly. For a given (normalized) point P, finding the nearest SF point (ie mapping back to i) can be done in constant time.

Z is "up" in the sphere.

Constructor & Destructor Documentation

◆ TSphericalFibonacci()

template<typename RealType >
UE::Geometry::TSphericalFibonacci< RealType >::TSphericalFibonacci ( int32  NumPoints = 64)
inline

Member Function Documentation

◆ FindIndex()

template<typename RealType >
int32 UE::Geometry::TSphericalFibonacci< RealType >::FindIndex ( const TVector< RealType > &  P)
inline
Returns
Index of the sphere point closest to the given point P

◆ MultiplyAddFrac()

template<typename RealType >
static RealType UE::Geometry::TSphericalFibonacci< RealType >::MultiplyAddFrac ( RealType  a,
RealType  b 
)
inlinestaticprotected

◆ Num()

template<typename RealType >
int32 UE::Geometry::TSphericalFibonacci< RealType >::Num ( ) const
inline

◆ operator[]()

template<typename RealType >
TVector< RealType > UE::Geometry::TSphericalFibonacci< RealType >::operator[] ( int32  Index) const
inline
Parameters
Indexpoint index in range [0,Num()-1]
Returns
sphere point for given Index

◆ Point()

template<typename RealType >
TVector< RealType > UE::Geometry::TSphericalFibonacci< RealType >::Point ( int32  Index) const
inline
Parameters
Indexpoint index in range [0,Num()-1]
Returns
sphere point for given Index

Member Data Documentation

◆ N

template<typename RealType >
int32 UE::Geometry::TSphericalFibonacci< RealType >::N = 64

The documentation for this class was generated from the following file: