فهرست منبع

- Async loader
- Collision

Panagiotis Christopoulos Charitos 15 سال پیش
والد
کامیت
c6e54aa8a9
11فایلهای تغییر یافته به همراه44 افزوده شده و 13 حذف شده
  1. 0 1
      build/debug/Makefile
  2. 15 0
      src/Collision/Obb.h
  3. 1 0
      src/Core/AsyncLoader.cpp
  4. 24 0
      src/Core/AsyncLoader.h
  5. 0 3
      src/Main.cpp
  6. 2 1
      src/Math/Mat4.inl.h
  7. 1 2
      src/Renderer/Dbg.cpp
  8. 1 2
      src/Renderer/Is.cpp
  9. 0 1
      src/Renderer/Is.h
  10. 0 2
      src/Renderer/Ms.cpp
  11. 0 1
      src/Renderer/Renderer.h

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 1
build/debug/Makefile


+ 15 - 0
src/Collision/Obb.h

@@ -0,0 +1,15 @@
+#ifndef OBB_H
+#define OBB_H
+
+#include "CollisionShape.h"
+#include "Properties.h"
+#include "Math.h"
+
+
+class Obb: public CollisionShape
+{
+
+};
+
+
+#endif

+ 1 - 0
src/Core/AsyncLoader.cpp

@@ -0,0 +1 @@
+#include "AsyncLoader.h"

+ 24 - 0
src/Core/AsyncLoader.h

@@ -0,0 +1,24 @@
+#ifndef ASYNC_LOADER_H
+#define ASYNC_LOADER_H
+
+#include <queue>
+#include <string>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+
+
+///
+class AsyncLoader
+{
+	public:
+		void loadThis(const char* filename);
+
+	private:
+		std::queue<std::string> in;
+		std::queue<std::string> out;
+		boost::mutex mutex;
+		boost::thread thread;
+};
+
+
+#endif

+ 0 - 3
src/Main.cpp

@@ -146,9 +146,6 @@ void init()
 	horse->init("meshes/horse/horse.mdl");
 	horse->setLocalTransform(Transform(Vec3(-2, 0, 1), Mat3::getIdentity(), 1.0));
 
-	return;
-
-
 	// Sponza
 	ModelNode* sponza = new ModelNode();
 	sponza->init("maps/sponza/sponza.mdl");

+ 2 - 1
src/Math/Mat4.inl.h

@@ -773,7 +773,8 @@ inline float Mat4::getDet() const
 // getInverse
 inline Mat4 Mat4::getInverse() const
 {
-	#if defined(MATH_INTEL_SIMD)
+	/// @todo test this
+	#if !defined(MATH_INTEL_SIMD)
 		Mat4 r(SELF);
 		__m128 minor0, minor1, minor2, minor3;
 		__m128 det, tmp1;

+ 1 - 2
src/Renderer/Dbg.cpp

@@ -1,7 +1,6 @@
 #include <boost/foreach.hpp>
 #include "Dbg.h"
 #include "Renderer.h"
-#include "App.h"
 #include "Scene.h"
 #include "Camera.h"
 #include "Light.h"
@@ -278,7 +277,7 @@ void Dbg::run()
 				if(showVisibilityBoundingShapesFlag)
 				{
 					const RenderableNode& rnode = static_cast<const RenderableNode&>(*node);
-					setModelMat(Mat4(rnode.getWorldTransform()) * Mat4(rnode.getBoundingShapeWSpace().getCenter(), Mat3::getIdentity(), 1.0));
+					setModelMat(Mat4(rnode.getBoundingShapeWSpace().getCenter(), Mat3::getIdentity(), 1.0));
 					drawSphere(rnode.getBoundingShapeWSpace().getRadius());
 				}
 				break;

+ 1 - 2
src/Renderer/Is.cpp

@@ -8,11 +8,10 @@
 #include "SpotLight.h"
 #include "LightData.h"
 #include "App.h"
-#include "Scene.h"
 #include "LightData.h"
-#include "Collision.h"
 #include "Sm.h"
 #include "Smo.h"
+#include "Scene.h"
 
 
 //======================================================================================================================

+ 0 - 1
src/Renderer/Is.h

@@ -11,7 +11,6 @@
 #include "Vao.h"
 #include "Sm.h"
 #include "Smo.h"
-#include "VisibilityTester.h"
 
 
 class PointLight;

+ 0 - 2
src/Renderer/Ms.cpp

@@ -3,8 +3,6 @@
 #include "Renderer.h"
 #include "Camera.h"
 #include "Ez.h"
-#include "ModelNode.h"
-#include "Scene.h"
 #include "RenderableNode.h"
 
 

+ 0 - 1
src/Renderer/Renderer.h

@@ -8,7 +8,6 @@
 #include "Vbo.h"
 #include "Vao.h"
 #include "RsrcPtr.h"
-#include "Object.h"
 #include "Ms.h"
 #include "Is.h"
 #include "Pps.h"

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است