diff --git a/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp b/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp index 24d46d0b..f06d3698 100644 --- a/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp +++ b/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp @@ -39,9 +39,9 @@ namespace deuterG_Magnitude = deuterG.Dot( normal ); // bounce - Float impulse = Formula::CollisionResponse::Impulse( deuterState.GetRestitutionCoeff(), - deuterState.GetMass(), deuterG_Magnitude, - protoState.GetMass(), protoG_Magnitude );; + Float impulse = Formula::CollisionResponse::Bounce( deuterState.GetRestitutionCoeff(), + deuterState.GetMass(), deuterG_Magnitude, + protoState.GetMass(), protoG_Magnitude );; Float4 sumJ = normal*impulse; sumJ -= Formula::CollisionResponse::Friction( impulse, normal, @@ -54,9 +54,9 @@ namespace deuterG_Magnitude = deuterG.Dot( normal ); // bounce - sumJ += normal * Formula::CollisionResponse::Impulse( protoState.GetRestitutionCoeff(), - protoState.GetMass(), protoG_Magnitude, - deuterState.GetMass(), deuterG_Magnitude ); + sumJ += normal * Formula::CollisionResponse::Bounce( protoState.GetRestitutionCoeff(), + protoState.GetMass(), protoG_Magnitude, + deuterState.GetMass(), deuterG_Magnitude ); // FRICTION // Apply //sumJ += ( 1 / deuterState.GetMass() )*frictionImpulse; diff --git a/Code/GamePhysics/PhysicsFormula-Impl.h b/Code/GamePhysics/PhysicsFormula-Impl.h index 4cb7b5ef..6546a856 100644 --- a/Code/GamePhysics/PhysicsFormula-Impl.h +++ b/Code/GamePhysics/PhysicsFormula-Impl.h @@ -36,7 +36,7 @@ namespace Oyster { namespace Physics { namespace Formula namespace CollisionResponse { - inline ::Oyster::Math::Float Impulse( ::Oyster::Math::Float e, ::Oyster::Math::Float mA, ::Oyster::Math::Float gA, ::Oyster::Math::Float mB, ::Oyster::Math::Float gB ) + inline ::Oyster::Math::Float Bounce( ::Oyster::Math::Float e, ::Oyster::Math::Float mA, ::Oyster::Math::Float gA, ::Oyster::Math::Float mB, ::Oyster::Math::Float gB ) { return (e + 1) * (mB*gA - mA*gB) / (mA + mB); } diff --git a/Code/GamePhysics/PhysicsFormula.h b/Code/GamePhysics/PhysicsFormula.h index a8fea658..fe91ae3a 100644 --- a/Code/GamePhysics/PhysicsFormula.h +++ b/Code/GamePhysics/PhysicsFormula.h @@ -17,9 +17,9 @@ namespace Oyster { namespace Physics { namespace Formula namespace CollisionResponse { - ::Oyster::Math::Float Impulse( ::Oyster::Math::Float coeffOfRestitution, - ::Oyster::Math::Float massA, ::Oyster::Math::Float momentumA, - ::Oyster::Math::Float massB, ::Oyster::Math::Float momentumB ); + ::Oyster::Math::Float Bounce( ::Oyster::Math::Float coeffOfRestitution, + ::Oyster::Math::Float massA, ::Oyster::Math::Float momentumA, + ::Oyster::Math::Float massB, ::Oyster::Math::Float momentumB ); ::Oyster::Math::Float4 Friction( ::Oyster::Math::Float impulse, ::Oyster::Math::Float4 impulseNormal, ::Oyster::Math::Float4 momentumA, ::Oyster::Math::Float staticFrictionA,