Browse Source

Properly orient game:math (1/2)

Sam Jaffe 6 years ago
parent
commit
d92c151e47

math/common.hpp → math/include/game/math/common.hpp


math/math_fwd.hpp → math/include/game/math/math_fwd.hpp


+ 1 - 0
math/shape.hpp

@@ -8,6 +8,7 @@
 #pragma once
 
 #include "vector/vector.hpp"
+
 #include "math_fwd.hpp"
 
 namespace math {

math/angle.hpp → math/include/include/angle.hpp


+ 29 - 34
math/math.xcodeproj/project.pbxproj

@@ -7,30 +7,24 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		CD0E42491D9B3673002FFED1 /* vector.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD0E42481D9B3673002FFED1 /* vector.hpp */; };
 		CD3AC71E1D2C0AF8002B4BB0 /* shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3AC71C1D2C0AF8002B4BB0 /* shape.cpp */; };
-		CD3AC71F1D2C0AF8002B4BB0 /* shape.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3AC71D1D2C0AF8002B4BB0 /* shape.hpp */; };
-		CD3C808A1D66469400ACC795 /* math_fwd.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3AC6FA1D2C0558002B4BB0 /* math_fwd.hpp */; };
 		CD3C809F1D675AB100ACC795 /* angle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3C809D1D675AB100ACC795 /* angle.cpp */; };
-		CD3C80A01D675AB100ACC795 /* angle.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3C809E1D675AB100ACC795 /* angle.hpp */; };
 		CD3C80BC1D68902300ACC795 /* common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3C80BA1D68902300ACC795 /* common.cpp */; };
-		CD3C80BD1D68902300ACC795 /* common.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3C80BB1D68902300ACC795 /* common.hpp */; };
-		CD3DA3DD1D9B3F85001B53A0 /* matrix_helpers.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3DA3DB1D9B3F85001B53A0 /* matrix_helpers.hpp */; };
-		CD3DA3DE1D9B3F85001B53A0 /* matrix.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3DA3DC1D9B3F85001B53A0 /* matrix.hpp */; };
+		CDA34D8E22517680008036A7 /* matrix_helpers.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDA34D8C22517680008036A7 /* matrix_helpers.hpp */; };
+		CDA34D8F22517680008036A7 /* matrix.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDA34D8D22517680008036A7 /* matrix.hpp */; };
+		CDA34D9122517689008036A7 /* vector.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDA34D9022517689008036A7 /* vector.hpp */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
-		CD0E42481D9B3673002FFED1 /* vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = vector.hpp; path = vector/vector.hpp; sourceTree = "<group>"; };
 		CD3786181CF9F61100BE89B2 /* libmath.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libmath.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
-		CD3AC6FA1D2C0558002B4BB0 /* math_fwd.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = math_fwd.hpp; sourceTree = "<group>"; };
 		CD3AC71C1D2C0AF8002B4BB0 /* shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shape.cpp; sourceTree = "<group>"; };
-		CD3AC71D1D2C0AF8002B4BB0 /* shape.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = shape.hpp; sourceTree = "<group>"; };
 		CD3C809D1D675AB100ACC795 /* angle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = angle.cpp; sourceTree = "<group>"; };
-		CD3C809E1D675AB100ACC795 /* angle.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = angle.hpp; sourceTree = "<group>"; };
 		CD3C80BA1D68902300ACC795 /* common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = common.cpp; sourceTree = "<group>"; };
-		CD3C80BB1D68902300ACC795 /* common.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = common.hpp; sourceTree = "<group>"; };
-		CD3DA3DB1D9B3F85001B53A0 /* matrix_helpers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = matrix_helpers.hpp; path = matrix/matrix_helpers.hpp; sourceTree = "<group>"; };
-		CD3DA3DC1D9B3F85001B53A0 /* matrix.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = matrix.hpp; path = matrix/matrix.hpp; sourceTree = "<group>"; };
+		CDA34D89225175CB008036A7 /* game */ = {isa = PBXFileReference; lastKnownFileType = folder; name = game; path = include/game; sourceTree = "<group>"; };
+		CDA34D8B22517670008036A7 /* angle.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = angle.hpp; sourceTree = "<group>"; };
+		CDA34D8C22517680008036A7 /* matrix_helpers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = matrix_helpers.hpp; path = matrix/matrix_helpers.hpp; sourceTree = SOURCE_ROOT; };
+		CDA34D8D22517680008036A7 /* matrix.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = matrix.hpp; path = matrix/matrix.hpp; sourceTree = SOURCE_ROOT; };
+		CDA34D9022517689008036A7 /* vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = vector.hpp; path = vector/vector.hpp; sourceTree = SOURCE_ROOT; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -47,6 +41,8 @@
 		CD37860F1CF9F61100BE89B2 = {
 			isa = PBXGroup;
 			children = (
+				CDA34D89225175CB008036A7 /* game */,
+				CDA34D8A22517670008036A7 /* include */,
 				CD3C80791D66440200ACC795 /* test */,
 				CD3786321CFA304800BE89B2 /* src */,
 				CD3786191CF9F61100BE89B2 /* Products */,
@@ -64,25 +60,30 @@
 		CD3786321CFA304800BE89B2 /* src */ = {
 			isa = PBXGroup;
 			children = (
-				CD3AC6FA1D2C0558002B4BB0 /* math_fwd.hpp */,
-				CD0E42481D9B3673002FFED1 /* vector.hpp */,
-				CD3DA3DB1D9B3F85001B53A0 /* matrix_helpers.hpp */,
-				CD3DA3DC1D9B3F85001B53A0 /* matrix.hpp */,
 				CD3AC71C1D2C0AF8002B4BB0 /* shape.cpp */,
-				CD3AC71D1D2C0AF8002B4BB0 /* shape.hpp */,
 				CD3C809D1D675AB100ACC795 /* angle.cpp */,
-				CD3C809E1D675AB100ACC795 /* angle.hpp */,
 				CD3C80BA1D68902300ACC795 /* common.cpp */,
-				CD3C80BB1D68902300ACC795 /* common.hpp */,
 			);
-			name = src;
+			path = src;
 			sourceTree = "<group>";
 		};
 		CD3C80791D66440200ACC795 /* test */ = {
 			isa = PBXGroup;
 			children = (
 			);
-			name = test;
+			path = test;
+			sourceTree = "<group>";
+		};
+		CDA34D8A22517670008036A7 /* include */ = {
+			isa = PBXGroup;
+			children = (
+				CDA34D8B22517670008036A7 /* angle.hpp */,
+				CDA34D8C22517680008036A7 /* matrix_helpers.hpp */,
+				CDA34D8D22517680008036A7 /* matrix.hpp */,
+				CDA34D9022517689008036A7 /* vector.hpp */,
+			);
+			name = include;
+			path = include/include;
 			sourceTree = "<group>";
 		};
 /* End PBXGroup section */
@@ -92,13 +93,9 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CD3DA3DE1D9B3F85001B53A0 /* matrix.hpp in Headers */,
-				CD3AC71F1D2C0AF8002B4BB0 /* shape.hpp in Headers */,
-				CD3C80A01D675AB100ACC795 /* angle.hpp in Headers */,
-				CD0E42491D9B3673002FFED1 /* vector.hpp in Headers */,
-				CD3C808A1D66469400ACC795 /* math_fwd.hpp in Headers */,
-				CD3C80BD1D68902300ACC795 /* common.hpp in Headers */,
-				CD3DA3DD1D9B3F85001B53A0 /* matrix_helpers.hpp in Headers */,
+				CDA34D9122517689008036A7 /* vector.hpp in Headers */,
+				CDA34D8E22517680008036A7 /* matrix_helpers.hpp in Headers */,
+				CDA34D8F22517680008036A7 /* matrix.hpp in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -170,7 +167,6 @@
 		CD3786211CF9F61100BE89B2 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
@@ -217,13 +213,13 @@
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/ $(PROJECT_DIR)/include/ $(PROJECT_DIR)/../include/expect/include/";
 			};
 			name = Debug;
 		};
 		CD3786221CF9F61100BE89B2 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
@@ -263,6 +259,7 @@
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/ $(PROJECT_DIR)/include/ $(PROJECT_DIR)/../include/expect/include/";
 			};
 			name = Release;
 		};
@@ -276,7 +273,6 @@
 				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				USER_HEADER_SEARCH_PATHS = ".. ../include";
 			};
 			name = Debug;
 		};
@@ -290,7 +286,6 @@
 				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				USER_HEADER_SEARCH_PATHS = ".. ../include";
 			};
 			name = Release;
 		};

+ 1 - 1
math/angle.cpp

@@ -5,7 +5,7 @@
 //  Created by Sam Jaffe on 8/19/16.
 //
 
-#include "angle.hpp"
+#include "include/angle.hpp"
 
 #include <cmath>
 

+ 3 - 5
math/common.cpp

@@ -5,12 +5,10 @@
 //  Created by Sam Jaffe on 8/20/16.
 //
 
-#include "common.hpp"
+#include "game/math/common.hpp"
 
-#include "angle.hpp"
-#include "math_fwd.hpp"
-#include "shape.hpp"
-#include "vector.hpp"
+#include "include/angle.hpp"
+#include "game/math/shape.hpp"
 
 namespace math {
   vec2 rotate(vec2 const & c, vec2 const & p, radian r) {

+ 1 - 1
math/shape.cpp

@@ -5,7 +5,7 @@
 //  Created by Sam Jaffe on 7/5/16.
 //
 
-#include "shape.hpp"
+#include "game/math/shape.hpp"
 
 namespace math {