aboutsummaryrefslogtreecommitdiffstats
path: root/include/vector3.hpp
diff options
context:
space:
mode:
authorAndy <drumsetmonkey@gmail.com>2017-01-20 10:37:21 -0500
committerAndy <drumsetmonkey@gmail.com>2017-01-20 10:37:21 -0500
commit4d8f9974156068e4595bf219cacfd9fcd2fd7174 (patch)
treef3e938c0e49537a9dea661f46eed6ee74950b48a /include/vector3.hpp
parent1894e311bdeb098c3bef9bd342e0eaf78d197a9b (diff)
parent1ac412a5496fb6c63c47f199dfc7facd5f4c080a (diff)
Merge branch 'master' of https://github.com/tcsullivan/gamedev
Diffstat (limited to 'include/vector3.hpp')
-rw-r--r--include/vector3.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/vector3.hpp b/include/vector3.hpp
new file mode 100644
index 0000000..ee09eae
--- /dev/null
+++ b/include/vector3.hpp
@@ -0,0 +1,19 @@
+#ifndef VECTOR3_HPP_
+#define VECTOR3_HPP_
+
+/**
+ * A structure for three-dimensional points.
+ */
+template<typename T>
+struct vector3 {
+ T x; /**< The x coordinate */
+ T y; /**< The y coordinate */
+ T z; /**< The z coordinate */
+
+ vector3(T _x = 0, T _y = 0, T _z = 1)
+ : x(_x), y(_y), z(_z) {}
+};
+
+using vec3 = vector3<float>;
+
+#endif // VECTOR3_HPP_