Daniele Bartolini 10 سال پیش
والد
کامیت
f4a676da07
5فایلهای تغییر یافته به همراه14 افزوده شده و 14 حذف شده
  1. 4 4
      src/core/math/aabb.h
  2. 4 4
      src/core/math/frustum.h
  3. 5 0
      src/core/math/math_types.h
  4. 1 1
      src/core/math/math_utils.h
  5. 0 5
      src/core/math/plane.h

+ 4 - 4
src/core/math/aabb.h

@@ -146,10 +146,10 @@ namespace aabb
 		vertices[6] = vertices[6] * m;
 		vertices[7] = vertices[7] * m;
 
-		AABB res;
-		reset(res);
-		add_points(res, 8, vertices);
-		return res;
+		AABB r;
+		reset(r);
+		add_points(r, 8, vertices);
+		return r;
 	}
 
 	inline void to_vertices(const AABB& b, Vector3 v[8])

+ 4 - 4
src/core/math/frustum.h

@@ -138,10 +138,10 @@ namespace frustum
 		vertices[6] = vertex(f, 6);
 		vertices[7] = vertex(f, 7);
 
-		AABB aabb;
-		aabb::reset(aabb);
-		aabb::add_points(aabb, 8, vertices);
-		return aabb;
+		AABB r;
+		aabb::reset(r);
+		aabb::add_points(r, 8, vertices);
+		return r;
 	}
 } // namespace frustum
 

+ 5 - 0
src/core/math/math_types.h

@@ -117,4 +117,9 @@ const Matrix3x3 MATRIX3X3_IDENTITY = { VECTOR3_XAXIS, VECTOR3_YAXIS, VECTOR3_ZAX
 
 const Matrix4x4 MATRIX4X4_IDENTITY = { VECTOR4_XAXIS, VECTOR4_YAXIS, VECTOR4_ZAXIS, VECTOR4_WAXIS };
 
+const Plane PLANE_ZERO  = { VECTOR3_ZERO,  0.0f };
+const Plane PLANE_XAXIS = { VECTOR3_XAXIS, 0.0f };
+const Plane PLANE_YAXIS = { VECTOR3_YAXIS, 0.0f };
+const Plane PLANE_ZAXIS = { VECTOR3_ZAXIS, 0.0f };
+
 } // namespace crown

+ 1 - 1
src/core/math/math_utils.h

@@ -9,9 +9,9 @@
 
 namespace crown
 {
-
 /// @addtogroup Math
 /// @{
+
 const float PI              = 3.1415926535897932f;
 const float TWO_PI          = PI * 2.0f;
 const float HALF_PI         = PI * 0.5f;

+ 0 - 5
src/core/math/plane.h

@@ -11,11 +11,6 @@
 namespace crown
 {
 
-const Plane PLANE_ZERO  = { VECTOR3_ZERO, 0.0f };
-const Plane PLANE_XAXIS = { VECTOR3_XAXIS, 0.0f };
-const Plane PLANE_YAXIS = { VECTOR3_YAXIS, 0.0f };
-const Plane PLANE_ZAXIS = { VECTOR3_ZAXIS, 0.0f };
-
 /// Functions to manipulate Plane.
 ///
 /// @ingroup Math