Merge branch 'havok'

Conflicts:
	src/GameWorld.cpp
	src/Systems/PhysicsSystem.cpp
	src/Systems/PhysicsSystem.h
	vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
2014-04-24 23:11:16 +02:00
17 changed files with 1834 additions and 128 deletions
+2 -1
View File
@@ -9,9 +9,10 @@ namespace Components
struct Physics : Component
{
Physics()
: Mass(0.f) { }
: Mass(0.f), Static(false){}
float Mass;
bool Static;
};
}
+26
View File
@@ -0,0 +1,26 @@
#ifndef Components_Vehicle_h__
#define Components_Vehicle_h__
#include "Component.h"
namespace Components
{
struct Vehicle : Component
{
Vehicle()
: MaxTorque(500.0f), MinRPM(1000.0f), OptimalRPM(5500.0f), MaxRPM(7500.0f), MaxSteeringAngle(35), TopSpeed(50.0f) { }
float MaxTorque;
float MinRPM;
float OptimalRPM;
float MaxRPM;
// Degrees
float MaxSteeringAngle;
float TopSpeed;
};
}
#endif // Components_Vehicle_h__
+47
View File
@@ -0,0 +1,47 @@
#ifndef Components_Wheel_h__
#define Components_Wheel_h__
#include "Component.h"
namespace Systems { class PhysicsSystem; }
namespace Components
{
struct Wheel : Component
{
friend class Systems::PhysicsSystem;
Wheel()
: AxleID(0), Radius(0), Width(0), Mass(0), Steering(false), DownDirection(glm::vec3(0, -1, 0)), Friction(1.5f), SlipAngle(0.0f),
MaxBreakingTorque(1500.0f), ConnectedToHandbrake(false), SuspensionStrength(50.0f) { }
// The Hardpoint MUST be positioned INSIDE the chassis.
glm::vec3 Hardpoint;
unsigned int AxleID;
float Radius;
float Width;
float Mass;
bool Steering;
glm::vec3 DownDirection;
float SuspensionStrength;
float Friction;
float SlipAngle;
float MaxBreakingTorque;
bool ConnectedToHandbrake;
private:
int ID;
glm::quat OriginalOrientation;
};
}
#endif // Components_Wheel_h__
/*
m_currentSuspensionLength
m_suspension
m_steeringOrientationChassisSpace
m_spinAngle
*/