Added missing mass and inertia

This commit is contained in:
Robin Engman 2014-01-14 11:58:53 +01:00
parent 8f630125b4
commit 8c7a17ff8f
2 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,8 @@ void SimpleRigidBody::SetState( const SimpleRigidBody::State &state )
this->rigid.restitutionCoeff = state.GetRestitutionCoeff(); this->rigid.restitutionCoeff = state.GetRestitutionCoeff();
this->rigid.frictionCoeff_Static = state.GetFrictionCoeff_Static(); this->rigid.frictionCoeff_Static = state.GetFrictionCoeff_Static();
this->rigid.frictionCoeff_Kinetic = state.GetFrictionCoeff_Kinetic(); this->rigid.frictionCoeff_Kinetic = state.GetFrictionCoeff_Kinetic();
this->rigid.SetMass_KeepMomentum( state.GetMass() );
this->rigid.SetMomentOfInertia_KeepMomentum( state.GetMomentOfInertia() );
if( state.IsForwarded() ) if( state.IsForwarded() )
{ {

View File

@ -83,6 +83,8 @@ void SphericalRigidBody::SetState( const SphericalRigidBody::State &state )
this->rigid.restitutionCoeff = state.GetRestitutionCoeff(); this->rigid.restitutionCoeff = state.GetRestitutionCoeff();
this->rigid.frictionCoeff_Static = state.GetFrictionCoeff_Static(); this->rigid.frictionCoeff_Static = state.GetFrictionCoeff_Static();
this->rigid.frictionCoeff_Kinetic = state.GetFrictionCoeff_Kinetic(); this->rigid.frictionCoeff_Kinetic = state.GetFrictionCoeff_Kinetic();
this->rigid.SetMass_KeepMomentum( state.GetMass() );
this->rigid.SetMomentOfInertia_KeepMomentum( state.GetMomentOfInertia() );
if( state.IsForwarded() ) if( state.IsForwarded() )
{ {