MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Portal::Forma Namespace Reference

Namespaces

namespace  Geometry
 
namespace  internal
 
namespace  Plot
 

Classes

class  Bridge
 Two-way binding orchestrator for Forma elements. More...
 
struct  Collapsible
 A collapsible header strip. More...
 
class  Context
 Event wiring between a Layer and a window surface. More...
 
struct  Element
 A bounded, renderable region on a window surface. More...
 
class  Inspector
 Forma subsystem for live introspection. More...
 
struct  InspectResult
 Result of an introspect call. More...
 
class  Layer
 Flat registry of Elements on a surface. More...
 
class  LayoutCursor
 Reactive Y-position accumulator for vertical primitive stacking. More...
 
struct  Link
 A directed coupling between Forma participants. More...
 
struct  Mapped
 Infrastructure for a continuously-mapped value whose GPU geometry tracks it. More...
 
struct  MappedState
 Value carrier for a Mapped primitive. More...
 
struct  RowBuffer
 A pre-created buffer and its bound text image, passed to make_value_row. More...
 
class  Surface
 Named owner of a (Window, Layer, Context) triple - the Forma canvas. More...
 
struct  ValueGroup
 Header collapsible with N value rows related to it. More...
 
struct  ValueRow
 One value row in a ValueGroup body. More...
 
struct  ValueSpec
 A single value to display in a ValueGroup body row. More...
 

Typedefs

template<typename T >
using GeometryFn = std::function< void(T value, std::vector< uint8_t > &out_bytes, Element &element)>
 Geometry function signature.
 
using Version = uint64_t
 Version counter incremented on every value write.
 

Functions

Bridgebridge ()
 Return the application-level Bridge instance.
 
template<typename V >
requires std::is_trivially_copyable_v<V> && (!std::ranges::range<V>)
std::shared_ptr< Buffers::FormaBuffercreate_buffer (std::shared_ptr< Core::Window > window, const V &vertex, Graphics::PrimitiveTopology topology=Graphics::PrimitiveTopology::TRIANGLE_STRIP)
 
template<typename V >
requires std::ranges::contiguous_range<V> && std::is_trivially_copyable_v<std::ranges::range_value_t<V>>
std::shared_ptr< Buffers::FormaBuffercreate_buffer (std::shared_ptr< Core::Window > window, const V &vertices, Graphics::PrimitiveTopology topology=Graphics::PrimitiveTopology::TRIANGLE_STRIP)
 Construct, register, and immediately submit a FormaBuffer from vertices.
 
std::shared_ptr< Buffers::FormaBuffercreate_buffer (std::shared_ptr< Core::Window > window, Graphics::PrimitiveTopology topology, const std::string &texture_binding={})
 Construct and register a FormaBuffer without creating a Mapped<T>.
 
std::shared_ptr< Buffers::FormaBuffercreate_buffer (std::shared_ptr< Core::Window > window, Graphics::PrimitiveTopology topology, std::vector< std::pair< std::string, std::shared_ptr< Core::VKImage > > > additional_textures)
 Construct and register a FormaBuffer with additional texture bindings.
 
template<typename T >
Mapped< T > create_element (Layer &layer, std::shared_ptr< Core::Window > window, GeometryFn< T > geom, T initial, Graphics::PrimitiveTopology topology=Graphics::PrimitiveTopology::TRIANGLE_STRIP, size_t capacity=internal::k_capacity_bytes, std::function< float(T)> project={})
 Build a FormaBuffer, register it, construct a Mapped<T>, and add the element to layer.
 
template<typename T >
Mapped< T > create_element (Surface &surface, GeometryFn< T > geom, T initial, Graphics::PrimitiveTopology topology=Graphics::PrimitiveTopology::TRIANGLE_STRIP, std::function< float(T)> project={})
 Build a FormaBuffer, register it, construct a Mapped<T>, add the element to surface's layer, and register it with the application Bridge.
 
std::pair< std::shared_ptr< Layer >, std::shared_ptr< Context > > create_layer (const std::shared_ptr< Core::Window > &window, std::string name)
 Construct a Layer and a Context wired to window.
 
Surface create_surface (std::shared_ptr< Core::Window > window, std::string name)
 Construct a Surface, creating Layer and Context internally.
 
bool initialize (std::shared_ptr< Nodes::NodeGraphManager > node_graph_manager, std::shared_ptr< Buffers::BufferManager > buffer_manager, std::shared_ptr< Vruta::TaskScheduler > scheduler, std::shared_ptr< Vruta::EventManager > event_manager, std::shared_ptr< Core::WindowManager > window_manager)
 Store engine-level references for use by all subsequent Forma calls.
 
void inspect (const std::shared_ptr< Buffers::Buffer > &buf)
 Open a dedicated window inspecting a single Buffer and its processing chain.
 
void inspect (const std::shared_ptr< Nodes::Network::NodeNetwork > &net)
 Open a dedicated window inspecting a NodeNetwork.
 
void inspect (const std::shared_ptr< Nodes::Node > &node)
 Open a dedicated window inspecting a single Node and its modulator tree.
 
void inspect (const std::shared_ptr< Vruta::Event > &ev, std::string_view name={})
 Open a dedicated window inspecting a single Event.
 
void inspect_buffers ()
 Open or show the BufferManager inspection window.
 
void inspect_events ()
 Open or show the EventManager inspection window.
 
void inspect_node_graph ()
 Open or show the NodeGraphManager inspection window.
 
void inspect_scheduler ()
 Open or show the TaskScheduler inspection window.
 
Inspectorinspector ()
 Access the Forma introspection subsystem.
 
bool is_initialized ()
 Whether initialize() has been called successfully.
 
Collapsible make_collapsible (std::shared_ptr< Buffers::FormaBuffer > buf, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h, bool initially_open, glm::vec3 color_closed, glm::vec3 color_open)
 
MAYAFLUX_API Collapsible make_collapsible (std::shared_ptr< Buffers::FormaBuffer > buf, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h, bool initially_open=true, glm::vec3 color_closed=glm::vec3(0.25F), glm::vec3 color_open=glm::vec3(0.35F), std::shared_ptr< Core::VKImage > label=nullptr)
 Construct a collapsible header strip.
 
template<typename T >
Mapped< T > make_mapped (T initial, GeometryFn< T > geometry, std::shared_ptr< Buffers::FormaBuffer > buffer)
 Construct a Mapped<T> with a freshly allocated MappedState.
 
ValueGroup make_value_group (std::span< const ValueSpec > values, RowBuffer header_buf, std::span< const RowBuffer > row_bufs, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h, bool initially_open=false)
 Construct a collapsible header followed by N value rows under it.
 
ValueRow make_value_row (const ValueSpec &spec, RowBuffer row_buf, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h, glm::vec3 bg=glm::vec3(0.15F))
 Construct one labeled value row, advance the cursor, and return it.
 
std::pair< Mapped< std::shared_ptr< Kakshya::PlotContainer > >, Surfaceplot (std::string title, uint32_t width, uint32_t height, std::shared_ptr< Kakshya::PlotContainer > container, Plot::SeriesSpec spec)
 Create a live plot in a new window.
 
glm::uvec2 row_pixel_dims (const std::shared_ptr< Core::Window > &window, float x_min, float x_max, float row_h)
 Convert an NDC row rect into integer pixel dimensions.
 
void shutdown ()
 Release stored references.
 

Variables

constexpr float k_inspect_indent = 0.03F