UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::TSphereSpecializeSamplingHelper< T, 3 > Struct Template Reference

#include <Sphere.h>

Static Public Member Functions

static FORCEINLINE void ComputeSamplePoints (TArray< TVec3< T > > &Points, const TSphere< T, 3 > &Sphere, const int32 NumPoints)
 
static FORCEINLINE void ComputeGoldenSpiralPoints (TArray< TVec3< T > > &Points, const TSphere< T, 3 > &Sphere, const int32 NumPoints, const bool FirstHalf=true, const bool SecondHalf=true, const int32 SpiralSeed=0)
 
static FORCEINLINE void ComputeGoldenSpiralPoints (TArray< TVec3< T > > &Points, const TVec3< T > &Center, const T Radius, const int32 NumPoints, const bool BottomHalf=true, const bool TopHalf=true, const int32 SpiralSeed=0)
 
static FORCEINLINE void ComputeBottomHalfSemiSphere (TArray< TVec3< T > > &Points, const TSphere< T, 3 > &Sphere, const int32 NumPoints, const int32 SpiralSeed=0)
 
static FORCEINLINE void ComputeTopHalfSemiSphere (TArray< TVec3< T > > &Points, const TSphere< T, 3 > &Sphere, const int32 NumPoints, const int32 SpiralSeed=0)
 

Member Function Documentation

◆ ComputeBottomHalfSemiSphere()

template<typename T >
static FORCEINLINE void Chaos::TSphereSpecializeSamplingHelper< T, 3 >::ComputeBottomHalfSemiSphere ( TArray< TVec3< T > > &  Points,
const TSphere< T, 3 > &  Sphere,
const int32  NumPoints,
const int32  SpiralSeed = 0 
)
inlinestatic

◆ ComputeGoldenSpiralPoints() [1/2]

template<typename T >
static FORCEINLINE void Chaos::TSphereSpecializeSamplingHelper< T, 3 >::ComputeGoldenSpiralPoints ( TArray< TVec3< T > > &  Points,
const TSphere< T, 3 > &  Sphere,
const int32  NumPoints,
const bool  FirstHalf = true,
const bool  SecondHalf = true,
const int32  SpiralSeed = 0 
)
inlinestatic

Returns NumPoints points evenly distributed on a 3D Sphere.

◆ ComputeGoldenSpiralPoints() [2/2]

template<typename T >
static FORCEINLINE void Chaos::TSphereSpecializeSamplingHelper< T, 3 >::ComputeGoldenSpiralPoints ( TArray< TVec3< T > > &  Points,
const TVec3< T > &  Center,
const T  Radius,
const int32  NumPoints,
const bool  BottomHalf = true,
const bool  TopHalf = true,
const int32  SpiralSeed = 0 
)
inlinestatic

Use the golden spiral method to evenly distribute points on a sphere.

The "golden" part is derived from the golden ratio; stand at the center, turn a golden ratio of whole turns, then emit a point in that direction.

Points are generated starting from the bottom of the sphere, ending at the top. Contiguous entries in Points generally will not be spatially adjacent.

Points to append to. Center is the center of the sphere. Radius is the radius of the sphere. NumPoints is the number of points to generate. BottomHalf causes the bottom half of the sphere to be generated, starting at Center - (0, 0, Radius). TopHalf causes the top half of the sphere to be generated, starting at Center. SpiralSeed is the starting index for golden spiral generation. When using this method to continue a spiral started elsewhere, SpiralSeed should equal the number of particles already created.

◆ ComputeSamplePoints()

template<typename T >
static FORCEINLINE void Chaos::TSphereSpecializeSamplingHelper< T, 3 >::ComputeSamplePoints ( TArray< TVec3< T > > &  Points,
const TSphere< T, 3 > &  Sphere,
const int32  NumPoints 
)
inlinestatic

◆ ComputeTopHalfSemiSphere()

template<typename T >
static FORCEINLINE void Chaos::TSphereSpecializeSamplingHelper< T, 3 >::ComputeTopHalfSemiSphere ( TArray< TVec3< T > > &  Points,
const TSphere< T, 3 > &  Sphere,
const int32  NumPoints,
const int32  SpiralSeed = 0 
)
inlinestatic

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