Просмотр исходного кода

Refactoring:
- All dirs to lowercase
- All dirs same name as the namespace
- All namespaces to lowercase

Panagiotis Christopoulos Charitos 14 лет назад
Родитель
Сommit
38f4f614cd
100 измененных файлов с 215 добавлено и 393 удалено
  1. 3 6
      src/CMakeLists.txt
  2. 0 4
      src/Collision/CMakeLists.txt
  3. 0 4
      src/Events/CMakeLists.txt
  4. 0 6
      src/GfxApi/CMakeLists.txt
  5. 0 4
      src/Input/CMakeLists.txt
  6. 64 64
      src/Main.cpp
  7. 0 4
      src/Math/CMakeLists.txt
  8. 0 5
      src/Misc/TestHeader.cpp
  9. 0 4
      src/Physics/CMakeLists.txt
  10. 0 4
      src/Renderer/CMakeLists.txt
  11. 0 4
      src/Resources/CMakeLists.txt
  12. 0 6
      src/Scripting/CMakeLists.txt
  13. 0 32
      src/Scripting/Core/Globals.bpi.cpp
  14. 0 11
      src/Scripting/Events/MainRendererPpsHdr.bpi.cpp
  15. 0 17
      src/Scripting/Events/Manager.bpi.cpp
  16. 0 11
      src/Scripting/Events/SceneColor.bpi.cpp
  17. 0 19
      src/Scripting/Renderer/Bl.bpi.cpp
  18. 0 11
      src/Scripting/Renderer/Dbg.bpi.cpp
  19. 0 19
      src/Scripting/Renderer/Hdr.bpi.cpp
  20. 0 16
      src/Scripting/Renderer/MainRenderer.bpi.cpp
  21. 0 16
      src/Scripting/Renderer/Pps.bpi.cpp
  22. 4 0
      src/cln/CMakeLists.txt
  23. 0 0
      src/cln/Collision.h
  24. 4 4
      src/cln/CollisionShape.h
  25. 1 1
      src/cln/LineSegment.cpp
  26. 4 4
      src/cln/LineSegment.h
  27. 1 1
      src/cln/Obb.cpp
  28. 4 4
      src/cln/Obb.h
  29. 1 1
      src/cln/Obb.inl.h
  30. 2 2
      src/cln/Plane.cpp
  31. 5 5
      src/cln/Plane.h
  32. 1 1
      src/cln/Ray.cpp
  33. 5 5
      src/cln/Ray.h
  34. 1 1
      src/cln/Sphere.cpp
  35. 4 4
      src/cln/Sphere.h
  36. 3 3
      src/cln/Sphere.inl.h
  37. 2 2
      src/core/App.cpp
  38. 2 2
      src/core/App.h
  39. 1 1
      src/core/AsyncLoader.cpp
  40. 0 0
      src/core/AsyncLoader.h
  41. 1 1
      src/core/CMakeLists.txt
  42. 3 3
      src/core/Globals.h
  43. 0 0
      src/core/Logger.cpp
  44. 0 0
      src/core/Logger.h
  45. 0 0
      src/core/Logger.inl.h
  46. 2 2
      src/core/Object.cpp
  47. 1 1
      src/core/Object.h
  48. 0 0
      src/core/StdinListener.cpp
  49. 1 1
      src/core/StdinListener.h
  50. 0 0
      src/core/parallel/Job.cpp
  51. 1 1
      src/core/parallel/Job.h
  52. 0 0
      src/core/parallel/Manager.cpp
  53. 0 0
      src/core/parallel/Manager.h
  54. 4 0
      src/event/CMakeLists.txt
  55. 2 2
      src/event/Event.cpp
  56. 3 3
      src/event/Event.h
  57. 6 6
      src/event/MainRendererPpsHdr.cpp
  58. 1 1
      src/event/MainRendererPpsHdr.h
  59. 1 1
      src/event/Manager.cpp
  60. 1 1
      src/event/Manager.h
  61. 1 1
      src/event/Manager.inl.h
  62. 4 4
      src/event/SceneColor.cpp
  63. 2 2
      src/event/SceneColor.h
  64. 2 2
      src/gl/BufferObject.cpp
  65. 2 2
      src/gl/BufferObject.h
  66. 6 0
      src/gl/CMakeLists.txt
  67. 0 0
      src/gl/Fbo.cpp
  68. 3 3
      src/gl/Fbo.h
  69. 4 4
      src/gl/GlException.cpp
  70. 0 0
      src/gl/GlException.h
  71. 0 0
      src/gl/GlStateMachine.cpp
  72. 1 1
      src/gl/GlStateMachine.h
  73. 1 1
      src/gl/TimeQuery.cpp
  74. 0 0
      src/gl/TimeQuery.h
  75. 2 2
      src/gl/Vao.cpp
  76. 3 3
      src/gl/Vao.h
  77. 0 0
      src/gl/Vbo.h
  78. 4 0
      src/i/CMakeLists.txt
  79. 3 3
      src/i/Input.cpp
  80. 3 3
      src/i/Input.h
  81. 1 1
      src/m/Axisang.h
  82. 6 6
      src/m/Axisang.inl.h
  83. 4 0
      src/m/CMakeLists.txt
  84. 3 3
      src/m/Common.h
  85. 1 1
      src/m/Common.inl.h
  86. 1 1
      src/m/Euler.h
  87. 2 2
      src/m/Euler.inl.h
  88. 1 1
      src/m/Funcs.cpp
  89. 1 1
      src/m/Funcs.h
  90. 1 1
      src/m/Funcs.inl.h
  91. 1 1
      src/m/Mat3.h
  92. 1 1
      src/m/Mat3.inl.h
  93. 1 1
      src/m/Mat4.h
  94. 1 1
      src/m/Mat4.inl.h
  95. 1 1
      src/m/Math.h
  96. 1 1
      src/m/Quat.h
  97. 3 3
      src/m/Quat.inl.h
  98. 2 2
      src/m/Transform.h
  99. 2 2
      src/m/Transform.inl.h
  100. 1 1
      src/m/Vec2.h

+ 3 - 6
src/CMakeLists.txt

@@ -2,16 +2,13 @@ PROJECT(ANKI_PROJ)
 
 INCLUDE_DIRECTORIES(${ANKI_PROJ_SOURCE_DIR})
 
-SET(ANKI_DIRS Scripting Misc Renderer Scene Ui Events 
-	Input Physics Resources GfxApi Collision Math Core Util)
+SET(ANKI_LIBS script r scene ui event 
+	i phys rsrc core misc gl cln m util)
 
-SUBDIRS(${ANKI_DIRS})
+SUBDIRS(${ANKI_LIBS})
 
 ADD_EXECUTABLE(anki Main.cpp)
 
-SET(ANKI_LIBS Scripting Renderer Scene Ui Events 
-	Input Physics Resources Core Misc GfxApi Collision Math Util)
-
 TARGET_LINK_LIBRARIES(anki ${ANKI_LIBS} BulletSoftBody BulletDynamics 
 	BulletCollision LinearMath GLEW GLU GL jpeg SDL png python2.6
 	boost_system boost_python boost_filesystem boost_thread freetype) 

+ 0 - 4
src/Collision/CMakeLists.txt

@@ -1,4 +0,0 @@
-FILE(GLOB COLLISION_SOURCES *.cpp)
-FILE(GLOB COLLISION_HEADERS *.h)
-
-ADD_LIBRARY(Collision ${COLLISION_SOURCES} ${COLLISION_HEADERS})

+ 0 - 4
src/Events/CMakeLists.txt

@@ -1,4 +0,0 @@
-FILE(GLOB EVENTS_SOURCES *.cpp)
-FILE(GLOB EVENTS_HEADERS *.h)
-
-ADD_LIBRARY(Events ${EVENTS_SOURCES} ${EVENTS_HEADERS})

+ 0 - 6
src/GfxApi/CMakeLists.txt

@@ -1,6 +0,0 @@
-FILE(GLOB_RECURSE GFX_API_SOURCES *.cpp)
-FILE(GLOB_RECURSE GFX_API_HEADERS *.h)
-
-#INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/BufferObjects")
-
-ADD_LIBRARY(GfxApi ${GFX_API_SOURCES} ${GFX_API_HEADERS})

+ 0 - 4
src/Input/CMakeLists.txt

@@ -1,4 +0,0 @@
-FILE(GLOB INPUT_SOURCES *.cpp)
-FILE(GLOB INPUT_HEADERS *.h)
-
-ADD_LIBRARY(Input ${INPUT_SOURCES} ${INPUT_HEADERS})

+ 64 - 64
src/Main.cpp

@@ -2,50 +2,50 @@
 #include <iostream>
 #include <fstream>
 
-#include "Input/Input.h"
-#include "Scene/PerspectiveCamera.h"
-#include "Scene/OrthographicCamera.h"
-#include "Math/Math.h"
-#include "Renderer/Renderer.h"
-#include "Ui/Painter.h"
-#include "Core/App.h"
-#include "Resources/Mesh.h"
-#include "Scene/Light.h"
-#include "Scene/PointLight.h"
-#include "Scene/SpotLight.h"
-#include "Resources/Material.h"
-#include "Scene/Scene.h"
-#include "Util/scanner/Scanner.h"
-#include "Resources/SkelAnim.h"
-#include "Resources/LightRsrc.h"
-#include "Misc/Parser.h"
-#include "Scene/ParticleEmitterNode.h"
-#include "Physics/Character.h"
-#include "Renderer/Renderer.h"
-#include "Renderer/RendererInitializer.h"
-#include "Renderer/MainRenderer.h"
-#include "Physics/Character.h"
-#include "Physics/RigidBody.h"
-#include "Scripting/ScriptingEngine.h"
-#include "Core/StdinListener.h"
-#include "Scene/ModelNode.h"
-#include "Resources/Model.h"
-#include "Core/Logger.h"
-#include "Util/Util.h"
-#include "Util/HighRezTimer.h"
-#include "Scene/SkinNode.h"
-#include "Resources/Skin.h"
-#include "Scene/MaterialRuntime.h"
-#include "Core/Globals.h"
-#include "Ui/FtFontLoader.h"
-#include "Ui/Font.h"
-#include "Events/Manager.h"
-#include "Events/SceneColor.h"
-#include "Events/MainRendererPpsHdr.h"
-#include "Resources/ShaderProgramPrePreprocessor.h"
-#include "Resources/Material.h"
-#include "Core/parallel/Manager.h"
-#include "Renderer/Drawers/PhysDbgDrawer.h"
+#include "i/Input.h"
+#include "scene/PerspectiveCamera.h"
+#include "scene/OrthographicCamera.h"
+#include "m/Math.h"
+#include "r/Renderer.h"
+#include "ui/Painter.h"
+#include "core/App.h"
+#include "rsrc/Mesh.h"
+#include "scene/Light.h"
+#include "scene/PointLight.h"
+#include "scene/SpotLight.h"
+#include "rsrc/Material.h"
+#include "scene/Scene.h"
+#include "util/scanner/Scanner.h"
+#include "rsrc/SkelAnim.h"
+#include "rsrc/LightRsrc.h"
+#include "misc/Parser.h"
+#include "scene/ParticleEmitterNode.h"
+#include "phys/Character.h"
+#include "r/Renderer.h"
+#include "r/RendererInitializer.h"
+#include "r/MainRenderer.h"
+#include "phys/Character.h"
+#include "phys/RigidBody.h"
+#include "script/ScriptingEngine.h"
+#include "core/StdinListener.h"
+#include "scene/ModelNode.h"
+#include "rsrc/Model.h"
+#include "core/Logger.h"
+#include "util/Util.h"
+#include "util/HighRezTimer.h"
+#include "scene/SkinNode.h"
+#include "rsrc/Skin.h"
+#include "scene/MaterialRuntime.h"
+#include "core/Globals.h"
+#include "ui/FtFontLoader.h"
+#include "ui/Font.h"
+#include "event/Manager.h"
+#include "event/SceneColor.h"
+#include "event/MainRendererPpsHdr.h"
+#include "rsrc/ShaderProgramPrePreprocessor.h"
+#include "rsrc/Material.h"
+#include "core/parallel/Manager.h"
+#include "r/PhysDbgDrawer.h"
 
 
 // map (hard coded)
@@ -55,9 +55,9 @@ SkinNode* imp;
 PointLight* point_lights[10];
 SpotLight* spot_lights[2];
 ParticleEmitterNode* partEmitter;
-Phys::Character* character;
+phys::Character* character;
 
-Ui::Painter* painter;
+ui::Painter* painter;
 
 
 // Physics
@@ -83,12 +83,12 @@ void initPhysics()
 	groundTransform.setIdentity();
 	groundTransform.setOrigin(Vec3(0,-50, 0));
 
-	Phys::RigidBody::Initializer init;
+	phys::RigidBody::Initializer init;
 	init.mass = 0.0;
 	init.shape = groundShape;
 	init.startTrf = groundTransform;
 
-	new Phys::RigidBody(SceneSingleton::getInstance().getPhysMasterContainer(), init);
+	new phys::RigidBody(SceneSingleton::getInstance().getPhysMasterContainer(), init);
 
 
 	/*{
@@ -131,14 +131,14 @@ void init()
 
 	srand(unsigned(time(NULL)));
 
-	painter = new Ui::Painter(Vec2(AppSingleton::getInstance().getWindowWidth(),
+	painter = new ui::Painter(Vec2(AppSingleton::getInstance().getWindowWidth(),
 	                               AppSingleton::getInstance().getWindowHeight()));
 	painter->setFont("engine-rsrc/ModernAntiqua.ttf", 25, 25);
 
 	// camera
 	PerspectiveCamera* cam = new PerspectiveCamera(false, NULL);
-	//cam->setAll(toRad(100.0), toRad(100.0) / R::MainRendererSingleton::getInstance().getAspectRatio(), 0.5, 200.0);
-	cam->setAll(R::MainRendererSingleton::getInstance().getAspectRatio()*toRad(60.0), toRad(60.0), 0.5, 200.0);
+	//cam->setAll(toRad(100.0), toRad(100.0) / r::MainRendererSingleton::getInstance().getAspectRatio(), 0.5, 200.0);
+	cam->setAll(r::MainRendererSingleton::getInstance().getAspectRatio()*toRad(60.0), toRad(60.0), 0.5, 200.0);
 	cam->moveLocalY(3.0);
 	cam->moveLocalZ(5.7);
 	cam->moveLocalX(-0.3);
@@ -195,18 +195,18 @@ void init()
 	// sarge
 	/*sarge = new MeshNode();
 	sarge->init("meshes/sphere/sphere16.mesh");
-	//sarge->setLocalTransform(Vec3(0, -2.8, 1.0), Mat3(Euler(-M::PI/2, 0.0, 0.0)), 1.1);
+	//sarge->setLocalTransform(Vec3(0, -2.8, 1.0), Mat3(Euler(-m::PI/2, 0.0, 0.0)), 1.1);
 	sarge->setLocalTransform(Transform(Vec3(0, 2.0, 2.0), Mat3::getIdentity(), 0.4));
 	
 	// floor
 	floor__ = new MeshNode();
 	floor__->init("maps/temple/Cube.019.mesh");
-	floor__->setLocalTransform(Transform(Vec3(0.0, -0.19, 0.0), Mat3(Euler(-M::PI/2, 0.0, 0.0)), 0.8));*/
+	floor__->setLocalTransform(Transform(Vec3(0.0, -0.19, 0.0), Mat3(Euler(-m::PI/2, 0.0, 0.0)), 0.8));*/
 
 	// imp	
 	/*imp = new SkelModelNode();
 	imp->init("models/imp/imp.smdl");
-	//imp->setLocalTransform(Transform(Vec3(0.0, 2.11, 0.0), Mat3(Euler(-M::PI/2, 0.0, 0.0)), 0.7));
+	//imp->setLocalTransform(Transform(Vec3(0.0, 2.11, 0.0), Mat3(Euler(-m::PI/2, 0.0, 0.0)), 0.7));
 	SkelAnimCtrl* ctrl = new SkelAnimCtrl(*imp->meshNodes[0]->meshSkelCtrl->skelNode);
 	ctrl->skelAnim.loadRsrc("models/imp/walk.imp.anim");
 	ctrl->step = 0.8;*/
@@ -317,7 +317,7 @@ void mainLoopExtra()
 	/*if(InputSingleton::getInstance().getKey(SDL_SCANCODE_F) == 1)
 	{
 		Event::ManagerSingleton::getInstance().createEvent(Event::MainRendererPpsHdr(HighRezTimer::getCrntTime() + 5,
-			5, R::MainRendererSingleton::getInstance().getPps().getHdr().getExposure() + 20.0, 3, 1.4));
+			5, r::MainRendererSingleton::getInstance().getPps().getHdr().getExposure() + 20.0, 3, 1.4));
 	}*/
 
 
@@ -333,7 +333,7 @@ void mainLoopExtra()
 	if(InputSingleton::getInstance().getKey(SDL_SCANCODE_Y) == 1)
 	{
 		INFO("Exec script");
-		ScriptingEngineSingleton::getInstance().execScript(Util::readFile("test.py").c_str());
+		ScriptingEngineSingleton::getInstance().execScript(util::readFile("test.py").c_str());
 	}
 
 	mover->getLocalTransform().getRotation().reorthogonalize();
@@ -381,13 +381,13 @@ void mainLoop()
 		SceneSingleton::getInstance().updateAllWorldStuff(prevUpdateTime, crntTime);
 		SceneSingleton::getInstance().doVisibilityTests(*AppSingleton::getInstance().getActiveCam());
 		SceneSingleton::getInstance().updateAllControllers();
-		Event::ManagerSingleton::getInstance().updateAllEvents(prevUpdateTime, crntTime);
-		R::MainRendererSingleton::getInstance().render(*AppSingleton::getInstance().getActiveCam());
+		event::ManagerSingleton::getInstance().updateAllEvents(prevUpdateTime, crntTime);
+		r::MainRendererSingleton::getInstance().render(*AppSingleton::getInstance().getActiveCam());
 
 		painter->setPosition(Vec2(0.0, 0.1));
 		painter->setColor(Vec4(1.0));
 		//painter->drawText("A");
-		const R::MainRenderer& r = R::MainRendererSingleton::getInstance();
+		const r::MainRenderer& r = r::MainRendererSingleton::getInstance();
 		std::stringstream ss;
 		ss << "MS: " << r.getMsTime() * 1000000 << " IS: " <<
 			r.getIsTime() * 1000000 << " BS: " << r.getBsTime() * 1000000 <<
@@ -410,7 +410,7 @@ void mainLoop()
 
 		if(InputSingleton::getInstance().getKey(SDL_SCANCODE_F12) == 1)
 		{
-			R::MainRendererSingleton::getInstance().takeScreenshot("gfx/screenshot.jpg");
+			r::MainRendererSingleton::getInstance().takeScreenshot("gfx/screenshot.jpg");
 		}
 
 		AppSingleton::getInstance().swapBuffers();
@@ -444,7 +444,7 @@ void mainLoop()
 			SDL_Delay((AppSingleton::getInstance().getTimerTick() - timer.getElapsedTime()) * 1000.0);
 		}
 
-		/*if(R::MainRendererSingleton::getInstance().getFramesNum() == 100)
+		/*if(r::MainRendererSingleton::getInstance().getFramesNum() == 100)
 		{
 			break;
 		}*/
@@ -463,7 +463,7 @@ void initSubsystems(int argc, char* argv[])
 	AppSingleton::getInstance().init(argc, argv);
 
 	// Main renderer
-	R::RendererInitializer initializer;
+	r::RendererInitializer initializer;
 	initializer.ms.ez.enabled = true;
 	initializer.dbg.enabled = true;
 	initializer.is.sm.bilinearEnabled = true;
@@ -484,7 +484,7 @@ void initSubsystems(int argc, char* argv[])
 	initializer.pps.bl.sideBlurFactor = 1.0;
 	initializer.mainRendererQuality = 1.0;
 
-	R::MainRendererSingleton::getInstance().init(initializer);
+	r::MainRendererSingleton::getInstance().init(initializer);
 
 	// Scripting engine
 	const char* commonPythonCode =
@@ -520,7 +520,7 @@ void initSubsystems(int argc, char* argv[])
 
 	// Add drawer to physics
 	SceneSingleton::getInstance().getPhysMasterContainer().setDebugDrawer(
-		new R::PhysDbgDrawer(R::MainRendererSingleton::getInstance().getDbg()));
+		new r::PhysDbgDrawer(r::MainRendererSingleton::getInstance().getDbg()));
 }
 
 

+ 0 - 4
src/Math/CMakeLists.txt

@@ -1,4 +0,0 @@
-FILE(GLOB MATH_SOURCES *.cpp)
-FILE(GLOB MATH_HEADERS *.h)
-
-ADD_LIBRARY(Math ${MATH_SOURCES} ${MATH_HEADERS})

+ 0 - 5
src/Misc/TestHeader.cpp

@@ -1,5 +0,0 @@
-#include "Math/Math.h"
-
-
-
-

+ 0 - 4
src/Physics/CMakeLists.txt

@@ -1,4 +0,0 @@
-FILE(GLOB PHYSICS_SOURCES *.cpp)
-FILE(GLOB PHYSICS_HEADERS *.h)
-
-ADD_LIBRARY(Physics ${PHYSICS_SOURCES} ${PHYSICS_HEADERS})

+ 0 - 4
src/Renderer/CMakeLists.txt

@@ -1,4 +0,0 @@
-FILE(GLOB_RECURSE RENDERER_SOURCES *.cpp)
-FILE(GLOB_RECURSE RENDERER_HEADERS *.h)
-
-ADD_LIBRARY(Renderer ${RENDERER_SOURCES} ${RENDERER_HEADERS})

+ 0 - 4
src/Resources/CMakeLists.txt

@@ -1,4 +0,0 @@
-FILE(GLOB_RECURSE RESOURCES_SOURCES *.cpp)
-FILE(GLOB_RECURSE RESOURCES_HEADERS *.h)
-
-ADD_LIBRARY(Resources ${RESOURCES_SOURCES} ${RESOURCES_HEADERS})

+ 0 - 6
src/Scripting/CMakeLists.txt

@@ -1,6 +0,0 @@
-FILE(GLOB_RECURSE SCRIPTING_SOURCES *.cpp)
-FILE(GLOB_RECURSE SCRIPTING_HEADERS *.h)
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-
-ADD_LIBRARY(Scripting ${SCRIPTING_SOURCES} ${SCRIPTING_HEADERS})

+ 0 - 32
src/Scripting/Core/Globals.bpi.cpp

@@ -1,32 +0,0 @@
-#include "ScriptingCommon.h"
-#include "Core/Globals.h"
-#include "Core/Logger.h"
-#include "Renderer/MainRenderer.h"
-#include "Input/Input.h"
-#include "Scene/Scene.h"
-#include "Core/App.h"
-#include "Events/Manager.h"
-
-
-WRAP_SINGLETON(LoggerSingleton)
-
-typedef R::MainRendererSingleton RMainRendererSingleton;
-WRAP_SINGLETON(RMainRendererSingleton)
-
-WRAP_SINGLETON(InputSingleton)
-WRAP_SINGLETON(SceneSingleton)
-WRAP_SINGLETON(AppSingleton)
-
-typedef Event::ManagerSingleton EventManagerSingleton;
-WRAP_SINGLETON(EventManagerSingleton)
-
-
-void boostPythonWrapAllGlobals()
-{
-	CALL_WRAP(LoggerSingleton);
-	CALL_WRAP(RMainRendererSingleton);
-	CALL_WRAP(InputSingleton);
-	CALL_WRAP(SceneSingleton);
-	CALL_WRAP(AppSingleton);
-	CALL_WRAP(EventManagerSingleton);
-}

+ 0 - 11
src/Scripting/Events/MainRendererPpsHdr.bpi.cpp

@@ -1,11 +0,0 @@
-#include "ScriptingCommon.h"
-#include "Events/MainRendererPpsHdr.h"
-
-
-WRAP(EventMainRendererPpsHdr)
-{
-	class_<Event::MainRendererPpsHdr>("EventMainRendererPpsHdr", no_init)
-		.def(init<float, float, float, uint, float>())
-		.def(init<const Event::MainRendererPpsHdr&>())
-	;
-}

+ 0 - 17
src/Scripting/Events/Manager.bpi.cpp

@@ -1,17 +0,0 @@
-#include "ScriptingCommon.h"
-#include "Events/Manager.h"
-
-#include "Events/SceneColor.h"
-#include "Events/MainRendererPpsHdr.h"
-
-
-WRAP(EventManager)
-{
-	class_<Event::Manager, noncopyable>("EventManager", no_init)
-		.def("createEvent", &Event::Manager::createEvent<Event::SceneColor>,
-			return_value_policy<reference_existing_object>())
-		.def("createEvent",
-			&Event::Manager::createEvent<Event::MainRendererPpsHdr>,
-			return_value_policy<reference_existing_object>())
-	;
-}

+ 0 - 11
src/Scripting/Events/SceneColor.bpi.cpp

@@ -1,11 +0,0 @@
-#include "ScriptingCommon.h"
-#include "Events/SceneColor.h"
-
-
-WRAP(EventSceneColor)
-{
-	class_<Event::SceneColor>("EventSceneColor", no_init)
-		.def(init<float, float, const Vec3&>())
-		.def(init<const Event::SceneColor&>())
-	;
-}

+ 0 - 19
src/Scripting/Renderer/Bl.bpi.cpp

@@ -1,19 +0,0 @@
-#include "ScriptingCommon.h"
-#include "Renderer/Bl.h"
-
-
-WRAP(Bl)
-{
-	class_<R::Bl, noncopyable>("Bl", no_init)
-		.def("isEnabled", (bool (R::Bl::*)() const)(&R::Bl::isEnabled))
-		.def("setEnabled", &R::Bl::setEnabled)
-
-		.def("getBlurringIterationsNum", (uint (R::Bl::*)() const)(
-			&R::Bl::getBlurringIterationsNum))
-		.def("setBlurringIterationsNum", &R::Bl::setBlurringIterationsNum)
-
-		.def("getSideBlurFactor", (float (R::Bl::*)() const)(
-			&R::Bl::getSideBlurFactor))
-		.def("setSideBlurFactor", &R::Bl::setSideBlurFactor)
-	;
-}

+ 0 - 11
src/Scripting/Renderer/Dbg.bpi.cpp

@@ -1,11 +0,0 @@
-#include "ScriptingCommon.h"
-#include "Renderer/Dbg.h"
-
-
-WRAP(Dbg)
-{
-	class_<R::Dbg, noncopyable>("Dbg", no_init)
-		.def("isEnabled", (bool (R::Dbg::*)() const)(&R::Dbg::isEnabled))
-		.def("setEnabled", &R::Dbg::setEnabled)
-	;
-}

+ 0 - 19
src/Scripting/Renderer/Hdr.bpi.cpp

@@ -1,19 +0,0 @@
-#include "ScriptingCommon.h"
-#include "Renderer/Hdr.h"
-
-
-WRAP(Hdr)
-{
-	class_<R::Hdr, noncopyable>("Hdr", no_init)
-		.def("getBlurringIterationsNum", (uint (R::Hdr::*)() const)(
-			&R::Hdr::getBlurringIterationsNum))
-		.def("setBlurringIterationsNum", &R::Hdr::setBlurringIterationsNum)
-
-		.def("getExposure", (float (R::Hdr::*)() const)(&R::Hdr::getExposure))
-		.def("setExposure", &R::Hdr::setExposure)
-
-		.def("getBlurringDist", (float (R::Hdr::*)() const)(
-			&R::Hdr::getBlurringDist))
-		.def("setBlurringDist", &R::Hdr::setBlurringDist)
-	;
-}

+ 0 - 16
src/Scripting/Renderer/MainRenderer.bpi.cpp

@@ -1,16 +0,0 @@
-#include "ScriptingCommon.h"
-#include "Renderer/MainRenderer.h"
-#include "Renderer/Dbg.h"
-
-
-WRAP(MainRenderer)
-{
-	class_<R::MainRenderer, bases<R::Renderer>, noncopyable>("MainRenderer",
-		no_init)
-		.def("getDbg", (R::Dbg& (R::MainRenderer::*)())(
-			&R::MainRenderer::getDbg),
-			return_value_policy<reference_existing_object>())
-
-		.def("getDbgTime", &R::MainRenderer::getDbgTime)
-	;
-}

+ 0 - 16
src/Scripting/Renderer/Pps.bpi.cpp

@@ -1,16 +0,0 @@
-#include "ScriptingCommon.h"
-#include "Renderer/Pps.h"
-#include "Renderer/Hdr.h"
-#include "Renderer/Bl.h"
-
-
-WRAP(Pps)
-{
-	class_<R::Pps, noncopyable>("Pps", no_init)
-		.def("getHdr", (R::Hdr& (R::Pps::*)())(&R::Pps::getHdr),
-			return_value_policy<reference_existing_object>())
-
-		.def("getBl", (R::Bl& (R::Pps::*)())(&R::Pps::getBl),
-			return_value_policy<reference_existing_object>())
-	;
-}

+ 4 - 0
src/cln/CMakeLists.txt

@@ -0,0 +1,4 @@
+FILE(GLOB CLN_SOURCES *.cpp)
+FILE(GLOB CLN_HEADERS *.h)
+
+ADD_LIBRARY(cln ${CLN_SOURCES} ${CLN_HEADERS})

+ 0 - 0
src/Collision/Collision.h → src/cln/Collision.h


+ 4 - 4
src/Collision/CollisionShape.h → src/cln/CollisionShape.h

@@ -1,10 +1,10 @@
-#ifndef COL_COLLISION_SHAPE
-#define COL_COLLISION_SHAPE
+#ifndef CLN_COLLISION_SHAPE
+#define CLN_COLLISION_SHAPE
 
-#include "Util/Accessors.h"
+#include "util/Accessors.h"
 
 
-namespace Col {
+namespace cln {
 
 
 class Plane;

+ 1 - 1
src/Collision/LineSegment.cpp → src/cln/LineSegment.cpp

@@ -3,7 +3,7 @@
 #include <algorithm>
 
 
-namespace Col {
+namespace cln {
 
 
 //==============================================================================

+ 4 - 4
src/Collision/LineSegment.h → src/cln/LineSegment.h

@@ -1,11 +1,11 @@
-#ifndef COL_LINE_SEGMENT_H
-#define COL_LINE_SEGMENT_H
+#ifndef CLN_LINE_SEGMENT_H
+#define CLN_LINE_SEGMENT_H
 
 #include "CollisionShape.h"
-#include "Math/Math.h"
+#include "m/Math.h"
 
 
-namespace Col {
+namespace cln {
 
 
 class LineSegment: public CollisionShape

+ 1 - 1
src/Collision/Obb.cpp → src/cln/Obb.cpp

@@ -2,7 +2,7 @@
 #include "Plane.h"
 
 
-namespace Col {
+namespace cln {
 
 
 //==============================================================================

+ 4 - 4
src/Collision/Obb.h → src/cln/Obb.h

@@ -1,12 +1,12 @@
-#ifndef COL_OBB_H
-#define COL_OBB_H
+#ifndef CLN_OBB_H
+#define CLN_OBB_H
 
 #include "CollisionShape.h"
-#include "Math/Math.h"
+#include "m/Math.h"
 #include <boost/array.hpp>
 
 
-namespace Col {
+namespace cln {
 
 
 /// Object oriented bounding box

+ 1 - 1
src/Collision/Obb.inl.h → src/cln/Obb.inl.h

@@ -2,7 +2,7 @@
 #include <boost/range/iterator_range.hpp>
 
 
-namespace Col {
+namespace cln {
 
 
 //==============================================================================

+ 2 - 2
src/Collision/Plane.cpp → src/cln/Plane.cpp

@@ -1,8 +1,8 @@
 #include "Plane.h"
-#include "Util/Assert.h"
+#include "util/Assert.h"
 
 
-namespace Col {
+namespace cln {
 
 
 //==============================================================================

+ 5 - 5
src/Collision/Plane.h → src/cln/Plane.h

@@ -1,12 +1,12 @@
-#ifndef COL_PLANE_H
-#define COL_PLANE_H
+#ifndef CLN_PLANE_H
+#define CLN_PLANE_H
 
 #include "CollisionShape.h"
-#include "Math/Math.h"
-#include "Util/Accessors.h"
+#include "m/Math.h"
+#include "util/Accessors.h"
 
 
-namespace Col {
+namespace cln {
 
 
 /// Plane collision shape

+ 1 - 1
src/Collision/Ray.cpp → src/cln/Ray.cpp

@@ -2,7 +2,7 @@
 #include "Plane.h"
 
 
-namespace Col {
+namespace cln {
 
 
 //==============================================================================

+ 5 - 5
src/Collision/Ray.h → src/cln/Ray.h

@@ -1,12 +1,12 @@
-#ifndef COL_RAY_H
-#define COL_RAY_H
+#ifndef CLN_RAY_H
+#define CLN_RAY_H
 
 #include "CollisionShape.h"
-#include "Math/Math.h"
-#include "Util/Accessors.h"
+#include "m/Math.h"
+#include "util/Accessors.h"
 
 
-namespace Col {
+namespace cln {
 
 
 class Plane;

+ 1 - 1
src/Collision/Sphere.cpp → src/cln/Sphere.cpp

@@ -2,7 +2,7 @@
 #include "Plane.h"
 
 
-namespace Col {
+namespace cln {
 
 
 //==============================================================================

+ 4 - 4
src/Collision/Sphere.h → src/cln/Sphere.h

@@ -1,11 +1,11 @@
-#ifndef COL_SPHERE_H
-#define COL_SPHERE_H
+#ifndef CLN_SPHERE_H
+#define CLN_SPHERE_H
 
 #include "CollisionShape.h"
-#include "Math/Math.h"
+#include "m/Math.h"
 
 
-namespace Col {
+namespace cln {
 
 
 class Plane;

+ 3 - 3
src/Collision/Sphere.inl.h → src/cln/Sphere.inl.h

@@ -1,9 +1,9 @@
 #include <boost/foreach.hpp>
 #include <boost/range/iterator_range.hpp>
-#include "Util/Assert.h"
+#include "util/Assert.h"
 
 
-namespace Col {
+namespace cln {
 
 
 //==============================================================================
@@ -49,7 +49,7 @@ void Sphere::set(const Container& container)
 		}
 	}
 
-	radius = M::sqrt(maxDist);
+	radius = m::sqrt(maxDist);
 }
 
 

+ 2 - 2
src/Core/App.cpp → src/core/App.cpp

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

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

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

+ 1 - 1
src/Core/AsyncLoader.cpp → src/core/AsyncLoader.cpp

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

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


+ 1 - 1
src/Core/CMakeLists.txt → src/core/CMakeLists.txt

@@ -1,4 +1,4 @@
 FILE(GLOB_RECURSE CORE_SOURCES *.cpp)
 FILE(GLOB_RECURSE CORE_HEADERS *.h)
 
-ADD_LIBRARY(Core ${CORE_SOURCES} ${CORE_HEADERS})
+ADD_LIBRARY(core ${CORE_SOURCES} ${CORE_HEADERS})

+ 3 - 3
src/Core/Globals.h → src/core/Globals.h

@@ -1,12 +1,12 @@
 #ifndef GLOBALS_H
 #define GLOBALS_H
 
-#include "Util/Singleton.h"
+#include "util/Singleton.h"
 
 
 typedef Singleton<class Logger> LoggerSingleton;
 
-namespace R {
+namespace r {
 typedef Singleton<class MainRenderer> MainRendererSingleton;
 }
 
@@ -18,7 +18,7 @@ typedef Singleton<class StdinListener> StdinListenerSingleton;
 typedef Singleton<class GlStateMachine> GlStateMachineSingleton;
 typedef Singleton<class ScriptingEngine> ScriptingEngineSingleton;
 
-namespace Event {
+namespace event {
 typedef Singleton<class Manager> ManagerSingleton;
 }
 

+ 0 - 0
src/Core/Logger.cpp → src/core/Logger.cpp


+ 0 - 0
src/Core/Logger.h → src/core/Logger.h


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


+ 2 - 2
src/Core/Object.cpp → src/core/Object.cpp

@@ -2,8 +2,8 @@
 #include <boost/foreach.hpp>
 
 #include "Object.h"
-#include "Util/Assert.h"
-#include "Util/Exception.h"
+#include "util/Assert.h"
+#include "util/Exception.h"
 
 
 //==============================================================================

+ 1 - 1
src/Core/Object.h → src/core/Object.h

@@ -1,7 +1,7 @@
 #ifndef OBJECT_H
 #define OBJECT_H
 
-#include "Util/Vec.h"
+#include "util/Vec.h"
 
 
 /// A class for automatic garbage collection. Cause we -the programmers- get

+ 0 - 0
src/Core/StdinListener.cpp → src/core/StdinListener.cpp


+ 1 - 1
src/Core/StdinListener.h → src/core/StdinListener.h

@@ -5,7 +5,7 @@
 #include <boost/thread/mutex.hpp>
 #include <string>
 #include <queue>
-#include "Util/Singleton.h"
+#include "util/Singleton.h"
 
 
 /// The listener of the stdin.

+ 0 - 0
src/Core/parallel/Job.cpp → src/core/parallel/Job.cpp


+ 1 - 1
src/Core/parallel/Job.h → src/core/parallel/Job.h

@@ -2,7 +2,7 @@
 #define PARALLEL_JOB_H
 
 #include <boost/thread.hpp>
-#include "Util/Accessors.h"
+#include "util/Accessors.h"
 
 
 namespace parallel {

+ 0 - 0
src/Core/parallel/Manager.cpp → src/core/parallel/Manager.cpp


+ 0 - 0
src/Core/parallel/Manager.h → src/core/parallel/Manager.h


+ 4 - 0
src/event/CMakeLists.txt

@@ -0,0 +1,4 @@
+FILE(GLOB EVENT_SOURCES *.cpp)
+FILE(GLOB EVENT_HEADERS *.h)
+
+ADD_LIBRARY(event ${EVENT_SOURCES} ${EVENT_HEADERS})

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

@@ -1,8 +1,8 @@
 #include "Event.h"
-#include "Util/Assert.h"
+#include "util/Assert.h"
 
 
-namespace Event {
+namespace event {
 
 
 //==============================================================================

+ 3 - 3
src/Events/Event.h → src/event/Event.h

@@ -1,11 +1,11 @@
 #ifndef EVENT_H
 #define EVENT_H
 
-#include "Util/StdTypes.h"
-#include "Util/Accessors.h"
+#include "util/StdTypes.h"
+#include "util/Accessors.h"
 
 
-namespace Event {
+namespace event {
 
 
 /// The event type enum

+ 6 - 6
src/Events/MainRendererPpsHdr.cpp → src/event/MainRendererPpsHdr.cpp

@@ -1,9 +1,9 @@
 #include "MainRendererPpsHdr.h"
-#include "Renderer/MainRenderer.h"
-#include "Core/Globals.h"
+#include "r/MainRenderer.h"
+#include "core/Globals.h"
 
 
-namespace Event {
+namespace event {
 
 
 //==============================================================================
@@ -17,8 +17,8 @@ MainRendererPpsHdr::MainRendererPpsHdr(float startTime, float duration,
 	finalData.blurringIterationsNum = blurringIterationsNum_;
 	finalData.blurringDist = blurringDist_;
 
-	const R::Hdr& hdr =
-		R::MainRendererSingleton::getInstance().getPps().getHdr();
+	const r::Hdr& hdr =
+		r::MainRendererSingleton::getInstance().getPps().getHdr();
 	originalData.exposure = hdr.getExposure();
 	originalData.blurringIterationsNum = hdr.getBlurringIterationsNum();
 	originalData.blurringDist = hdr.getBlurringDist();
@@ -55,7 +55,7 @@ void MainRendererPpsHdr::updateSp(float /*prevUpdateTime*/, float crntTime)
 	float d = crntTime - getStartTime(); // delta
 	float dp = d / getDuration(); // delta as percentage
 
-	R::Hdr& hdr = R::MainRendererSingleton::getInstance().getPps().getHdr();
+	r::Hdr& hdr = r::MainRendererSingleton::getInstance().getPps().getHdr();
 
 	hdr.setExposure(interpolate(originalData.exposure, finalData.exposure, dp));
 

+ 1 - 1
src/Events/MainRendererPpsHdr.h → src/event/MainRendererPpsHdr.h

@@ -4,7 +4,7 @@
 #include "Event.h"
 
 
-namespace Event {
+namespace event {
 
 
 /// Change the HDR properties

+ 1 - 1
src/Events/Manager.cpp → src/event/Manager.cpp

@@ -2,7 +2,7 @@
 #include <boost/foreach.hpp>
 
 
-namespace Event {
+namespace event {
 
 
 //==============================================================================

+ 1 - 1
src/Events/Manager.h → src/event/Manager.h

@@ -5,7 +5,7 @@
 #include <boost/ptr_container/ptr_deque.hpp>
 
 
-namespace Event {
+namespace event {
 
 
 /// This manager creates the events ands keeps tracks of them

+ 1 - 1
src/Events/Manager.inl.h → src/event/Manager.inl.h

@@ -1,7 +1,7 @@
 #include "Manager.h"
 
 
-namespace Event {
+namespace event {
 
 
 //==============================================================================

+ 4 - 4
src/Events/SceneColor.cpp → src/event/SceneColor.cpp

@@ -1,10 +1,10 @@
 #include "SceneColor.h"
-#include "Scene/Scene.h"
-#include "Core/Globals.h"
-#include "Core/Logger.h"
+#include "scene/Scene.h"
+#include "core/Globals.h"
+#include "core/Logger.h"
 
 
-namespace Event {
+namespace event {
 
 
 //==============================================================================

+ 2 - 2
src/Events/SceneColor.h → src/event/SceneColor.h

@@ -2,10 +2,10 @@
 #define EVENT_SCENE_COLOR_H
 
 #include "Event.h"
-#include "Math/Math.h"
+#include "m/Math.h"
 
 
-namespace Event {
+namespace event {
 
 
 /// Change the scene color

+ 2 - 2
src/GfxApi/BufferObjects/BufferObject.cpp → src/gl/BufferObject.cpp

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

+ 2 - 2
src/GfxApi/BufferObjects/BufferObject.h → src/gl/BufferObject.h

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

+ 6 - 0
src/gl/CMakeLists.txt

@@ -0,0 +1,6 @@
+FILE(GLOB_RECURSE GL_SOURCES *.cpp)
+FILE(GLOB_RECURSE GL_HEADERS *.h)
+
+#INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/BufferObjects")
+
+ADD_LIBRARY(gl ${GL_SOURCES} ${GL_HEADERS})

+ 0 - 0
src/GfxApi/BufferObjects/Fbo.cpp → src/gl/Fbo.cpp


+ 3 - 3
src/GfxApi/BufferObjects/Fbo.h → src/gl/Fbo.h

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

+ 4 - 4
src/GfxApi/GlException.cpp → src/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 "util/Exception.h"
+#include "util/Assert.h"
+#include "core/Logger.h"
+#include "core/Globals.h"
 #include <string>
 #include <GL/glew.h>
 

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


+ 0 - 0
src/GfxApi/GlStateMachine.cpp → src/gl/GlStateMachine.cpp


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

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

+ 1 - 1
src/GfxApi/TimeQuery.cpp → src/gl/TimeQuery.cpp

@@ -1,5 +1,5 @@
 #include "TimeQuery.h"
-#include "Util/Assert.h"
+#include "util/Assert.h"
 #include "GlException.h"
 
 

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


+ 2 - 2
src/GfxApi/BufferObjects/Vao.cpp → src/gl/Vao.cpp

@@ -1,7 +1,7 @@
 #include "Vao.h"
 #include "Vbo.h"
-#include "Util/Exception.h"
-#include "Resources/ShaderProgramAttributeVariable.h"
+#include "util/Exception.h"
+#include "rsrc/ShaderProgramAttributeVariable.h"
 
 
 //==============================================================================

+ 3 - 3
src/GfxApi/BufferObjects/Vao.h → src/gl/Vao.h

@@ -2,9 +2,9 @@
 #define VAO_H
 
 #include <GL/glew.h>
-#include "Util/StdTypes.h"
-#include "Core/Object.h"
-#include "../GlException.h"
+#include "util/StdTypes.h"
+#include "core/Object.h"
+#include "GlException.h"
 
 
 class Vbo;

+ 0 - 0
src/GfxApi/BufferObjects/Vbo.h → src/gl/Vbo.h


+ 4 - 0
src/i/CMakeLists.txt

@@ -0,0 +1,4 @@
+FILE(GLOB I_SOURCES *.cpp)
+FILE(GLOB I_HEADERS *.h)
+
+ADD_LIBRARY(i ${I_SOURCES} ${I_HEADERS})

+ 3 - 3
src/Input/Input.cpp → src/i/Input.cpp

@@ -1,6 +1,6 @@
-#include "Core/App.h"
-#include "Core/Logger.h"
-#include "Core/Globals.h"
+#include "core/App.h"
+#include "core/Logger.h"
+#include "core/Globals.h"
 #include "Input.h"
 #include <SDL/SDL.h>
 

+ 3 - 3
src/Input/Input.h → src/i/Input.h

@@ -1,9 +1,9 @@
 #ifndef INPUT_H
 #define INPUT_H
 
-#include "Math/Math.h"
-#include "Util/Singleton.h"
-#include "Util/Accessors.h"
+#include "m/Math.h"
+#include "util/Singleton.h"
+#include "util/Accessors.h"
 #include <SDL/SDL_scancode.h>
 #include <boost/array.hpp>
 

+ 1 - 1
src/Math/Axisang.h → src/m/Axisang.h

@@ -4,7 +4,7 @@
 #include "Common.h"
 
 
-namespace M {
+namespace m {
 
 
 /// Used for rotations

+ 6 - 6
src/Math/Axisang.inl.h → src/m/Axisang.inl.h

@@ -1,7 +1,7 @@
 #include "Common.inl.h"
 
 
-namespace M {
+namespace m {
 
 
 //==============================================================================
@@ -30,7 +30,7 @@ inline Axisang::Axisang(float rad, const Vec3& axis_)
 inline Axisang::Axisang(const Quat& q)
 {
 	ang = 2.0 * acos(q.w());
-	float length = M::sqrt(1.0 - q.w() * q.w());
+	float length = m::sqrt(1.0 - q.w() * q.w());
 	if(isZero(length))
 	{
 		axis = Vec3(0.0);
@@ -64,7 +64,7 @@ inline Axisang::Axisang(const Mat3& m3)
 		axis.x() = (m3(0, 0)+1) / 2.0;
 		if(axis.x() > 0.0)
 		{
-			axis.x() = M::sqrt(axis.x());
+			axis.x() = m::sqrt(axis.x());
 		}
 		else
 		{
@@ -73,7 +73,7 @@ inline Axisang::Axisang(const Mat3& m3)
 		axis.y() = (m3(1, 1)+1)/2;
 		if(axis.y() > 0)
 		{
-			axis.y() = M::sqrt(axis.y());
+			axis.y() = m::sqrt(axis.y());
 		}
 		else
 		{
@@ -83,7 +83,7 @@ inline Axisang::Axisang(const Mat3& m3)
 		axis.z() = (m3(2, 2)+1)/2;
 		if(axis.z() > 0)
 		{
-			axis.z() = M::sqrt(axis.z());
+			axis.z() = m::sqrt(axis.z());
 		}
 		else
 		{
@@ -121,7 +121,7 @@ inline Axisang::Axisang(const Mat3& m3)
 		return;
 	}
 
-	float s = M::sqrt((m3(2, 1) - m3(1, 2)) * (m3(2, 1) - m3(1, 2)) +
+	float s = m::sqrt((m3(2, 1) - m3(1, 2)) * (m3(2, 1) - m3(1, 2)) +
 		(m3(0, 2) - m3(2, 0)) * (m3(0, 2) - m3(2, 0)) +
 		(m3(1, 0) - m3(0, 1)) * (m3(1, 0) - m3(0, 1)));
 

+ 4 - 0
src/m/CMakeLists.txt

@@ -0,0 +1,4 @@
+FILE(GLOB M_SOURCES *.cpp)
+FILE(GLOB M_HEADERS *.h)
+
+ADD_LIBRARY(m ${M_SOURCES} ${M_HEADERS})

+ 3 - 3
src/Math/Common.h → src/m/Common.h

@@ -4,8 +4,8 @@
 #ifndef M_COMMON_H
 #define M_COMMON_H
 
-#include "Util/StdTypes.h"
-#include "Util/Accessors.h"
+#include "util/StdTypes.h"
+#include "util/Accessors.h"
 #if defined(MATH_INTEL_SIMD)
 #	include <smmintrin.h>
 #endif
@@ -14,7 +14,7 @@
 
 
 // Forward delcs
-namespace M {
+namespace m {
 
 class Vec2;
 class Vec3;

+ 1 - 1
src/Math/Common.inl.h → src/m/Common.inl.h

@@ -12,5 +12,5 @@
 #include "Funcs.h"
 #include "Transform.h"
 
-#include "Util/Assert.h"
+#include "util/Assert.h"
 #include <cmath>

+ 1 - 1
src/Math/Euler.h → src/m/Euler.h

@@ -4,7 +4,7 @@
 #include "Common.h"
 
 
-namespace M {
+namespace m {
 
 
 /// Used for rotations. It cannot describe a rotation accurately though

+ 2 - 2
src/Math/Euler.inl.h → src/m/Euler.inl.h

@@ -1,7 +1,7 @@
 #include "Common.inl.h"
 
 
-namespace M {
+namespace m {
 
 
 //==============================================================================
@@ -67,7 +67,7 @@ inline Euler::Euler(const Mat3& m3)
 	float cz, sz;
 
 	sy = m3(0, 2);
-	cy = M::sqrt(1.0 - sy*sy);
+	cy = m::sqrt(1.0 - sy*sy);
 	// normal case
 	if (!isZero(cy))
 	{

+ 1 - 1
src/Math/Funcs.cpp → src/m/Funcs.cpp

@@ -1,7 +1,7 @@
 #include "Funcs.h"
 
 
-namespace M {
+namespace m {
 
 
 

+ 1 - 1
src/Math/Funcs.h → src/m/Funcs.h

@@ -4,7 +4,7 @@
 #include "Common.h"
 
 
-namespace M {
+namespace m {
 
 
 const float PI = 3.14159265358979323846;

+ 1 - 1
src/Math/Funcs.inl.h → src/m/Funcs.inl.h

@@ -1,7 +1,7 @@
 #include "Common.inl.h"
 
 
-namespace M {
+namespace m {
 
 
 //==============================================================================

+ 1 - 1
src/Math/Mat3.h → src/m/Mat3.h

@@ -4,7 +4,7 @@
 #include "Common.h"
 
 
-namespace M {
+namespace m {
 
 
 /// Mainly used for rotations. It includes many helpful member functions.

+ 1 - 1
src/Math/Mat3.inl.h → src/m/Mat3.inl.h

@@ -1,7 +1,7 @@
 #include "Common.inl.h"
 
 
-namespace M {
+namespace m {
 
 
 //==============================================================================

+ 1 - 1
src/Math/Mat4.h → src/m/Mat4.h

@@ -4,7 +4,7 @@
 #include "Common.h"
 
 
-namespace M {
+namespace m {
 
 
 /// Used mainly for transformations but not necessarily. Its row major

+ 1 - 1
src/Math/Mat4.inl.h → src/m/Mat4.inl.h

@@ -1,7 +1,7 @@
 #include "Common.inl.h"
 
 
-namespace M {
+namespace m {
 
 
 //==============================================================================

+ 1 - 1
src/Math/Math.h → src/m/Math.h

@@ -15,7 +15,7 @@
 #include "Transform.h"
 
 
-using namespace M;
+using namespace m;
 
 
 #endif

+ 1 - 1
src/Math/Quat.h → src/m/Quat.h

@@ -4,7 +4,7 @@
 #include "Common.h"
 
 
-namespace M {
+namespace m {
 
 
 /// Used in rotations

+ 3 - 3
src/Math/Quat.inl.h → src/m/Quat.inl.h

@@ -1,7 +1,7 @@
 #include "Common.inl.h"
 
 
-namespace M {
+namespace m {
 
 
 //==============================================================================
@@ -275,7 +275,7 @@ inline void Quat::normalize()
 // getLength
 inline float Quat::getLength() const
 {
-	return M::sqrt(w() * w() + x() * x() + y() * y() + z() * z());
+	return m::sqrt(w() * w() + x() * x() + y() * y() + z() * z());
 }
 
 
@@ -354,7 +354,7 @@ inline Quat Quat::slerp(const Quat& q1_, float t) const
 	}
 
 	float halfTheta = acos(cosHalfTheta);
-	float sinHalfTheta = M::sqrt(1.0 - cosHalfTheta*cosHalfTheta);
+	float sinHalfTheta = m::sqrt(1.0 - cosHalfTheta*cosHalfTheta);
 
 	if(fabs(sinHalfTheta) < 0.001)
 	{

+ 2 - 2
src/Math/Transform.h → src/m/Transform.h

@@ -4,7 +4,7 @@
 #include "Common.h"
 
 
-namespace M {
+namespace m {
 
 
 /// For transformations
@@ -45,7 +45,7 @@ class Transform
 		void setIdentity();
 		static const Transform& getIdentity();
 		static Transform combineTransformations(const Transform& a,
-			const Transform& b); ///< @see M::combineTransformations
+			const Transform& b); ///< @see m::combineTransformations
 		/// @}
 		
 	private:

+ 2 - 2
src/Math/Transform.inl.h → src/m/Transform.inl.h

@@ -4,7 +4,7 @@
 #define ME (*this)
 
 
-namespace M {
+namespace m {
 
 
 //==============================================================================
@@ -126,7 +126,7 @@ inline Transform Transform::combineTransformations(const Transform& a,
 {
 	Transform out;
 
-	M::combineTransformations(a.origin, a.rotation, a.scale,
+	m::combineTransformations(a.origin, a.rotation, a.scale,
 		b.origin, b.rotation, b.scale,
 		out.origin, out.rotation, out.scale);
 

+ 1 - 1
src/Math/Vec2.h → src/m/Vec2.h

@@ -4,7 +4,7 @@
 #include "Common.h"
 
 
-namespace M {
+namespace m {
 
 
 /// 2D vector

Некоторые файлы не были показаны из-за большого количества измененных файлов