|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Illustrative geometry functions for common Mapped use cases. More...
#include "Mapped.hpp"
Include dependency graph for Geometry.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | MayaFlux |
| Main namespace for the Maya Flux audio engine. | |
| namespace | MayaFlux::Portal |
| namespace | MayaFlux::Portal::Forma |
| namespace | MayaFlux::Portal::Forma::Geometry |
Functions | |
| GeometryFn< glm::vec2 > | MayaFlux::Portal::Forma::Geometry::crosshair (float arm_len=0.04F, glm::vec3 color=glm::vec3(0.9F), float thickness=1.F, float hit_radius=0.05F) |
| Geometry function for a crosshair indicator in NDC space. | |
| GeometryFn< std::vector< float > > | MayaFlux::Portal::Forma::Geometry::drawable_canvas (Kinesis::AABB2D bounds, glm::vec3 color=glm::vec3(0.8F), float thickness=1.5F) |
| Geometry function for a drawable curve canvas in NDC space. | |
| GeometryFn< float > | MayaFlux::Portal::Forma::Geometry::horizontal_fader (Kinesis::AABB2D bounds, float handle_w, glm::vec3 track_color=glm::vec3(0.3F), glm::vec3 handle_color=glm::vec3(0.9F)) |
| Geometry function for a horizontal fader in NDC space. | |
| GeometryFn< float > | MayaFlux::Portal::Forma::Geometry::level_meter (Kinesis::AABB2D bounds, bool horizontal=true, glm::vec3 fill_color=glm::vec3(0.2F, 0.7F, 0.3F), glm::vec3 track_color=glm::vec3(0.15F)) |
| Geometry function for a level meter in NDC space. | |
| GeometryFn< glm::vec2 > | MayaFlux::Portal::Forma::Geometry::point (glm::vec3 color=glm::vec3(1.0F), float size=10.0F, float hit_radius=0.04F) |
| Geometry function for a positioned point in NDC space. | |
| GeometryFn< glm::vec2 > | MayaFlux::Portal::Forma::Geometry::position_picker (Kinesis::AABB2D bounds, glm::vec3 color=glm::vec3(0.9F), float size=8.0F) |
| Geometry function for a 2D position picker in NDC space. | |
| GeometryFn< float > | MayaFlux::Portal::Forma::Geometry::radial (glm::vec2 center, float radius, float angle_start, float angle_end, glm::vec3 color=glm::vec3(0.9F)) |
| Geometry function for a radial indicator in NDC space. | |
| 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. | |
| GeometryFn< 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)) |
| Geometry function for a boolean toggle in NDC space. | |
| GeometryFn< float > | MayaFlux::Portal::Forma::Geometry::vertical_fader (Kinesis::AABB2D bounds, float handle_h, glm::vec3 track_color=glm::vec3(0.3F), glm::vec3 handle_color=glm::vec3(0.9F)) |
| Geometry function for a vertical fader in NDC space. | |
| void | MayaFlux::Portal::Forma::Geometry::wire_canvas_drag (Context &ctx, uint32_t id, std::shared_ptr< MappedState< std::vector< float > > > state, Kinesis::AABB2D bounds) |
| Wire drag interaction for a drawable canvas element. | |
| template<typename V > | |
| void | MayaFlux::Portal::Forma::Geometry::write_verts (std::vector< uint8_t > &out, const std::vector< V > &verts) |
| Write a vertex array into a GeometryFn output buffer. | |
| template<typename V > requires std::is_trivially_copyable_v<V> && (!std::ranges::range<V>) | |
| void | MayaFlux::Portal::Forma::Geometry::write_verts (std::vector< uint8_t > &out, const V &v) |
| template<typename V > requires std::ranges::contiguous_range<V> && std::is_trivially_copyable_v<std::ranges::range_value_t<V>> | |
| void | MayaFlux::Portal::Forma::Geometry::write_verts (std::vector< uint8_t > &out, const V &verts) |
| Write a contiguous range of trivially-copyable vertices into a GeometryFn output buffer. | |
Illustrative geometry functions for common Mapped use cases.
These are starting points for reading and understanding the GeometryFn contract, not the primary or idiomatic way to use Mapped in MayaFlux.
The idiomatic use is a custom geometry function that writes from whatever data source makes sense: mouse pixel coordinates written directly as buffer data, microphone energy mapped to a spatial form, a node output driving vertex positions, a tendency field evaluated at runtime. The function receives a value and an output byte buffer — what it does with those is unconstrained.
The helpers below demonstrate the pattern concretely. They are not privileged and carry no special status in the framework.
Definition in file Geometry.hpp.