MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ generate_revolution() [1/2]

MAYAFLUX_API Kakshya::MeshData MayaFlux::Kinesis::generate_revolution ( const std::function< glm::vec2(float t)> &  profile_fn,
uint32_t  profile_segs,
uint32_t  radial_segs,
float  sweep_radians = glm::two_pi< float >() 
)

Revolve a 2D profile curve around the Y axis.

profile_fn maps t in [0,1] to a point in the XY plane. X is the radial distance from the Y axis; Y is the height. Negative X values are valid and produce interior geometry. The profile is revolved through sweep_radians, defaulting to a full revolution.

UV: u maps to the revolution angle in [0,1]; v maps to the profile parameter t.

Parameters
profile_fnCallable: glm::vec2(float t) in the XY plane.
profile_segsSamples along the profile. Clamped to minimum 2.
radial_segsSubdivisions around the axis. Clamped to minimum 3.
sweep_radiansArc of revolution. Default: full circle.
Returns
MeshData ready for TRIANGLE_LIST draw.