2013-12-16 08:58:15 +01:00
|
|
|
#ifndef PHYSICS_FORMULA_H
|
|
|
|
#define PHYSICS_FORMULA_H
|
|
|
|
|
|
|
|
#include "OysterMath.h"
|
2013-12-18 14:16:13 +01:00
|
|
|
#include "OysterPhysics3D.h"
|
2013-12-16 08:58:15 +01:00
|
|
|
|
|
|
|
namespace Oyster { namespace Physics { namespace Formula
|
|
|
|
{
|
|
|
|
namespace MomentOfInertia
|
|
|
|
{
|
|
|
|
::Oyster::Math::Float4x4 CreateSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius );
|
|
|
|
::Oyster::Math::Float4x4 CreateHollowSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius );
|
|
|
|
::Oyster::Math::Float4x4 CreateCuboidMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float width, const ::Oyster::Math::Float depth );
|
|
|
|
::Oyster::Math::Float4x4 CreateCylinderMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float radius );
|
|
|
|
::Oyster::Math::Float4x4 CreateRodMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float length );
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace CollisionResponse
|
|
|
|
{
|
2013-12-19 11:21:49 +01:00
|
|
|
::Oyster::Math::Float Bounce( ::Oyster::Math::Float coeffOfRestitution,
|
|
|
|
::Oyster::Math::Float massA, ::Oyster::Math::Float momentumA,
|
|
|
|
::Oyster::Math::Float massB, ::Oyster::Math::Float momentumB );
|
2013-12-19 10:15:32 +01:00
|
|
|
|
|
|
|
::Oyster::Math::Float4 Friction( ::Oyster::Math::Float impulse, ::Oyster::Math::Float4 impulseNormal,
|
|
|
|
::Oyster::Math::Float4 momentumA, ::Oyster::Math::Float staticFrictionA,
|
|
|
|
::Oyster::Math::Float dynamicFrictionA, ::Oyster::Math::Float massA,
|
|
|
|
::Oyster::Math::Float4 momentumB, ::Oyster::Math::Float staticFrictionB,
|
|
|
|
::Oyster::Math::Float dynamicFrictionB, ::Oyster::Math::Float massB );
|
|
|
|
|
2013-12-16 08:58:15 +01:00
|
|
|
}
|
|
|
|
} } }
|
|
|
|
|
|
|
|
#include "PhysicsFormula-Impl.h"
|
|
|
|
|
|
|
|
#endif
|