From b4c8d8ca190fbc0644ac9982775c7ea98be9a857 Mon Sep 17 00:00:00 2001 From: Stiffly Date: Sat, 5 Apr 2014 02:57:29 +0200 Subject: [PATCH] Added physics components. 2014:04:05 02:57. --- src/Components/BoxShape.h | 16 ++++++++++++++++ src/Components/CustomShape.h | 17 +++++++++++++++++ src/Components/Physics.h | 19 +++++++++++++++++++ src/Components/SphereShape.h | 16 ++++++++++++++++ vs12/Returngeance/Returngeance.vcxproj | 4 ++++ .../Returngeance/Returngeance.vcxproj.filters | 12 ++++++++++++ 6 files changed, 84 insertions(+) create mode 100644 src/Components/BoxShape.h create mode 100644 src/Components/CustomShape.h create mode 100644 src/Components/Physics.h create mode 100644 src/Components/SphereShape.h diff --git a/src/Components/BoxShape.h b/src/Components/BoxShape.h new file mode 100644 index 0000000..7c301c5 --- /dev/null +++ b/src/Components/BoxShape.h @@ -0,0 +1,16 @@ +#ifndef Components_BoxShape_h__ +#define Components_BoxShape_h__ + +#include "Component.h" + +namespace Components +{ + + struct BoxShape : Component + { + float height, width; + }; + +} + +#endif // !Components_BoxShape_h__ diff --git a/src/Components/CustomShape.h b/src/Components/CustomShape.h new file mode 100644 index 0000000..5a06153 --- /dev/null +++ b/src/Components/CustomShape.h @@ -0,0 +1,17 @@ +#ifndef Components_CustomShape_h__ +#define Components_CustomShape_h__ + +#include "Component.h" +#include + +namespace Components +{ + + struct CustomShape : Component + { + std::string fileName; + }; + +} + +#endif // !Components_CustomShape_h__ diff --git a/src/Components/Physics.h b/src/Components/Physics.h new file mode 100644 index 0000000..10602c8 --- /dev/null +++ b/src/Components/Physics.h @@ -0,0 +1,19 @@ +#ifndef Components_Physics_h__ +#define Components_Physics_h__ + +//#include "btBulletDynamicsCommon.h" +#include "Component.h" + +namespace Components +{ + + struct Physics : Component + { + float Mass; + float Inertia[3]; + //btRigidBody RigidBody; + }; + +} + +#endif // !Components_Physics_h__ diff --git a/src/Components/SphereShape.h b/src/Components/SphereShape.h new file mode 100644 index 0000000..67edf01 --- /dev/null +++ b/src/Components/SphereShape.h @@ -0,0 +1,16 @@ +#ifndef Components_SphereShape_h__ +#define Components_SphereShape_h__ + +#include "Component.h" + +namespace Components +{ + + struct SphereShape : Component + { + float radius; + }; + +} + +#endif // !Components_SphereShape_h__ diff --git a/vs12/Returngeance/Returngeance.vcxproj b/vs12/Returngeance/Returngeance.vcxproj index 7230711..792a1ac 100755 --- a/vs12/Returngeance/Returngeance.vcxproj +++ b/vs12/Returngeance/Returngeance.vcxproj @@ -107,16 +107,20 @@ + + + + diff --git a/vs12/Returngeance/Returngeance.vcxproj.filters b/vs12/Returngeance/Returngeance.vcxproj.filters index 206b9e8..eb1064e 100755 --- a/vs12/Returngeance/Returngeance.vcxproj.filters +++ b/vs12/Returngeance/Returngeance.vcxproj.filters @@ -121,6 +121,18 @@ Components + + Components + + + Components + + + Components + + + Components +