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

◆ get_data_at()

void * MayaFlux::Nodes::Network::PhysicsOperator::get_data_at ( size_t  global_index)
overrideprotectedvirtual

Get mutable access to point at global index.

Returns
Pointer to vertex data, or nullptr if index invalid

Subclasses must implement to provide per-point access

Implements MayaFlux::Nodes::Network::GraphicsOperator.

Definition at line 562 of file PhysicsOperator.cpp.

563{
564 size_t offset = 0;
565 for (auto& group : m_collections) {
566 if (global_index < offset + group.collection->get_point_count()) {
567 size_t local_index = global_index - offset;
568 return &group.collection->get_points()[local_index];
569 }
570 offset += group.collection->get_point_count();
571 }
572 return nullptr;
573}
size_t get_point_count() const override
Get source point count (before topology expansion)
std::vector< CollectionGroup > m_collections

References get_point_count(), and m_collections.

+ Here is the call graph for this function: