MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
Geometry.hpp File Reference

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.

Classes

struct  MayaFlux::Portal::Forma::Geometry::Form< T >
 A geometry function plus everything its realization requires. More...
 

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
 
namespace  MayaFlux::Portal
 
namespace  MayaFlux::Portal::Forma
 
namespace  MayaFlux::Portal::Forma::Geometry
 

Functions

template<Kinesis::HasBounds B, typename F , typename... Args>
auto MayaFlux::Portal::Forma::Geometry::at (const B &anchor, F &&factory, Args &&... args) -> decltype(std::forward< F >(factory)(Kinesis::bounds_of(anchor), std::forward< Args >(args)...))
 Call a bounds-taking factory with an anchor's region.
 
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.
 

Detailed Description

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.