![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <TaperedCylinder.h>
Static Public Member Functions | |
| static FORCEINLINE void | ComputeSamplePoints (TArray< FVec3 > &Points, const FTaperedCylinder &Cylinder, const int32 NumPoints, const bool IncludeEndCaps=true) |
| static FORCEINLINE void | ComputeGoldenSpiralPoints (TArray< FVec3 > &Points, const FTaperedCylinder &Cylinder, const int32 NumPoints, const bool IncludeEndCaps=true) |
| static void | ComputeGoldenSpiralPoints (TArray< FVec3 > &Points, const FVec3 &Origin, const FVec3 &Axis, const FReal Radius1, const FReal Radius2, const FReal Height, const int32 NumPoints, const bool IncludeEndCaps=true, int32 SpiralSeed=0) |
| static void | ComputeGoldenSpiralPointsUnoriented (TArray< FVec3 > &Points, const FReal Radius1, const FReal Radius2, const FReal Height, const int32 NumPoints, const bool IncludeEndCaps=true, int32 SpiralSeed=0) |
|
inlinestatic |
|
inlinestatic |
Use the golden spiral method to generate evenly spaced points on a tapered cylinder (truncated cone).
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 tapered cylinder. Axis is the orientation of the tapered cylinder. Radius1 is the first radius of the tapered cylinder. Radius2 is the second radius of the tapered cylinder. Height is the height of the tapered cylinder. NumPoints is the number of points to generate. IncludeEndCaps determines whether or not points are generated on the end caps of the tapered 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.
|
inlinestatic |
Generates points on a tapered cylinder (truncated cone), oriented about the Z axis, varying from [-Height/2, Height/2].
TODO: Note that this method does not produce evenly spaced points! It'll bunch points together on the side of the cylinder with the smaller radius, and spread them apart on the larger. We need a routine that operates in conical space, rather than cylindrical. That said, points are distributed evenly between the two end caps, proportional to their respective areas.
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. Radius1 is the first radius of the tapered cylinder. Radius2 is the second radius of the tapered 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.
|
inlinestatic |