Renamed Formula::CollisionResponse::Impulse to..
.. Formula::CollisionResponse::Bounce
This commit is contained in:
parent
24418603ad
commit
4e21e2b0c0
|
@ -39,7 +39,7 @@ namespace
|
||||||
deuterG_Magnitude = deuterG.Dot( normal );
|
deuterG_Magnitude = deuterG.Dot( normal );
|
||||||
|
|
||||||
// bounce
|
// bounce
|
||||||
Float impulse = Formula::CollisionResponse::Impulse( deuterState.GetRestitutionCoeff(),
|
Float impulse = Formula::CollisionResponse::Bounce( deuterState.GetRestitutionCoeff(),
|
||||||
deuterState.GetMass(), deuterG_Magnitude,
|
deuterState.GetMass(), deuterG_Magnitude,
|
||||||
protoState.GetMass(), protoG_Magnitude );;
|
protoState.GetMass(), protoG_Magnitude );;
|
||||||
Float4 sumJ = normal*impulse;
|
Float4 sumJ = normal*impulse;
|
||||||
|
@ -54,7 +54,7 @@ namespace
|
||||||
deuterG_Magnitude = deuterG.Dot( normal );
|
deuterG_Magnitude = deuterG.Dot( normal );
|
||||||
|
|
||||||
// bounce
|
// bounce
|
||||||
sumJ += normal * Formula::CollisionResponse::Impulse( protoState.GetRestitutionCoeff(),
|
sumJ += normal * Formula::CollisionResponse::Bounce( protoState.GetRestitutionCoeff(),
|
||||||
protoState.GetMass(), protoG_Magnitude,
|
protoState.GetMass(), protoG_Magnitude,
|
||||||
deuterState.GetMass(), deuterG_Magnitude );
|
deuterState.GetMass(), deuterG_Magnitude );
|
||||||
// FRICTION
|
// FRICTION
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace Oyster { namespace Physics { namespace Formula
|
||||||
|
|
||||||
namespace CollisionResponse
|
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);
|
return (e + 1) * (mB*gA - mA*gB) / (mA + mB);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace Oyster { namespace Physics { namespace Formula
|
||||||
|
|
||||||
namespace CollisionResponse
|
namespace CollisionResponse
|
||||||
{
|
{
|
||||||
::Oyster::Math::Float Impulse( ::Oyster::Math::Float coeffOfRestitution,
|
::Oyster::Math::Float Bounce( ::Oyster::Math::Float coeffOfRestitution,
|
||||||
::Oyster::Math::Float massA, ::Oyster::Math::Float momentumA,
|
::Oyster::Math::Float massA, ::Oyster::Math::Float momentumA,
|
||||||
::Oyster::Math::Float massB, ::Oyster::Math::Float momentumB );
|
::Oyster::Math::Float massB, ::Oyster::Math::Float momentumB );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue