summaryrefslogtreecommitdiff
path: root/Client/Source/Math/Vector3.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Source/Math/Vector3.hpp')
-rw-r--r--Client/Source/Math/Vector3.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/Client/Source/Math/Vector3.hpp b/Client/Source/Math/Vector3.hpp
new file mode 100644
index 0000000..eee913b
--- /dev/null
+++ b/Client/Source/Math/Vector3.hpp
@@ -0,0 +1,32 @@
+#pragma once
+
+template<typename T>
+struct Vector3Template
+{
+ T x, y, z;
+ Vector3Template(T x = 0, T y = 0, T z = 0)
+ {
+ this->x = x;
+ this->y = y;
+ this->z = z;
+ }
+ inline void Set(T x, T y, T z)
+ {
+ this->x = x;
+ this->y = y;
+ this->z = z;
+ }
+
+
+ static Vector3Template zero;
+ static Vector3Template one;
+
+};
+
+template<typename T>
+Vector3Template<T> Vector3Template<T>::zero = Vector3Template(0, 0, 0);
+template<typename T>
+Vector3Template<T> Vector3Template<T>::one = Vector3Template(1, 1, 1);
+
+using Vector3f = Vector3Template<float>;
+