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

◆ build_cluster_ids()

std::vector< uint32_t > MayaFlux::Nodes::Network::AssemblyOperator::build_cluster_ids ( ) const
nodiscardoverridevirtual

One cluster id per item; coincides with get_vertex_count() since items carry no interpolation step of their own.

Reimplemented from MayaFlux::Nodes::Network::GraphicsOperator.

Definition at line 150 of file AssemblyOperator.cpp.

151{
152 std::vector<uint32_t> ids(get_vertex_count(), 0U);
153
154 if (m_items.size() <= 1) {
155 return ids;
156 }
157
158 size_t offset = 0;
159 uint32_t cluster = 0;
160 for (const auto& item : m_items) {
161 const size_t count = item->get_vertex_count();
162 for (size_t i = 0; i < count && offset + i < ids.size(); ++i) {
163 ids[offset + i] = cluster;
164 }
165 offset += count;
166 ++cluster;
167 }
168
169 return ids;
170}
std::vector< std::shared_ptr< GpuSync::GeometryWriterNode > > m_items
size_t get_vertex_count() const override
Get number of vertices (may differ from point count for topology/path).
std::vector< double > count(std::span< const double > data, size_t n_windows, uint32_t hop_size, uint32_t window_size)
Sample count per window (as double for pipeline uniformity).
Definition Analysis.cpp:506

References get_vertex_count(), and m_items.

Here is the call graph for this function: