Merge remote-tracking branch 'origin/master' into particles

Conflicts:
	src/Components/Physics.h
	src/GameWorld.cpp
	src/World.cpp
	src/World.h
	vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
Stiffly
2014-05-12 13:55:48 +02:00
60 changed files with 2404 additions and 340 deletions
+5 -1
View File
@@ -8,8 +8,12 @@ namespace Components
struct Camera : Component
{
Camera() : FOV(glm::radians(45.f)), NearClip(0.1f), FarClip(100.f) { }
Camera()
: FOV(glm::radians(45.f))
, NearClip(0.1f)
, FarClip(100.f) { }
std::string Viewport;
float FOV;
float NearClip;
float FarClip;
+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;
virtual Physics* Clone() const override { return new Physics(*this); }
};
+28
View File
@@ -0,0 +1,28 @@
#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;
Vehicle* Clone() const override { return new Vehicle(*this); }
};
}
#endif // Components_Vehicle_h__
+42
View File
@@ -0,0 +1,42 @@
#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;
Wheel* Clone() const override { return new Wheel(*this); }
};
}
#endif // Components_Wheel_h__