MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ topology_runs()

std::vector< DrawRun > MayaFlux::Nodes::Network::GraphicsOperator::topology_runs ( ) const
virtual

Contiguous vertex spans grouped by primitive topology.

Returns
One run per maximal contiguous stretch of same-topology collections whose topology permits concatenation, one run per collection otherwise, in the order get_vertex_data() produces. Default: a single run covering the whole operator at get_primitive_topology()'s value – meaning every GraphicsOperator that has no notion of multiple collections, or whose collections all declare the same topology, needs no override at all.

Adjacent collections of equal topology are coalesced into one run only when that topology is concatenable, meaning each primitive is assembled from its own group of consecutive vertices. Strip and fan collections are always reported separately, since concatenating two of them fabricates a primitive spanning the join: a PathOperator holding five LINE_STRIP paths back to back yields five runs, not one. A consumer draws each run as one draw call at that run's topology, or expands each run independently; sizing and ordering follow get_vertex_data() exactly, the same contract build_cluster_ids() and dirty_vertex_ranges() already keep.

Reimplemented in MayaFlux::Nodes::Network::AssemblyOperator, MayaFlux::Nodes::Network::PathOperator, MayaFlux::Nodes::Network::PhysicsOperator, and MayaFlux::Nodes::Network::TopologyOperator.

Definition at line 8 of file GraphicsOperator.cpp.

9{
11 return { DrawRun {
12 .topology = topo,
13 .vertex_offset = 0,
14 .vertex_count = static_cast<uint32_t>(get_vertex_count()) } };
15}
virtual size_t get_vertex_count() const =0
Get number of vertices (may differ from point count for topology/path)
virtual std::optional< Portal::Graphics::PrimitiveTopology > declared_topology() const
Topology this operator's vertex data is authored for, if it holds a node to ask.
Portal::Graphics::DrawRun DrawRun

References declared_topology(), get_vertex_count(), MayaFlux::Portal::Graphics::POINT_LIST, and MayaFlux::Portal::Graphics::DrawRun::topology.

+ Here is the call graph for this function: