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

◆ set_topology()

void MayaFlux::Nodes::Network::ParticleNetwork::set_topology ( Topology  topology)
overridevirtual

Set the network's topology.

Reimplemented from MayaFlux::Nodes::Network::NodeNetwork.

Definition at line 110 of file ParticleNetwork.cpp.

111{
113
114 if (auto* physics = dynamic_cast<PhysicsOperator*>(m_operator.get())) {
115 bool should_interact = (topology == Topology::SPATIAL || topology == Topology::GRID_2D || topology == Topology::GRID_3D);
116 physics->enable_spatial_interactions(should_interact);
117 }
118}
virtual void set_topology(Topology topology)
Set the network's topology.
std::unique_ptr< NetworkOperator > m_operator
@ GRID_2D
2D lattice with 4-connectivity
@ GRID_3D
3D lattice with 6-connectivity
@ SPATIAL
Dynamic proximity-based (nodes within radius interact)

References MayaFlux::Nodes::Network::GRID_2D, MayaFlux::Nodes::Network::GRID_3D, m_operator, MayaFlux::Nodes::Network::NodeNetwork::set_topology(), and MayaFlux::Nodes::Network::SPATIAL.

Referenced by ParticleNetwork().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: