コード例 #1
0
ファイル: simulation.cpp プロジェクト: wrampon/physsim
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
}
コード例 #2
0
ファイル: Simulation.cpp プロジェクト: apapaxiong/openglFrame
void Simulation::Update()
{
	calculateInertiaY();
	calculateExternalForce();
	integrateExplicitEuler();
}