|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API GeometryFn< float > MayaFlux::Portal::Forma::Geometry::stroke_slider | ( | std::span< const glm::vec2 > | path, |
| std::shared_ptr< Buffers::FormaBuffer > | 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 |
||
| ) |
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. |
Definition at line 129 of file Geometry.cpp.
References MayaFlux::Kinesis::AABB3D::contains(), MayaFlux::Kinesis::AABB3D::expanded(), MayaFlux::Kinesis::AABB3D::max, MayaFlux::Kinesis::AABB3D::min, MayaFlux::Kinesis::polyline(), MayaFlux::Kakshya::PointVertex::position, MayaFlux::Kinesis::stroke_bounds(), and write_verts().
Here is the call graph for this function: