Example #1
0
void ExplicitEuler::solveConstraints(struct CpuSoftClothDemoInternalData* data, char* vertexPositions, int vertexStride,float deltaTime)
{
	computeGravityForces(data,vertexPositions,vertexStride,deltaTime);
	computeSpringForces(data,vertexPositions,vertexStride,deltaTime);

	integrateExplicitEuler(data,vertexPositions,vertexStride,deltaTime);
}
void ForceDirectedGraphDrawing::computeIteration(std::shared_ptr<GraphClass>g, bool moveThisVertex)
{
    if(g == nullptr) return;

    clearForces(g);
    computeAttractiveForces(g);
    computeRepulsiveForces(g);
    computeGravityForces(g);
    moveVertices(g, moveThisVertex);

}