2013-12-06 09:46:30 +01:00
|
|
|
#ifndef PHYSICS_STRUCTS_H
|
|
|
|
#define PHYSICS_STRUCTS_H
|
|
|
|
|
|
|
|
#include "OysterMath.h"
|
|
|
|
#include "PhysicsAPI.h"
|
2014-01-23 19:13:02 +01:00
|
|
|
#include "Inertia.h"
|
2013-12-06 09:46:30 +01:00
|
|
|
|
2014-02-09 21:24:09 +01:00
|
|
|
namespace Oyster
|
|
|
|
{
|
|
|
|
namespace Physics
|
2013-12-06 09:46:30 +01:00
|
|
|
{
|
2014-02-09 21:24:09 +01:00
|
|
|
namespace Struct
|
2013-12-06 09:46:30 +01:00
|
|
|
{
|
2014-02-09 21:24:09 +01:00
|
|
|
struct CustomBodyState
|
2013-12-19 14:30:16 +01:00
|
|
|
{
|
2014-02-09 21:24:09 +01:00
|
|
|
public:
|
|
|
|
// Default constructor
|
|
|
|
CustomBodyState( ::Oyster::Math::Float mass = 1.0f,
|
|
|
|
::Oyster::Math::Float restitutionCoeff = 1.0f,
|
|
|
|
::Oyster::Math::Float staticFrictionCoeff = 1.0f,
|
|
|
|
::Oyster::Math::Float dynamicFrictionCoeff = 1.0f,
|
|
|
|
const ::Oyster::Math::Float3 ¢erPos = ::Oyster::Math::Float3::null,
|
|
|
|
const ::Oyster::Math::Quaternion &quaternion = ::Oyster::Math::Quaternion(::Oyster::Math::Float3(0, 0, 0), 1));
|
|
|
|
|
|
|
|
// Assignment operator
|
|
|
|
CustomBodyState & operator = ( const CustomBodyState &state );
|
|
|
|
|
|
|
|
// Get functions that calculate matrices that do not exist as variables
|
|
|
|
::Oyster::Math::Float4x4 GetRotation() const;
|
|
|
|
::Oyster::Math::Float4x4 GetOrientation() const;
|
|
|
|
::Oyster::Math::Float4x4 GetView() const;
|
|
|
|
::Oyster::Math::Float4x4 GetView( const ::Oyster::Math::Float3 &offset ) const;
|
|
|
|
|
|
|
|
// Variables for state
|
|
|
|
::Oyster::Math::Float mass, restitutionCoeff, staticFrictionCoeff, dynamicFrictionCoeff;
|
|
|
|
::Oyster::Math::Float3 reach, centerPos;
|
|
|
|
::Oyster::Math::Quaternion quaternion;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-12-06 09:46:30 +01:00
|
|
|
|
2013-12-19 14:30:16 +01:00
|
|
|
|
2013-12-06 09:46:30 +01:00
|
|
|
#include "PhysicsStructs-Impl.h"
|
|
|
|
|
|
|
|
#endif
|