|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API Form< bool > MayaFlux::Portal::Forma::Geometry::toggle | ( | Kinesis::AABB2D | region, |
| glm::vec3 | color_off = glm::vec3(0.25F), |
||
| glm::vec3 | color_on = glm::vec3(0.2F, 0.7F, 0.4F), |
||
| const std::function< glm::vec2()> & | live_offset = {} |
||
| ) |
Geometry function for a boolean toggle in NDC space.
Renders region as a filled rect in color_off or color_on based on the current bool value. Interaction is the caller's responsibility.
| region | NDC bounds of the toggle. |
| color_off | Fill color when false. |
| color_on | Fill color when true. |
| live_offset | Optional. Current translation of the drawn toggle - the wire (press_flip) does no coordinate math itself, so only the geometry needs this. |
Definition at line 298 of file FormFactory.cpp.
References MayaFlux::Kinesis::AABB2D::contains(), MayaFlux::Kinesis::filled_rect(), out, press_flip(), MayaFlux::Kakshya::to_mesh_vertices(), MayaFlux::Kinesis::AABB2D::translated(), MayaFlux::Portal::Graphics::TRIANGLE_STRIP, and write_verts().
Here is the call graph for this function: