FPBDConstraintGraph::InitializeGraph

Clear the graph and set up the particle-to-graph-node mapping for the specified particles Should be called before AddConstraint.

Windows
MacOS
Linux

References

Module

Chaos

Header

/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/PBDConstraintGraph.h

Include

#include "Chaos/PBDConstraintGraph.h"

Source

/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/PBDConstraintGraph.cpp

Syntax

void InitializeGraph
(
    const TParticleView< TGeometryParticles< FReal, 3 >> & Particles
)

Remarks

Clear the graph and set up the particle-to-graph-node mapping for the specified particles Should be called before AddConstraint.

Called every frame, it used to clear all Nodes, Edges, ParticleToNodeIndex then AddToGraph on constraint rules would fill up

Now clears Edges and attempts to retain Nodes and ParticleToNodeIndex It is still setting up nodes that don't have a constraint so wasted effort iterating over all nodes, better to iterate over constraints or don't fill out Nodes if they don't have a constraint

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss