Browse Source

A very dangerous commit:
- Making anki more library-like

Panagiotis Christopoulos Charitos 14 years ago
parent
commit
43c81e4e6c
100 changed files with 290 additions and 195 deletions
  1. 9 10
      CMakeLists.txt
  2. 11 0
      anki/CMakeLists.txt
  3. 0 0
      anki/collision/CMakeLists.txt
  4. 12 0
      anki/collision/Collision.h
  5. 0 0
      anki/collision/CollisionShape.h
  6. 2 2
      anki/collision/LineSegment.cpp
  7. 2 2
      anki/collision/LineSegment.h
  8. 2 2
      anki/collision/Obb.cpp
  9. 3 3
      anki/collision/Obb.h
  10. 0 0
      anki/collision/Obb.inl.h
  11. 2 2
      anki/collision/PerspectiveCameraShape.cpp
  12. 2 2
      anki/collision/PerspectiveCameraShape.h
  13. 2 2
      anki/collision/Plane.cpp
  14. 2 2
      anki/collision/Plane.h
  15. 2 2
      anki/collision/Ray.cpp
  16. 2 2
      anki/collision/Ray.h
  17. 2 2
      anki/collision/Sphere.cpp
  18. 3 3
      anki/collision/Sphere.h
  19. 1 1
      anki/collision/Sphere.inl.h
  20. 4 4
      anki/core/App.cpp
  21. 2 2
      anki/core/App.h
  22. 4 4
      anki/core/AsyncLoader.cpp
  23. 0 0
      anki/core/AsyncLoader.h
  24. 0 0
      anki/core/CMakeLists.txt
  25. 2 5
      anki/core/Globals.h
  26. 1 1
      anki/core/Logger.cpp
  27. 1 1
      anki/core/Logger.h
  28. 0 0
      anki/core/Logger.inl.h
  29. 3 3
      anki/core/Object.cpp
  30. 0 0
      anki/core/Object.h
  31. 6 11
      anki/core/ParallelJob.cpp
  32. 66 0
      anki/core/ParallelJob.h
  33. 3 9
      anki/core/ParallelManager.cpp
  34. 10 16
      anki/core/ParallelManager.h
  35. 1 1
      anki/core/StdinListener.cpp
  36. 0 0
      anki/core/StdinListener.h
  37. 0 0
      anki/event/CMakeLists.txt
  38. 2 2
      anki/event/Event.cpp
  39. 1 1
      anki/event/Event.h
  40. 1 1
      anki/event/EventManager.cpp
  41. 2 2
      anki/event/EventManager.h
  42. 1 1
      anki/event/EventManager.inl.h
  43. 3 3
      anki/event/MainRendererPpsHdrEvent.cpp
  44. 1 1
      anki/event/MainRendererPpsHdrEvent.h
  45. 4 4
      anki/event/SceneColorEvent.cpp
  46. 2 2
      anki/event/SceneColorEvent.h
  47. 3 3
      anki/gl/BufferObject.cpp
  48. 2 2
      anki/gl/BufferObject.h
  49. 0 0
      anki/gl/CMakeLists.txt
  50. 1 1
      anki/gl/Fbo.cpp
  51. 3 3
      anki/gl/Fbo.h
  52. 5 5
      anki/gl/GlException.cpp
  53. 0 0
      anki/gl/GlException.h
  54. 1 1
      anki/gl/GlStateMachine.cpp
  55. 1 1
      anki/gl/GlStateMachine.h
  56. 3 3
      anki/gl/TimeQuery.cpp
  57. 0 0
      anki/gl/TimeQuery.h
  58. 4 4
      anki/gl/Vao.cpp
  59. 4 4
      anki/gl/Vao.h
  60. 1 1
      anki/gl/Vbo.h
  61. 0 0
      anki/input/CMakeLists.txt
  62. 4 4
      anki/input/Input.cpp
  63. 1 1
      anki/input/Input.h
  64. 3 3
      anki/math/Axisang.h
  65. 1 1
      anki/math/Axisang.inl.h
  66. 0 0
      anki/math/CMakeLists.txt
  67. 2 2
      anki/math/Euler.h
  68. 1 1
      anki/math/Euler.inl.h
  69. 2 2
      anki/math/Mat3.h
  70. 1 1
      anki/math/Mat3.inl.h
  71. 2 2
      anki/math/Mat4.h
  72. 1 1
      anki/math/Mat4.inl.h
  73. 1 1
      anki/math/Math.cpp
  74. 2 2
      anki/math/Math.h
  75. 1 1
      anki/math/Math.inl.h
  76. 3 0
      anki/math/MathCommonIncludes.h
  77. 12 0
      anki/math/MathCommonSrc.h
  78. 0 0
      anki/math/MathForward.h
  79. 0 0
      anki/math/MathSimd.h
  80. 2 2
      anki/math/Quat.h
  81. 1 1
      anki/math/Quat.inl.h
  82. 4 4
      anki/math/Transform.h
  83. 1 1
      anki/math/Transform.inl.h
  84. 2 2
      anki/math/Vec2.h
  85. 1 1
      anki/math/Vec2.inl.h
  86. 2 2
      anki/math/Vec3.h
  87. 1 1
      anki/math/Vec3.inl.h
  88. 2 2
      anki/math/Vec4.h
  89. 1 1
      anki/math/Vec4.inl.h
  90. 0 0
      anki/misc/CMakeLists.txt
  91. 3 3
      anki/misc/Parser.h
  92. 2 2
      anki/misc/Parser.inl.h
  93. 2 2
      anki/misc/PropertyTree.cpp
  94. 1 1
      anki/misc/PropertyTree.h
  95. 5 0
      anki/misc/TestHeader.cpp
  96. 7 0
      anki/physics/CMakeLists.txt
  97. 5 5
      anki/physics/Character.cpp
  98. 2 2
      anki/physics/Character.h
  99. 1 1
      anki/physics/Convertors.h
  100. 1 1
      anki/physics/MotionState.h

+ 9 - 10
CMakeLists.txt

@@ -1,19 +1,11 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
 
-INCLUDE_DIRECTORIES("extern/include")
-INCLUDE_DIRECTORIES("extern/include/bullet")
-INCLUDE_DIRECTORIES("/usr/include/python2.6")
-INCLUDE_DIRECTORIES("/usr/include/freetype2")
-
-LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/extern/lib-x86-64-linux)
-
 IF(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
 IF(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
 	ADD_DEFINITIONS("-DPLATFORM_LINUX")
 	ADD_DEFINITIONS("-DPLATFORM_LINUX")
 ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
 ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
 	ADD_DEFINITIONS("-DPLATFORM_WINDOWS")
 	ADD_DEFINITIONS("-DPLATFORM_WINDOWS")
 ENDIF()
 ENDIF()
 
 
-
 FIND_PACKAGE(Subversion)
 FIND_PACKAGE(Subversion)
 IF(Subversion_FOUND)
 IF(Subversion_FOUND)
 	Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} ER)
 	Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} ER)
@@ -36,7 +28,14 @@ IF(CMAKE_BUILD_TYPE STREQUAL Debug)
 ELSE()
 ELSE()
 	ADD_DEFINITIONS("-DBOOST_DISABLE_ASSERTS -mtune=core2 -ffast-math")
 	ADD_DEFINITIONS("-DBOOST_DISABLE_ASSERTS -mtune=core2 -ffast-math")
 ENDIF()
 ENDIF()
-	
 
 
-ADD_SUBDIRECTORY(src)
+INCLUDE_DIRECTORIES("extern/include")
+INCLUDE_DIRECTORIES("extern/include/bullet")
+INCLUDE_DIRECTORIES("/usr/include/python2.6")
+INCLUDE_DIRECTORIES("/usr/include/freetype2")
+INCLUDE_DIRECTORIES(.)
+
+LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/extern/lib-x86-64-linux)
 
 
+ADD_SUBDIRECTORY(anki)
+ADD_SUBDIRECTORY(testapp)

+ 11 - 0
anki/CMakeLists.txt

@@ -0,0 +1,11 @@
+SET(ANKI_LIBS script renderer scene ui event 
+	input physics resource core misc gl collision math util)
+
+SUBDIRS(${ANKI_LIBS})
+
+ADD_LIBRARY(anki ${ANKI_LIBS})
+
+TARGET_LINK_LIBRARIES(anki ${ANKI_LIBS} GLEWmx GLU GL jpeg SDL png python2.6
+	boost_system boost_python boost_filesystem boost_thread freetype)
+
+SET_TARGET_PROPERTIES(anki PROPERTIES LINKER_LANGUAGE CXX)

+ 0 - 0
src/collision/CMakeLists.txt → anki/collision/CMakeLists.txt


+ 12 - 0
anki/collision/Collision.h

@@ -0,0 +1,12 @@
+#ifndef COLLISION_H
+#define COLLISION_H
+
+#include "anki/collision/Plane.h"
+#include "anki/collision/Sphere.h"
+#include "anki/collision/Obb.h"
+#include "anki/collision/Ray.h"
+#include "anki/collision/LineSegment.h"
+#include "anki/collision/PerspectiveCameraShape.h"
+
+
+#endif

+ 0 - 0
src/collision/CollisionShape.h → anki/collision/CollisionShape.h


+ 2 - 2
src/collision/LineSegment.cpp → anki/collision/LineSegment.cpp

@@ -1,5 +1,5 @@
-#include "LineSegment.h"
-#include "Plane.h"
+#include "anki/collision/LineSegment.h"
+#include "anki/collision/Plane.h"
 #include <algorithm>
 #include <algorithm>
 
 
 
 

+ 2 - 2
src/collision/LineSegment.h → anki/collision/LineSegment.h

@@ -1,8 +1,8 @@
 #ifndef LINE_SEGMENT_H
 #ifndef LINE_SEGMENT_H
 #define LINE_SEGMENT_H
 #define LINE_SEGMENT_H
 
 
-#include "CollisionShape.h"
-#include "math/Vec3.h"
+#include "anki/collision/CollisionShape.h"
+#include "anki/math/Vec3.h"
 
 
 
 
 /// @addtogroup Collision
 /// @addtogroup Collision

+ 2 - 2
src/collision/Obb.cpp → anki/collision/Obb.cpp

@@ -1,5 +1,5 @@
-#include "Obb.h"
-#include "Plane.h"
+#include "anki/collision/Obb.h"
+#include "anki/collision/Plane.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 3 - 3
src/collision/Obb.h → anki/collision/Obb.h

@@ -1,8 +1,8 @@
 #ifndef OBB_H
 #ifndef OBB_H
 #define OBB_H
 #define OBB_H
 
 
-#include "CollisionShape.h"
-#include "math/Math.h"
+#include "anki/collision/CollisionShape.h"
+#include "anki/math/Math.h"
 #include <boost/array.hpp>
 #include <boost/array.hpp>
 
 
 
 
@@ -110,7 +110,7 @@ inline Obb::Obb(const Vec3& center_, const Mat3& rotation_,
 {}
 {}
 
 
 
 
-#include "Obb.inl.h"
+#include "anki/collision/Obb.inl.h"
 
 
 
 
 #endif
 #endif

+ 0 - 0
src/collision/Obb.inl.h → anki/collision/Obb.inl.h


+ 2 - 2
src/collision/PerspectiveCameraShape.cpp → anki/collision/PerspectiveCameraShape.cpp

@@ -1,5 +1,5 @@
-#include "PerspectiveCameraShape.h"
-#include "LineSegment.h"
+#include "anki/collision/PerspectiveCameraShape.h"
+#include "anki/collision/LineSegment.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/collision/PerspectiveCameraShape.h → anki/collision/PerspectiveCameraShape.h

@@ -1,8 +1,8 @@
 #ifndef PROJECTION_CAMERA_SHAPE_H
 #ifndef PROJECTION_CAMERA_SHAPE_H
 #define PROJECTION_CAMERA_SHAPE_H
 #define PROJECTION_CAMERA_SHAPE_H
 
 
-#include "CollisionShape.h"
-#include "math/Math.h"
+#include "anki/collision/CollisionShape.h"
+#include "anki/math/Math.h"
 
 
 
 
 /// @addtogroup Collision
 /// @addtogroup Collision

+ 2 - 2
src/collision/Plane.cpp → anki/collision/Plane.cpp

@@ -1,5 +1,5 @@
-#include "Plane.h"
-#include "util/Assert.h"
+#include "anki/collision/Plane.h"
+#include "anki/util/Assert.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/collision/Plane.h → anki/collision/Plane.h

@@ -1,8 +1,8 @@
 #ifndef PLANE_H
 #ifndef PLANE_H
 #define PLANE_H
 #define PLANE_H
 
 
-#include "CollisionShape.h"
-#include "math/Math.h"
+#include "anki/collision/CollisionShape.h"
+#include "anki/math/Math.h"
 
 
 
 
 /// @addtogroup Collision
 /// @addtogroup Collision

+ 2 - 2
src/collision/Ray.cpp → anki/collision/Ray.cpp

@@ -1,5 +1,5 @@
-#include "Ray.h"
-#include "Plane.h"
+#include "anki/collision/Ray.h"
+#include "anki/collision/Plane.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/collision/Ray.h → anki/collision/Ray.h

@@ -1,8 +1,8 @@
 #ifndef RAY_H
 #ifndef RAY_H
 #define RAY_H
 #define RAY_H
 
 
-#include "CollisionShape.h"
-#include "math/Math.h"
+#include "anki/collision/CollisionShape.h"
+#include "anki/math/Math.h"
 
 
 
 
 class Plane;
 class Plane;

+ 2 - 2
src/collision/Sphere.cpp → anki/collision/Sphere.cpp

@@ -1,5 +1,5 @@
-#include "Sphere.h"
-#include "Plane.h"
+#include "anki/collision/Sphere.h"
+#include "anki/collision/Plane.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 3 - 3
src/collision/Sphere.h → anki/collision/Sphere.h

@@ -1,8 +1,8 @@
 #ifndef SPHERE_H
 #ifndef SPHERE_H
 #define SPHERE_H
 #define SPHERE_H
 
 
-#include "CollisionShape.h"
-#include "math/Math.h"
+#include "anki/collision/CollisionShape.h"
+#include "anki/math/Math.h"
 
 
 
 
 class Plane;
 class Plane;
@@ -93,7 +93,7 @@ inline Sphere::Sphere(const Vec3& center_, float radius_)
 {}
 {}
 
 
 
 
-#include "Sphere.inl.h"
+#include "anki/collision/Sphere.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/collision/Sphere.inl.h → anki/collision/Sphere.inl.h

@@ -1,6 +1,6 @@
 #include <boost/foreach.hpp>
 #include <boost/foreach.hpp>
 #include <boost/range/iterator_range.hpp>
 #include <boost/range/iterator_range.hpp>
-#include "util/Assert.h"
+#include "anki/util/Assert.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 4 - 4
src/core/App.cpp → anki/core/App.cpp

@@ -1,7 +1,7 @@
-#include "App.h"
-#include "Logger.h"
-#include "core/Globals.h"
-#include "util/Exception.h"
+#include "anki/core/App.h"
+#include "anki/core/Logger.h"
+#include "anki/core/Globals.h"
+#include "anki/util/Exception.h"
 #include <GL/glew.h>
 #include <GL/glew.h>
 #include <sstream>
 #include <sstream>
 #include <SDL/SDL.h>
 #include <SDL/SDL.h>

+ 2 - 2
src/core/App.h → anki/core/App.h

@@ -3,8 +3,8 @@
 
 
 #include <SDL/SDL.h>
 #include <SDL/SDL.h>
 #include <boost/filesystem.hpp>
 #include <boost/filesystem.hpp>
-#include "util/StdTypes.h"
-#include "Logger.h"
+#include "anki/util/StdTypes.h"
+#include "anki/core/Logger.h"
 
 
 
 
 class StdinListener;
 class StdinListener;

+ 4 - 4
src/core/AsyncLoader.cpp → anki/core/AsyncLoader.cpp

@@ -1,7 +1,7 @@
-#include "AsyncLoader.h"
-#include "Logger.h"
-#include "App.h"
-#include "core/Globals.h"
+#include "anki/core/AsyncLoader.h"
+#include "anki/core/Logger.h"
+#include "anki/core/App.h"
+#include "anki/core/Globals.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 0 - 0
src/core/AsyncLoader.h → anki/core/AsyncLoader.h


+ 0 - 0
src/core/CMakeLists.txt → anki/core/CMakeLists.txt


+ 2 - 5
src/core/Globals.h → anki/core/Globals.h

@@ -1,7 +1,7 @@
 #ifndef GLOBALS_H
 #ifndef GLOBALS_H
 #define GLOBALS_H
 #define GLOBALS_H
 
 
-#include "util/Singleton.h"
+#include "anki/util/Singleton.h"
 
 
 
 
 typedef Singleton<class Logger> LoggerSingleton;
 typedef Singleton<class Logger> LoggerSingleton;
@@ -14,10 +14,7 @@ typedef Singleton<class StdinListener> StdinListenerSingleton;
 typedef Singleton<class GlStateMachine> GlStateMachineSingleton;
 typedef Singleton<class GlStateMachine> GlStateMachineSingleton;
 typedef Singleton<class ScriptManager> ScriptManagerSingleton;
 typedef Singleton<class ScriptManager> ScriptManagerSingleton;
 typedef Singleton<class EventManager> EventManagerSingleton;
 typedef Singleton<class EventManager> EventManagerSingleton;
-
-namespace parallel {
-typedef Singleton<class Manager> ManagerSingleton;
-}
+typedef Singleton<class ParallelManager> ParallelManagerSingleton;
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/core/Logger.cpp → anki/core/Logger.cpp

@@ -1,5 +1,5 @@
 #include <cstring>
 #include <cstring>
-#include "Logger.h"
+#include "anki/core/Logger.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 1 - 1
src/core/Logger.h → anki/core/Logger.h

@@ -114,7 +114,7 @@ class Logger
 };
 };
 
 
 
 
-#include "Logger.inl.h"
+#include "anki/core/Logger.inl.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 0 - 0
src/core/Logger.inl.h → anki/core/Logger.inl.h


+ 3 - 3
src/core/Object.cpp → anki/core/Object.cpp

@@ -1,9 +1,9 @@
 #include <algorithm>
 #include <algorithm>
 #include <boost/foreach.hpp>
 #include <boost/foreach.hpp>
 
 
-#include "Object.h"
-#include "util/Assert.h"
-#include "util/Exception.h"
+#include "anki/core/Object.h"
+#include "anki/util/Assert.h"
+#include "anki/util/Exception.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 0 - 0
src/core/Object.h → anki/core/Object.h


+ 6 - 11
src/core/parallel/Job.cpp → anki/core/ParallelJob.cpp

@@ -1,14 +1,12 @@
-#include "Job.h"
-#include "Manager.h"
-
-
-namespace parallel {
+#include "anki/core/ParallelJob.h"
+#include "anki/core/ParallelManager.h"
 
 
 
 
 //==============================================================================
 //==============================================================================
 // Constructor                                                                 =
 // Constructor                                                                 =
 //==============================================================================
 //==============================================================================
-Job::Job(int id_, const Manager& manager_, boost::barrier& barrier_)
+ParallelJob::ParallelJob(int id_, const ParallelManager& manager_,
+	boost::barrier& barrier_)
 :	id(id_),
 :	id(id_),
  	barrier(barrier_),
  	barrier(barrier_),
 	callback(NULL),
 	callback(NULL),
@@ -21,7 +19,7 @@ Job::Job(int id_, const Manager& manager_, boost::barrier& barrier_)
 //==============================================================================
 //==============================================================================
 // assignNewJob                                                                =
 // assignNewJob                                                                =
 //==============================================================================
 //==============================================================================
-void Job::assignNewJob(JobCallback callback_, JobParameters& jobParams_)
+void ParallelJob::assignNewJob(ParallelJobCallback callback_, ParallelJobParameters& jobParams_)
 {
 {
 	boost::mutex::scoped_lock lock(mutex);
 	boost::mutex::scoped_lock lock(mutex);
 	callback = callback_;
 	callback = callback_;
@@ -35,7 +33,7 @@ void Job::assignNewJob(JobCallback callback_, JobParameters& jobParams_)
 //==============================================================================
 //==============================================================================
 // workingFunc                                                                 =
 // workingFunc                                                                 =
 //==============================================================================
 //==============================================================================
-void Job::workingFunc()
+void ParallelJob::workingFunc()
 {
 {
 	while(1)
 	while(1)
 	{
 	{
@@ -60,6 +58,3 @@ void Job::workingFunc()
 		barrier.wait();
 		barrier.wait();
 	}
 	}
 }
 }
-
-
-} // end namespace

+ 66 - 0
anki/core/ParallelJob.h

@@ -0,0 +1,66 @@
+#ifndef PARALLEL_JOB_H
+#define PARALLEL_JOB_H
+
+#include <boost/thread.hpp>
+
+
+class ParallelManager;
+class ParallelJob;
+
+
+/// The base class of the parameters the we pass in the job
+struct ParallelJobParameters
+{};
+
+
+/// The callback that we feed to the job
+typedef void (*ParallelJobCallback)(ParallelJobParameters&, const ParallelJob&);
+
+
+/// The thread that executes a ParallelJobCallback
+class ParallelJob
+{
+	public:
+		/// Constructor
+		ParallelJob(int id, const ParallelManager& manager,
+			boost::barrier& barrier);
+
+		/// @name Accessors
+		/// @{
+		uint getId() const
+		{
+			return id;
+		}
+
+		const ParallelManager& getManager() const
+		{
+			return manager;
+		}
+		/// @}
+
+		/// Assign new job to the thread
+		void assignNewJob(ParallelJobCallback callback, ParallelJobParameters& jobParams);
+
+	private:
+		uint id; ///< An ID
+		boost::thread thread; ///< Runs the workingFunc
+		boost::mutex mutex; ///< Protect the ParallelJob::job
+		boost::condition_variable condVar; ///< To wake up the thread
+		boost::barrier& barrier; ///< For synchronization
+		ParallelJobCallback callback; ///< Its NULL if there are no pending job
+		ParallelJobParameters* params;
+		/// Know your father and pass him to the jobs
+		const ParallelManager& manager;
+
+		/// Start thread
+		void start()
+		{
+			thread = boost::thread(&ParallelJob::workingFunc, this);
+		}
+
+		/// Thread loop
+		void workingFunc();
+};
+
+
+#endif

+ 3 - 9
src/core/parallel/Manager.cpp → anki/core/ParallelManager.cpp

@@ -1,21 +1,15 @@
-#include "Manager.h"
-
-
-namespace parallel {
+#include "anki/core/ParallelManager.h"
 
 
 
 
 //==============================================================================
 //==============================================================================
 // init                                                                        =
 // init                                                                        =
 //==============================================================================
 //==============================================================================
-void Manager::init(uint threadsNum)
+void ParallelManager::init(uint threadsNum)
 {
 {
 	barrier.reset(new boost::barrier(threadsNum + 1));
 	barrier.reset(new boost::barrier(threadsNum + 1));
 
 
 	for(uint i = 0; i < threadsNum; i++)
 	for(uint i = 0; i < threadsNum; i++)
 	{
 	{
-		jobs.push_back(new Job(i, *this, *barrier.get()));
+		jobs.push_back(new ParallelJob(i, *this, *barrier.get()));
 	}
 	}
 }
 }
-
-
-} // end namespace

+ 10 - 16
src/core/parallel/Manager.h → anki/core/ParallelManager.h

@@ -1,30 +1,27 @@
 #ifndef PARALLEL_MANAGER_H
 #ifndef PARALLEL_MANAGER_H
 #define PARALLEL_MANAGER_H
 #define PARALLEL_MANAGER_H
 
 
-#include "Job.h"
+#include "anki/core/ParallelJob.h"
 #include <boost/thread.hpp>
 #include <boost/thread.hpp>
 #include <boost/ptr_container/ptr_vector.hpp>
 #include <boost/ptr_container/ptr_vector.hpp>
 
 
 
 
-namespace parallel {
-
-
 /// The job manager
 /// The job manager
-class Manager
+class ParallelManager
 {
 {
 	public:
 	public:
 		/// Default constructor
 		/// Default constructor
-		Manager() {}
+		ParallelManager() {}
 
 
 		/// Constructor #2
 		/// Constructor #2
-		Manager(uint threadsNum) {init(threadsNum);}
+		ParallelManager(uint threadsNum) {init(threadsNum);}
 
 
 		/// Init the manager
 		/// Init the manager
 		void init(uint threadsNum);
 		void init(uint threadsNum);
 
 
 		/// Assign a job to a working thread
 		/// Assign a job to a working thread
-		void assignNewJob(uint threadId, JobCallback job,
-			JobParameters& jobParams);
+		void assignNewJob(uint threadId, ParallelJobCallback job,
+			ParallelJobParameters& jobParams);
 
 
 		/// Wait for all jobs to finish
 		/// Wait for all jobs to finish
 		void waitForAllJobsToFinish();
 		void waitForAllJobsToFinish();
@@ -32,25 +29,22 @@ class Manager
 		uint getThreadsNum() const {return jobs.size();}
 		uint getThreadsNum() const {return jobs.size();}
 
 
 	private:
 	private:
-		boost::ptr_vector<Job> jobs; ///< Worker threads
+		boost::ptr_vector<ParallelJob> jobs; ///< Worker threads
 		boost::scoped_ptr<boost::barrier> barrier; ///< Synchronization barrier
 		boost::scoped_ptr<boost::barrier> barrier; ///< Synchronization barrier
 };
 };
 
 
 
 
-inline void Manager::assignNewJob(uint jobId,
-	JobCallback callback, JobParameters& jobParams)
+inline void ParallelManager::assignNewJob(uint jobId,
+	ParallelJobCallback callback, ParallelJobParameters& jobParams)
 {
 {
 	jobs[jobId].assignNewJob(callback, jobParams);
 	jobs[jobId].assignNewJob(callback, jobParams);
 }
 }
 
 
 
 
-inline void Manager::waitForAllJobsToFinish()
+inline void ParallelManager::waitForAllJobsToFinish()
 {
 {
 	barrier->wait();
 	barrier->wait();
 }
 }
 
 
 
 
-} // end namespace
-
-
 #endif
 #endif

+ 1 - 1
src/core/StdinListener.cpp → anki/core/StdinListener.cpp

@@ -1,4 +1,4 @@
-#include "StdinListener.h"
+#include "anki/core/StdinListener.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 0 - 0
src/core/StdinListener.h → anki/core/StdinListener.h


+ 0 - 0
src/event/CMakeLists.txt → anki/event/CMakeLists.txt


+ 2 - 2
src/event/Event.cpp → anki/event/Event.cpp

@@ -1,5 +1,5 @@
-#include "Event.h"
-#include "util/Assert.h"
+#include "anki/event/Event.h"
+#include "anki/util/Assert.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 1 - 1
src/event/Event.h → anki/event/Event.h

@@ -1,7 +1,7 @@
 #ifndef EVENT_H
 #ifndef EVENT_H
 #define EVENT_H
 #define EVENT_H
 
 
-#include "util/StdTypes.h"
+#include "anki/util/StdTypes.h"
 
 
 
 
 /// The event type enum
 /// The event type enum

+ 1 - 1
src/event/EventManager.cpp → anki/event/EventManager.cpp

@@ -1,4 +1,4 @@
-#include "EventManager.h"
+#include "anki/event/EventManager.h"
 #include <boost/foreach.hpp>
 #include <boost/foreach.hpp>
 
 
 
 

+ 2 - 2
src/event/EventManager.h → anki/event/EventManager.h

@@ -1,7 +1,7 @@
 #ifndef MANAGER_H
 #ifndef MANAGER_H
 #define MANAGER_H
 #define MANAGER_H
 
 
-#include "Event.h"
+#include "anki/event/Event.h"
 #include <boost/ptr_container/ptr_deque.hpp>
 #include <boost/ptr_container/ptr_deque.hpp>
 
 
 
 
@@ -33,7 +33,7 @@ class EventManager
 };
 };
 
 
 
 
-#include "EventManager.inl.h"
+#include "anki/event/EventManager.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/event/EventManager.inl.h → anki/event/EventManager.inl.h

@@ -1,4 +1,4 @@
-#include "EventManager.h"
+#include "anki/event/EventManager.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 3 - 3
src/event/MainRendererPpsHdrEvent.cpp → anki/event/MainRendererPpsHdrEvent.cpp

@@ -1,6 +1,6 @@
-#include "MainRendererPpsHdrEvent.h"
-#include "renderer/MainRenderer.h"
-#include "core/Globals.h"
+#include "anki/event/MainRendererPpsHdrEvent.h"
+#include "anki/renderer/MainRenderer.h"
+#include "anki/core/Globals.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 1 - 1
src/event/MainRendererPpsHdrEvent.h → anki/event/MainRendererPpsHdrEvent.h

@@ -1,7 +1,7 @@
 #ifndef MAIN_RENDERER_PPS_HDR_EVENT_H
 #ifndef MAIN_RENDERER_PPS_HDR_EVENT_H
 #define MAIN_RENDERER_PPS_HDR_EVENT_H
 #define MAIN_RENDERER_PPS_HDR_EVENT_H
 
 
-#include "Event.h"
+#include "anki/event/Event.h"
 
 
 
 
 /// Change the HDR properties
 /// Change the HDR properties

+ 4 - 4
src/event/SceneColorEvent.cpp → anki/event/SceneColorEvent.cpp

@@ -1,7 +1,7 @@
-#include "SceneColorEvent.h"
-#include "scene/Scene.h"
-#include "core/Globals.h"
-#include "core/Logger.h"
+#include "anki/event/SceneColorEvent.h"
+#include "anki/scene/Scene.h"
+#include "anki/core/Globals.h"
+#include "anki/core/Logger.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/event/SceneColorEvent.h → anki/event/SceneColorEvent.h

@@ -1,8 +1,8 @@
 #ifndef SCENE_COLOR_EVENT_H
 #ifndef SCENE_COLOR_EVENT_H
 #define SCENE_COLOR_EVENT_H
 #define SCENE_COLOR_EVENT_H
 
 
-#include "Event.h"
-#include "math/Math.h"
+#include "anki/event/Event.h"
+#include "anki/math/Math.h"
 
 
 
 
 /// Change the scene color
 /// Change the scene color

+ 3 - 3
src/gl/BufferObject.cpp → anki/gl/BufferObject.cpp

@@ -1,7 +1,7 @@
 #include <cstring>
 #include <cstring>
-#include "BufferObject.h"
-#include "gl/GlException.h"
-#include "util/Exception.h"
+#include "anki/gl/BufferObject.h"
+#include "anki/gl/GlException.h"
+#include "anki/util/Exception.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/gl/BufferObject.h → anki/gl/BufferObject.h

@@ -2,8 +2,8 @@
 #define BUFFER_OBJECT_H
 #define BUFFER_OBJECT_H
 
 
 #include <GL/glew.h>
 #include <GL/glew.h>
-#include "util/Assert.h"
-#include "util/StdTypes.h"
+#include "anki/util/Assert.h"
+#include "anki/util/StdTypes.h"
 
 
 
 
 /// A wrapper for OpenGL buffer objects (vertex arrays, texture buffers etc)
 /// A wrapper for OpenGL buffer objects (vertex arrays, texture buffers etc)

+ 0 - 0
src/gl/CMakeLists.txt → anki/gl/CMakeLists.txt


+ 1 - 1
src/gl/Fbo.cpp → anki/gl/Fbo.cpp

@@ -1,4 +1,4 @@
-#include "Fbo.h"
+#include "anki/gl/Fbo.h"
 #include <boost/lexical_cast.hpp>
 #include <boost/lexical_cast.hpp>
 
 
 
 

+ 3 - 3
src/gl/Fbo.h → anki/gl/Fbo.h

@@ -2,9 +2,9 @@
 #define FBO_H
 #define FBO_H
 
 
 #include <GL/glew.h>
 #include <GL/glew.h>
-#include "util/Assert.h"
-#include "util/StdTypes.h"
-#include "util/Exception.h"
+#include "anki/util/Assert.h"
+#include "anki/util/StdTypes.h"
+#include "anki/util/Exception.h"
 
 
 
 
 /// The class is actually a wrapper to avoid common mistakes
 /// The class is actually a wrapper to avoid common mistakes

+ 5 - 5
src/gl/GlException.cpp → anki/gl/GlException.cpp

@@ -1,8 +1,8 @@
-#include "GlException.h"
-#include "util/Exception.h"
-#include "util/Assert.h"
-#include "core/Logger.h"
-#include "core/Globals.h"
+#include "anki/gl/GlException.h"
+#include "anki/util/Exception.h"
+#include "anki/util/Assert.h"
+#include "anki/core/Logger.h"
+#include "anki/core/Globals.h"
 #include <string>
 #include <string>
 #include <GL/glew.h>
 #include <GL/glew.h>
 
 

+ 0 - 0
src/gl/GlException.h → anki/gl/GlException.h


+ 1 - 1
src/gl/GlStateMachine.cpp → anki/gl/GlStateMachine.cpp

@@ -1,4 +1,4 @@
-#include "GlStateMachine.h"
+#include "anki/gl/GlStateMachine.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 1 - 1
src/gl/GlStateMachine.h → anki/gl/GlStateMachine.h

@@ -3,7 +3,7 @@
 
 
 #include <GL/glew.h>
 #include <GL/glew.h>
 #include <boost/unordered_map.hpp>
 #include <boost/unordered_map.hpp>
-#include "util/Assert.h"
+#include "anki/util/Assert.h"
 
 
 
 
 /// Access the GL state machine.
 /// Access the GL state machine.

+ 3 - 3
src/gl/TimeQuery.cpp → anki/gl/TimeQuery.cpp

@@ -1,6 +1,6 @@
-#include "TimeQuery.h"
-#include "util/Assert.h"
-#include "GlException.h"
+#include "anki/gl/TimeQuery.h"
+#include "anki/util/Assert.h"
+#include "anki/gl/GlException.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 0 - 0
src/gl/TimeQuery.h → anki/gl/TimeQuery.h


+ 4 - 4
src/gl/Vao.cpp → anki/gl/Vao.cpp

@@ -1,7 +1,7 @@
-#include "Vao.h"
-#include "Vbo.h"
-#include "util/Exception.h"
-#include "resource/ShaderProgramAttributeVariable.h"
+#include "anki/gl/Vao.h"
+#include "anki/gl/Vbo.h"
+#include "anki/util/Exception.h"
+#include "anki/resource/ShaderProgramAttributeVariable.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 4 - 4
src/gl/Vao.h → anki/gl/Vao.h

@@ -1,10 +1,10 @@
 #ifndef VAO_H
 #ifndef VAO_H
 #define VAO_H
 #define VAO_H
 
 
-#include "util/StdTypes.h"
-#include "util/Assert.h"
-#include "core/Object.h"
-#include "GlException.h"
+#include "anki/util/StdTypes.h"
+#include "anki/util/Assert.h"
+#include "anki/core/Object.h"
+#include "anki/gl/GlException.h"
 #include <GL/glew.h>
 #include <GL/glew.h>
 
 
 
 

+ 1 - 1
src/gl/Vbo.h → anki/gl/Vbo.h

@@ -1,7 +1,7 @@
 #ifndef VBO_H
 #ifndef VBO_H
 #define VBO_H
 #define VBO_H
 
 
-#include "BufferObject.h"
+#include "anki/gl/BufferObject.h"
 
 
 
 
 /// This is a wrapper for Vertex Buffer Objects to prevent us from making
 /// This is a wrapper for Vertex Buffer Objects to prevent us from making

+ 0 - 0
src/input/CMakeLists.txt → anki/input/CMakeLists.txt


+ 4 - 4
src/input/Input.cpp → anki/input/Input.cpp

@@ -1,7 +1,7 @@
-#include "core/App.h"
-#include "core/Logger.h"
-#include "core/Globals.h"
-#include "Input.h"
+#include "anki/core/App.h"
+#include "anki/core/Logger.h"
+#include "anki/core/Globals.h"
+#include "anki/input/Input.h"
 #include <SDL/SDL.h>
 #include <SDL/SDL.h>
 
 
 
 

+ 1 - 1
src/input/Input.h → anki/input/Input.h

@@ -1,7 +1,7 @@
 #ifndef INPUT_H
 #ifndef INPUT_H
 #define INPUT_H
 #define INPUT_H
 
 
-#include "math/Math.h"
+#include "anki/math/Math.h"
 #include <SDL/SDL_scancode.h>
 #include <SDL/SDL_scancode.h>
 #include <boost/array.hpp>
 #include <boost/array.hpp>
 
 

+ 3 - 3
src/math/Axisang.h → anki/math/Axisang.h

@@ -1,8 +1,8 @@
 #ifndef AXISANG_H
 #ifndef AXISANG_H
 #define AXISANG_H
 #define AXISANG_H
 
 
-#include "Vec3.h"
-#include "MathCommonIncludes.h"
+#include "anki/math/Vec3.h"
+#include "anki/math/MathCommonIncludes.h"
 
 
 
 
 /// @addtogroup Math
 /// @addtogroup Math
@@ -52,7 +52,7 @@ class Axisang
 /// @}
 /// @}
 
 
 
 
-#include "Axisang.inl.h"
+#include "anki/math/Axisang.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/math/Axisang.inl.h → anki/math/Axisang.inl.h

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 0 - 0
src/math/CMakeLists.txt → anki/math/CMakeLists.txt


+ 2 - 2
src/math/Euler.h → anki/math/Euler.h

@@ -1,7 +1,7 @@
 #ifndef EULER_H
 #ifndef EULER_H
 #define EULER_H
 #define EULER_H
 
 
-#include "MathCommonIncludes.h"
+#include "anki/math/MathCommonIncludes.h"
 
 
 
 
 /// @addtogroup Math
 /// @addtogroup Math
@@ -60,7 +60,7 @@ class Euler
 /// @}
 /// @}
 
 
 
 
-#include "Euler.inl.h"
+#include "anki/math/Euler.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/math/Euler.inl.h → anki/math/Euler.inl.h

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/math/Mat3.h → anki/math/Mat3.h

@@ -1,7 +1,7 @@
 #ifndef MAT3_H
 #ifndef MAT3_H
 #define MAT3_H
 #define MAT3_H
 
 
-#include "MathCommonIncludes.h"
+#include "anki/math/MathCommonIncludes.h"
 
 
 
 
 /// @addtogroup Math
 /// @addtogroup Math
@@ -123,7 +123,7 @@ class Mat3
 /// @}
 /// @}
 
 
 
 
-#include "Mat3.inl.h"
+#include "anki/math/Mat3.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/math/Mat3.inl.h → anki/math/Mat3.inl.h

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/math/Mat4.h → anki/math/Mat4.h

@@ -1,7 +1,7 @@
 #ifndef MAT4_H
 #ifndef MAT4_H
 #define MAT4_H
 #define MAT4_H
 
 
-#include "MathCommonIncludes.h"
+#include "anki/math/MathCommonIncludes.h"
 
 
 
 
 /// @addtogroup Math
 /// @addtogroup Math
@@ -131,7 +131,7 @@ class Mat4
 /// @}
 /// @}
 
 
 
 
-#include "Mat4.inl.h"
+#include "anki/math/Mat4.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/math/Mat4.inl.h → anki/math/Mat4.inl.h

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 1 - 1
src/math/Math.cpp → anki/math/Math.cpp

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/math/Math.h → anki/math/Math.h

@@ -1,7 +1,7 @@
 #ifndef MATH_H
 #ifndef MATH_H
 #define MATH_H
 #define MATH_H
 
 
-#include "MathCommonIncludes.h"
+#include "anki/math/MathCommonIncludes.h"
 
 
 
 
 /// @addtogroup Math
 /// @addtogroup Math
@@ -53,7 +53,7 @@ class Math
 /// @}
 /// @}
 
 
 
 
-#include "Math.inl.h"
+#include "anki/math/Math.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/math/Math.inl.h → anki/math/Math.inl.h

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 inline float Math::sqrt(const float f)
 inline float Math::sqrt(const float f)

+ 3 - 0
anki/math/MathCommonIncludes.h

@@ -0,0 +1,3 @@
+#include "anki/math/MathForward.h"
+#include "anki/math/MathSimd.h"
+#include <boost/array.hpp>

+ 12 - 0
anki/math/MathCommonSrc.h

@@ -0,0 +1,12 @@
+#include "anki/math/Vec2.h"
+#include "anki/math/Vec3.h"
+#include "anki/math/Vec4.h"
+#include "anki/math/Quat.h"
+#include "anki/math/Axisang.h"
+#include "anki/math/Euler.h"
+#include "anki/math/Mat3.h"
+#include "anki/math/Mat4.h"
+#include "anki/math/Transform.h"
+#include "anki/math/Math.h"
+#include "anki/util/Assert.h"
+#include <cmath>

+ 0 - 0
src/math/MathForward.h → anki/math/MathForward.h


+ 0 - 0
src/math/MathSimd.h → anki/math/MathSimd.h


+ 2 - 2
src/math/Quat.h → anki/math/Quat.h

@@ -1,7 +1,7 @@
 #ifndef QUAT_H
 #ifndef QUAT_H
 #define QUAT_H
 #define QUAT_H
 
 
-#include "MathCommonIncludes.h"
+#include "anki/math/MathCommonIncludes.h"
 
 
 
 
 /// @addtogroup Math
 /// @addtogroup Math
@@ -85,7 +85,7 @@ class Quat
 /// @}
 /// @}
 
 
 
 
-#include "Quat.inl.h"
+#include "anki/math/Quat.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/math/Quat.inl.h → anki/math/Quat.inl.h

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 4 - 4
src/math/Transform.h → anki/math/Transform.h

@@ -1,9 +1,9 @@
 #ifndef TRANSFORM_H
 #ifndef TRANSFORM_H
 #define TRANSFORM_H
 #define TRANSFORM_H
 
 
-#include "Vec3.h"
-#include "Mat3.h"
-#include "MathCommonIncludes.h"
+#include "anki/math/Vec3.h"
+#include "anki/math/Mat3.h"
+#include "anki/math/MathCommonIncludes.h"
 
 
 
 
 /// @addtogroup Math
 /// @addtogroup Math
@@ -61,7 +61,7 @@ class Transform
 /// @}
 /// @}
 
 
 
 
-#include "Transform.inl.h"
+#include "anki/math/Transform.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/math/Transform.inl.h → anki/math/Transform.inl.h

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/math/Vec2.h → anki/math/Vec2.h

@@ -1,7 +1,7 @@
 #ifndef VEC2_H
 #ifndef VEC2_H
 #define VEC2_H
 #define VEC2_H
 
 
-#include "MathCommonIncludes.h"
+#include "anki/math/MathCommonIncludes.h"
 
 
 
 
 /// @addtogroup Math
 /// @addtogroup Math
@@ -93,7 +93,7 @@ class Vec2
 /// @}
 /// @}
 
 
 
 
-#include "Vec2.inl.h"
+#include "anki/math/Vec2.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/math/Vec2.inl.h → anki/math/Vec2.inl.h

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/math/Vec3.h → anki/math/Vec3.h

@@ -1,7 +1,7 @@
 #ifndef VEC3_H
 #ifndef VEC3_H
 #define VEC3_H
 #define VEC3_H
 
 
-#include "MathCommonIncludes.h"
+#include "anki/math/MathCommonIncludes.h"
 
 
 /// @addtogroup Math
 /// @addtogroup Math
 /// @{
 /// @{
@@ -130,7 +130,7 @@ class Vec3
 /// @}
 /// @}
 
 
 
 
-#include "Vec3.inl.h"
+#include "anki/math/Vec3.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/math/Vec3.inl.h → anki/math/Vec3.inl.h

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/math/Vec4.h → anki/math/Vec4.h

@@ -1,7 +1,7 @@
 #ifndef VEC4_H
 #ifndef VEC4_H
 #define VEC4_H
 #define VEC4_H
 
 
-#include "MathCommonIncludes.h"
+#include "anki/math/MathCommonIncludes.h"
 
 
 
 
 /// @addtogroup Math
 /// @addtogroup Math
@@ -116,7 +116,7 @@ class Vec4
 /// @}
 /// @}
 
 
 
 
-#include "Vec4.inl.h"
+#include "anki/math/Vec4.inl.h"
 
 
 
 
 #endif
 #endif

+ 1 - 1
src/math/Vec4.inl.h → anki/math/Vec4.inl.h

@@ -1,4 +1,4 @@
-#include "MathCommonSrc.h"
+#include "anki/math/MathCommonSrc.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 0 - 0
src/misc/CMakeLists.txt → anki/misc/CMakeLists.txt


+ 3 - 3
src/misc/Parser.h → anki/misc/Parser.h

@@ -2,8 +2,8 @@
 #define PARSER_H
 #define PARSER_H
 
 
 #include <boost/lexical_cast.hpp>
 #include <boost/lexical_cast.hpp>
-#include "util/Exception.h"
-#include "util/scanner/Scanner.h"
+#include "anki/util/Exception.h"
+#include "anki/util/scanner/Scanner.h"
 
 
 
 
 /// It contains some functions and macros that are used pretty often while
 /// It contains some functions and macros that are used pretty often while
@@ -69,7 +69,7 @@ extern std::string parseString(scanner::Scanner& scanner);
 } // end namespace
 } // end namespace
 
 
 
 
-#include "Parser.inl.h"
+#include "anki/misc/Parser.inl.h"
 
 
 
 
 #endif
 #endif

+ 2 - 2
src/misc/Parser.inl.h → anki/misc/Parser.inl.h

@@ -1,6 +1,6 @@
 #include <cstring>
 #include <cstring>
-#include "Parser.h"
-#include "util/Exception.h"
+#include "anki/misc/Parser.h"
+#include "anki/util/Exception.h"
 
 
 
 
 namespace parser {
 namespace parser {

+ 2 - 2
src/misc/PropertyTree.cpp → anki/misc/PropertyTree.cpp

@@ -1,6 +1,6 @@
 #include <boost/property_tree/ptree.hpp>
 #include <boost/property_tree/ptree.hpp>
-#include "PropertyTree.h"
-#include "util/Exception.h"
+#include "anki/misc/PropertyTree.h"
+#include "anki/util/Exception.h"
 
 
 
 
 namespace PropertyTree {
 namespace PropertyTree {

+ 1 - 1
src/misc/PropertyTree.h → anki/misc/PropertyTree.h

@@ -3,7 +3,7 @@
 
 
 #include <boost/optional.hpp>
 #include <boost/optional.hpp>
 #include <boost/property_tree/ptree_fwd.hpp>
 #include <boost/property_tree/ptree_fwd.hpp>
-#include "math/Math.h"
+#include "anki/math/Math.h"
 
 
 
 
 namespace PropertyTree {
 namespace PropertyTree {

+ 5 - 0
anki/misc/TestHeader.cpp

@@ -0,0 +1,5 @@
+#include "anki/math/Vec2.h"
+
+
+
+

+ 7 - 0
anki/physics/CMakeLists.txt

@@ -0,0 +1,7 @@
+FILE(GLOB PHYS_SOURCES *.cpp)
+FILE(GLOB PHYS_HEADERS *.h)
+
+ADD_LIBRARY(physics ${PHYS_SOURCES} ${PHYS_HEADERS})
+
+TARGET_LINK_LIBRARIES(physics BulletDynamics 
+	BulletCollision LinearMath)

+ 5 - 5
src/physics/Character.cpp → anki/physics/Character.cpp

@@ -3,11 +3,11 @@
 #include <btBulletDynamicsCommon.h>
 #include <btBulletDynamicsCommon.h>
 #include <BulletCollision/CollisionDispatch/btGhostObject.h>
 #include <BulletCollision/CollisionDispatch/btGhostObject.h>
 #include <BulletDynamics/Character/btKinematicCharacterController.h>
 #include <BulletDynamics/Character/btKinematicCharacterController.h>
-#include "Character.h"
-#include "PhysWorld.h"
-#include "MotionState.h"
-#include "RigidBody.h"
-#include "PhysWorld.h"
+#include "anki/physics/Character.h"
+#include "anki/physics/PhysWorld.h"
+#include "anki/physics/MotionState.h"
+#include "anki/physics/RigidBody.h"
+#include "anki/physics/PhysWorld.h"
 
 
 
 
 //==============================================================================
 //==============================================================================

+ 2 - 2
src/physics/Character.h → anki/physics/Character.h

@@ -1,8 +1,8 @@
 #ifndef CHARACTER_H
 #ifndef CHARACTER_H
 #define CHARACTER_H
 #define CHARACTER_H
 
 
-#include "math/Math.h"
-#include "core/Object.h"
+#include "anki/math/Math.h"
+#include "anki/core/Object.h"
 
 
 
 
 class btPairCachingGhostObject;
 class btPairCachingGhostObject;

+ 1 - 1
src/physics/Convertors.h → anki/physics/Convertors.h

@@ -3,7 +3,7 @@
 
 
 #include <btBulletCollisionCommon.h>
 #include <btBulletCollisionCommon.h>
 #include <btBulletDynamicsCommon.h>
 #include <btBulletDynamicsCommon.h>
-#include "math/Math.h"
+#include "anki/math/Math.h"
 
 
 
 
 inline Vec3 toAnki(const btVector3& v)
 inline Vec3 toAnki(const btVector3& v)

+ 1 - 1
src/physics/MotionState.h → anki/physics/MotionState.h

@@ -2,7 +2,7 @@
 #define MOTION_STATE_H
 #define MOTION_STATE_H
 
 
 #include <LinearMath/btMotionState.h>
 #include <LinearMath/btMotionState.h>
-#include "scene/SceneNode.h"
+#include "anki/scene/SceneNode.h"
 
 
 
 
 /// A custom motion state
 /// A custom motion state

Some files were not shown because too many files changed in this diff