diff options
author | chai <chaifix@163.com> | 2021-12-13 00:07:19 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-12-13 00:07:19 +0800 |
commit | 60cbbdec07ab7a5636eac5b3c024ae44e937f4d4 (patch) | |
tree | b2c7b0a868f18159dbc43d8954e1bd7668549a88 /Client/Source/Math/Vector3.hpp |
+init
Diffstat (limited to 'Client/Source/Math/Vector3.hpp')
-rw-r--r-- | Client/Source/Math/Vector3.hpp | 32 |
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>; + |