|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API Form< float > MayaFlux::Portal::Forma::Geometry::stroke_slider | ( | std::span< const glm::vec2 > | path, |
| FormaTarget | handle_buf, | ||
| float | half_thickness = 0.02F, |
||
| glm::vec3 | track_color = glm::vec3(0.3F), |
||
| glm::vec3 | fill_color = glm::vec3(0.2F, 0.6F, 1.0F), |
||
| glm::vec3 | handle_color = glm::vec3(0.95F), |
||
| float | handle_size = 10.0F, |
||
| const std::function< glm::vec2()> & | live_offset = {} |
||
| ) |
Geometry function for a value scrubber along an arbitrary polyline.
Value in [0, 1] maps to arc-length position along path. The full path is rendered as a LINE_LIST in track_color; the prefix from the path start to the handle position is rendered in fill_color. The handle itself is a PointVertex submitted to handle_buf each sync.
| path | Ordered polyline vertices in NDC. Copied into closure. |
| handle_buf | POINT_LIST FormaBuffer for the handle point. Must be registered and have setup_rendering called. |
| half_thickness | Hit region half-thickness in NDC units. |
| track_color | Color of the full path. |
| fill_color | Color of the prefix segment up to the handle. |
| handle_color | Color of the handle point. |
| handle_size | Handle point size in pixels. |
| live_offset | Optional. Current translation of the drawn path. |
Definition at line 185 of file FormFactory.cpp.
References MayaFlux::Kinesis::AABB3D::contains(), MayaFlux::Kinesis::AABB3D::expanded(), MayaFlux::Portal::Graphics::LINE_LIST, MayaFlux::Kinesis::AABB3D::max, MayaFlux::Kinesis::AABB3D::min, out, MayaFlux::Kinesis::path_fraction(), MayaFlux::Kinesis::polyline(), MayaFlux::Kakshya::PointVertex::position, MayaFlux::Kinesis::stroke_bounds(), MayaFlux::Kinesis::AABB3D::translated(), and write_verts().
Here is the call graph for this function: