Exemplo n.º 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);
}
Exemplo n.º 2
0
void Simulation::Update()
{

    // update external force
	if (g_gravity) calculateExternalForce();
	switch (m_integration_method)
	{
		case INTEGRATION_EXPLICIT_EULER_COMMON:
			integrateClassicExplicitEuler();
			break;
		case INTEGRATION_EXPLICIT_EULER_DISCRETE:
			integrateExplicitEuler();
			break;
		case INTEGRATION_EXPLICIT_EULER_SYMPLETIC:
			integrateExplicitEuler();
			break;
	}
    // update velocity and damp
}
Exemplo n.º 3
0
void Simulation::Update()
{
	calculateInertiaY();
	calculateExternalForce();
	integrateExplicitEuler();
}