|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API Kakshya::MeshData MayaFlux::Kinesis::generate_tube | ( | std::span< const glm::vec3 > | path, |
| const std::function< float(float t)> & | radius_fn, | ||
| uint32_t | radial_segments = 8, |
||
| bool | capped = false |
||
| ) |
Extrude a circle along an arbitrary 3D path.
Each path point becomes a ring of radial_segments vertices. The ring frame is propagated along the path using parallel transport, which eliminates the twisting that naive normal-aligned cross-sections produce.
radius_fn maps the normalised path parameter t in [0,1] to a radius. A constant lambda gives a uniform tube. Any callable works: audio node output, envelope, position-dependent modulation.
Caps are flat and optional. An open tube (no caps) is suitable for chains and paths; a capped tube is suitable for solid cylindrical forms.
| path | Ordered world-space positions defining the spine. Minimum 2 points. Clamped to minimum 2. |
| radius_fn | Callable: float(float t) returning radius at t. |
| radial_segments | Number of vertices per ring. Clamped to minimum 3. |
| capped | If true, flat polygon caps are added at both ends. |