Browse Source

Rename tuple file to remove the plural.

Also add empty shell ray.
Godzil 4 years ago
parent
commit
1e2588441f

+ 3 - 2
source/CMakeLists.txt

@@ -3,8 +3,9 @@
 # First most is build as a library
 add_library(rayonnement STATIC)
 
-set(RAY_HEADERS include/tuples.h include/math_helper.h include/colour.h include/canvas.h include/matrix.h include/transformation.h)
-set(RAY_SOURCES tuples.cpp math_helper.cpp colour.cpp canvas.cpp matrix.cpp transformation.cpp)
+set(RAY_HEADERS include/tuple.h include/math_helper.h include/colour.h include/canvas.h include/matrix.h include/transformation.h
+        include/ray.h)
+set(RAY_SOURCES tuple.cpp math_helper.cpp colour.cpp canvas.cpp matrix.cpp transformation.cpp objects/ray.cpp)
 
 target_include_directories(rayonnement PUBLIC include)
 target_sources(rayonnement PRIVATE ${RAY_HEADERS} ${RAY_SOURCES})

+ 1 - 1
source/include/colour.h

@@ -9,7 +9,7 @@
 #ifndef DORAYME_COLOUR_H
 #define DORAYME_COLOUR_H
 
-#include <tuples.h>
+#include <tuple.h>
 
 class Colour : public Tuple
 {

+ 1 - 1
source/include/matrix.h

@@ -9,7 +9,7 @@
 #ifndef DORAYME_MATRIX_H
 #define DORAYME_MATRIX_H
 
-#include <tuples.h>
+#include <tuple.h>
 
 class Matrix
 {

+ 12 - 0
source/include/ray.h

@@ -0,0 +1,12 @@
+/*
+ *  DoRayMe - a quick and dirty Raytracer
+ *  Ray header
+ *
+ *  Created by Manoël Trapier
+ *  Copyright (c) 2020 986-Studio.
+ *
+ */
+#ifndef DORAYME_RAY_H
+#define DORAYME_RAY_H
+
+#endif //DORAYME_RAY_H

+ 3 - 3
source/include/tuples.h → source/include/tuple.h

@@ -6,8 +6,8 @@
  *  Copyright (c) 2020 986-Studio.
  *
  */
-#ifndef DORAYME_TUPLES_H
-#define DORAYME_TUPLES_H
+#ifndef DORAYME_TUPLE_H
+#define DORAYME_TUPLE_H
 
 #include <math_helper.h>
 
@@ -56,4 +56,4 @@ public:
     Vector cross(const Vector &b) const;
 };
 
-#endif /* DORAYME_TUPLES_H */
+#endif /*DORAYME_TUPLE_H*/

+ 1 - 1
source/matrix.cpp

@@ -9,7 +9,7 @@
 
 #include <stdio.h>
 #include <matrix.h>
-#include <tuples.h>
+#include <tuple.h>
 #include <math_helper.h>
 
 Matrix::Matrix(int width)

+ 8 - 0
source/objects/ray.cpp

@@ -0,0 +1,8 @@
+/*
+ *  DoRayMe - a quick and dirty Raytracer
+ *  Ray implementation
+ *
+ *  Created by Manoël Trapier
+ *  Copyright (c) 2020 986-Studio.
+ *
+ */

+ 1 - 1
source/tuples.cpp → source/tuple.cpp

@@ -6,7 +6,7 @@
  *  Copyright (c) 2020 986-Studio.
  *
  */
-#include <tuples.h>
+#include <tuple.h>
 
 #include <math.h>
 

+ 1 - 1
tests/matrix_test.cpp

@@ -7,7 +7,7 @@
  *
  */
 #include <matrix.h>
-#include <tuples.h>
+#include <tuple.h>
 #include <math.h>
 #include <gtest/gtest.h>
 

+ 1 - 1
tests/transformation_test.cpp

@@ -7,7 +7,7 @@
  *
  */
 #include <transformation.h>
-#include <tuples.h>
+#include <tuple.h>
 #include <math.h>
 #include <gtest/gtest.h>
 

+ 1 - 1
tests/tuples_test.cpp

@@ -6,7 +6,7 @@
  *  Copyright (c) 2020 986-Studio.
  *
  */
-#include <tuples.h>
+#include <tuple.h>
 #include <math.h>
 #include <gtest/gtest.h>