Daniele Bartolini 10 년 전
부모
커밋
465858b532
2개의 변경된 파일7개의 추가작업 그리고 12개의 파일을 삭제
  1. 5 10
      src/renderers/debug_line.cpp
  2. 2 2
      src/renderers/debug_line.h

+ 5 - 10
src/renderers/debug_line.cpp

@@ -135,17 +135,12 @@ void DebugLine::add_line(const Vector3& start, const Vector3& end, const Color4&
 	if (_num >= CROWN_MAX_DEBUG_LINES)
 		 return;
 
-	_lines[_num].p0[0] = start.x;
-	_lines[_num].p0[1] = start.y;
-	_lines[_num].p0[2] = start.z;
-	_lines[_num].c0    = to_abgr(color);
+	_lines[_num].p0 = start;
+	_lines[_num].c0 = to_abgr(color);
+	_lines[_num].p1 = end;
+	_lines[_num].c1 = to_abgr(color);
 
-	_lines[_num].p1[0] = end.x;
-	_lines[_num].p1[1] = end.y;
-	_lines[_num].p1[2] = end.z;
-	_lines[_num].c1    = to_abgr(color);
-
-	_num++;
+	++_num;
 }
 
 void DebugLine::add_axes(const Matrix4x4& m, float length)

+ 2 - 2
src/renderers/debug_line.h

@@ -56,9 +56,9 @@ private:
 
 	struct Line
 	{
-		float p0[3];
+		Vector3 p0;
 		uint32_t c0;
-		float p1[3];
+		Vector3 p1;
 		uint32_t c1;
 	};