|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
Holds an unordered set of independent geometry items, rendered as one milled draw. More...
#include <AssemblyOperator.hpp>
Inheritance diagram for MayaFlux::Nodes::Network::AssemblyOperator:
Collaboration diagram for MayaFlux::Nodes::Network::AssemblyOperator:Public Member Functions | |
| std::shared_ptr< GpuSync::MeshWriterNode > | add_geometry (const Kakshya::MeshData &mesh) |
| Add an indexed triangle mesh. Topology is fixed TRIANGLE_LIST. | |
| void | add_geometry (std::shared_ptr< GpuSync::GeometryWriterNode > node) |
| Add a caller-built node directly; its own topology is used as-is. | |
| std::shared_ptr< GpuSync::GeometryLeafNode > | add_geometry (std::vector< glm::vec3 > positions, Portal::Graphics::PrimitiveTopology topology=Portal::Graphics::PrimitiveTopology::POINT_LIST) |
| Add an item from plain positions (color/scalar/normal/uv default). | |
| std::shared_ptr< GpuSync::GeometryLeafNode > | add_geometry (std::vector< Kakshya::Vertex > vertices, Portal::Graphics::PrimitiveTopology topology=Portal::Graphics::PrimitiveTopology::POINT_LIST) |
| Add an item from fully specified vertices. | |
| AssemblyOperator ()=default | |
| std::vector< uint32_t > | build_cluster_ids () const override |
| One cluster id per item; coincides with get_vertex_count() since items carry no interpolation step of their own. | |
| std::optional< Portal::Graphics::PrimitiveTopology > | declared_topology () const override |
| Forwards to the first item's own get_primitive_topology(). | |
| std::vector< DirtyVertexRange > | dirty_vertex_ranges () const override |
| One DirtyVertexRange per item that needs a GPU update, in add_geometry() order, matching get_vertex_data(). | |
| size_t | get_point_count () const override |
| Get source point count (before topology expansion) | |
| std::string_view | get_type_name () const override |
| Type name for introspection. | |
| size_t | get_vertex_count () const override |
| Get number of vertices (may differ from point count for topology/path) | |
| std::span< const uint8_t > | get_vertex_data () const override |
| Get vertex data for GPU upload. | |
| std::span< const uint8_t > | get_vertex_data_for_collection (uint32_t idx) const override |
| Get vertex data for specific collection (if multiple) | |
| Kakshya::VertexLayout | get_vertex_layout () const override |
| The universal Kakshya::Vertex attribute layout, vertex_count 0 when there are no items yet. | |
| const char * | get_vertex_type_name () const override |
| Get human-readable vertex type name (for validation/debugging) | |
| bool | is_vertex_data_dirty () const override |
| Check if geometry changed this frame. | |
| size_t | item_count () const |
| void | mark_vertex_data_clean () override |
| Clear dirty flag after GPU upload. | |
| void | process (float dt) override |
| Process for one batch cycle. | |
| std::optional< double > | query_state (std::string_view query) const override |
| Query operator internal state. | |
| bool | remove_geometry (const std::shared_ptr< GpuSync::GeometryWriterNode > &node) |
| Remove an item by identity. | |
| void | set_parameter (std::string_view param, double value) override |
| Set operator parameter. | |
| bool | supports_incremental_upload () const override |
| Whether every vertex mutation on this operator sets a group's dirty flag, so dirty_vertex_ranges() is the complete record of what changed since the last mark_vertex_data_clean(). | |
| std::vector< DrawRun > | topology_runs () const override |
| Coalesces adjacent items sharing a concatenable topology into one run; strip/fan items are always reported separately. | |
Public Member Functions inherited from MayaFlux::Nodes::Network::GraphicsOperator | |
| void | apply_one_to_one (std::string_view param, const std::shared_ptr< NodeNetwork > &source) override |
| Apply ONE_TO_ONE parameter mapping. | |
| bool | consumes_upstream () const |
| Whether this operator requests upstream vertex state before process(). | |
| virtual std::vector< std::pair< std::string, Kakshya::DataVariant > > | extract_vertex_attributes () const |
| Extra named, per-vertex attributes beyond position/color/size, for an external cache/export consumer. | |
| virtual std::vector< glm::vec3 > | extract_vertex_velocities () const |
| Per-vertex velocity, for a consumer that wants to write it as a native channel (e.g. | |
| bool | participates_in_rendering () const |
| Whether this operator contributes a vertex slice to rendering. | |
| virtual void | seed_from_upstream (const GraphicsOperator *upstream) |
| Receive upstream vertex state before process() is called. | |
| void | set_consumes_upstream (bool value) |
| void | set_force_internal_dt (bool value) |
| Override the dt passed by the caller with a fixed internal value. | |
| void | set_participates_in_rendering (bool value) |
| bool | uses_force_internal_dt () const |
Public Member Functions inherited from MayaFlux::Nodes::Network::NetworkOperator | |
| virtual bool | demands_full_vertex_restore () const |
| Whether a downstream compute pass writes the network's vertex buffer in place each cycle, so the geometry producer must keep restoring the CPU-authoritative vertex data every frame. | |
| virtual | ~NetworkOperator ()=default |
Protected Member Functions | |
| void * | get_data_at (size_t global_index) override |
| Get mutable access to point at global index. | |
Private Attributes | |
| std::vector< std::shared_ptr< GpuSync::GeometryWriterNode > > | m_items |
| std::vector< uint8_t > | m_vertex_data_aggregate |
Additional Inherited Members | |
Protected Attributes inherited from MayaFlux::Nodes::Network::GraphicsOperator | |
| bool | m_consumes_upstream {} |
| bool | m_force_internal_dt {} |
| bool | m_participates_in_rendering { true } |
Holds an unordered set of independent geometry items, rendered as one milled draw.
Not a specialized operator: unlike PathOperator/TopologyOperator/ PhysicsOperator, it interpolates, connects, or simulates nothing between items. Items are stored in a plain std::vector<shared_ptr<GeometryWriterNode>> in insertion order, not behind a handle: the shared_ptr each add_geometry() overload returns is itself the caller's access token for later mutation or removal, the same idiom PathOperator::add_node() already uses for a single path. Removal is a pointer-identity scan; if that becomes a hot per-frame path for thousands of items, revisit the storage, not the access API.
apply_one_to_one() is a documented no-op here (get_data_at() always returns nullptr): unrelated items added and removed independently have no positional correspondence for a ONE_TO_ONE per-index mapping to land on.
Definition at line 29 of file AssemblyOperator.hpp.