UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::FCylinderSpecializeSamplingHelper Struct Reference

#include <Cylinder.h>

Static Public Member Functions

static FORCEINLINE void ComputeSamplePoints (TArray< FVec3 > &Points, const FCylinder &Cylinder, const int32 NumPoints, const bool IncludeEndCaps=true)
 
static FORCEINLINE void ComputeGoldenSpiralPoints (TArray< FVec3 > &Points, const FCylinder &Cylinder, const int32 NumPoints, const bool IncludeEndCaps=true)
 
static FORCEINLINE void ComputeGoldenSpiralPoints (TArray< FVec3 > &Points, const FVec3 &Origin, const FVec3 &Axis, const FReal Radius, const FReal Height, const int32 NumPoints, const bool IncludeEndCaps=true, int32 SpiralSeed=0)
 
static FORCEINLINE void ComputeGoldenSpiralPointsUnoriented (TArray< FVec3 > &Points, const FReal Radius, const FReal Height, const int32 NumPoints, const bool IncludeEndCaps=true, int32 SpiralSeed=0)
 

Member Function Documentation

◆ ComputeGoldenSpiralPoints() [1/2]

static FORCEINLINE void Chaos::FCylinderSpecializeSamplingHelper::ComputeGoldenSpiralPoints ( TArray< FVec3 > &  Points,
const FCylinder Cylinder,
const int32  NumPoints,
const bool  IncludeEndCaps = true 
)
inlinestatic

◆ ComputeGoldenSpiralPoints() [2/2]

static FORCEINLINE void Chaos::FCylinderSpecializeSamplingHelper::ComputeGoldenSpiralPoints ( TArray< FVec3 > &  Points,
const FVec3 Origin,
const FVec3 Axis,
const FReal  Radius,
const FReal  Height,
const int32  NumPoints,
const bool  IncludeEndCaps = true,
int32  SpiralSeed = 0 
)
inlinestatic

Use the golden spiral method to generate evenly spaced points on a cylinder.

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 cylinder, ending at the top. Contiguous entries in Points generally will not be spatially adjacent.

Points to append to. Origin is the bottom-most point of the cylinder. Axis is the orientation of the cylinder. Radius is the radius of the cylinder. Height is the height of the cylinder. NumPoints is the number of points to generate. IncludeEndCaps determines whether or not points are generated on the end caps of the cylinder. 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.

◆ ComputeGoldenSpiralPointsUnoriented()

static FORCEINLINE void Chaos::FCylinderSpecializeSamplingHelper::ComputeGoldenSpiralPointsUnoriented ( TArray< FVec3 > &  Points,
const FReal  Radius,
const FReal  Height,
const int32  NumPoints,
const bool  IncludeEndCaps = true,
int32  SpiralSeed = 0 
)
inlinestatic

Generates evenly spaced points on a cylinder, oriented about the Z axis, varying from [-Height/2, Height/2].

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 cylinder, ending at the top. Contiguous entries in Points generally will not be spatially adjacent.

Points to append to. Radius is the radius of the cylinder. Height is the height of the cylinder. NumPoints is the number of points to generate. IncludeEndCaps determines whether or not points are generated on the end caps of the cylinder. 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()

static FORCEINLINE void Chaos::FCylinderSpecializeSamplingHelper::ComputeSamplePoints ( TArray< FVec3 > &  Points,
const FCylinder Cylinder,
const int32  NumPoints,
const bool  IncludeEndCaps = true 
)
inlinestatic

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