Browse Source

Adding newton skeleton

Panagiotis Christopoulos Charitos 11 years ago
parent
commit
ce3abd5098

+ 2 - 1
CMakeLists.txt

@@ -230,7 +230,8 @@ INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/anki/Config.h" DESTINATION "${INCLUDE
 #
 #
 # Include & lib directories
 # Include & lib directories
 #
 #
-include_directories("thirdparty/tinyxml2/include" "thirdparty/lua" "thirdparty/z" "thirdparty/bullet" "thirdparty/SDL2/include" "include" "${CMAKE_CURRENT_BINARY_DIR}")
+include_directories("thirdparty/tinyxml2/include" "thirdparty/lua" "thirdparty/z" "thirdparty/bullet" 
+	"thirdparty/SDL2/include" "include" "thirdparty/newton/newton" "${CMAKE_CURRENT_BINARY_DIR}")
 
 
 if(LINUX OR MACOS OR WINDOWS)
 if(LINUX OR MACOS OR WINDOWS)
 	include_directories("thirdparty/GLEW/include")
 	include_directories("thirdparty/GLEW/include")

+ 5 - 0
include/anki/physics/Common.h

@@ -8,9 +8,14 @@
 
 
 #include "anki/util/StdTypes.h"
 #include "anki/util/StdTypes.h"
 #include "anki/util/Enum.h"
 #include "anki/util/Enum.h"
+#include "anki/Math.h"
+#include <Newton.h>
 
 
 namespace anki {
 namespace anki {
 
 
+// Forward
+class PhysicsWorld;
+
 /// @addtogroup physics
 /// @addtogroup physics
 /// @{
 /// @{
 
 

+ 7 - 3
include/anki/physics/PhysicsBody.h

@@ -3,8 +3,8 @@
 // Code licensed under the BSD License.
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 // http://www.anki3d.org/LICENSE
 
 
-#ifndef ANKI_PHYSICS_BODY_H
-#define ANKI_PHYSICS_BODY_H
+#ifndef ANKI_PHYSICS_PHYSICS_BODY_H
+#define ANKI_PHYSICS_PHYSICS_BODY_H
 
 
 #include "anki/physics/Common.h"
 #include "anki/physics/Common.h"
 
 
@@ -14,9 +14,13 @@ namespace anki {
 /// @{
 /// @{
 
 
 /// Rigid body.
 /// Rigid body.
-class Body
+class PhysicsBody
 {
 {
 public:
 public:
+	PhysicsBody();
+
+	~PhysicsBody();
+
 private:
 private:
 	NewtonBody* m_body;
 	NewtonBody* m_body;
 	Transform m_trf;
 	Transform m_trf;

+ 3 - 3
include/anki/physics/PhysicsWorld.h

@@ -3,10 +3,10 @@
 // Code licensed under the BSD License.
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 // http://www.anki3d.org/LICENSE
 
 
-#ifndef ANKI_PHYSICS_PHYS_WORLD_H
-#define ANKI_PHYSICS_PHYS_WORLD_H
+#ifndef ANKI_PHYSICS_PHYSICS_WORLD_H
+#define ANKI_PHYSICS_PHYSICS_WORLD_H
 
 
-#include "anki/util/StdTypes.h"
+#include "anki/physics/Common.h"
 
 
 namespace anki {
 namespace anki {
 
 

+ 1 - 1
src/physics/PhysicsCollisionShape.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 // http://www.anki3d.org/LICENSE
 
 
-#include "anki/physics/PhysicsCollisionShape.cpp"
+#include "anki/physics/PhysicsCollisionShape.h"
 
 
 namespace anki {
 namespace anki {
 
 

+ 1 - 1
thirdparty

@@ -1 +1 @@
-Subproject commit 5dead0e94f164d59066837a0eb89ec3685981ae7
+Subproject commit 9fe0a080b3700da239f1b9ddbfdaf10728ff9381