From 60cbbdec07ab7a5636eac5b3c024ae44e937f4d4 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 13 Dec 2021 00:07:19 +0800 Subject: +init --- Client/Source/Math/Vector3.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Client/Source/Math/Vector3.hpp (limited to 'Client/Source/Math/Vector3.hpp') 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 +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 +Vector3Template Vector3Template::zero = Vector3Template(0, 0, 0); +template +Vector3Template Vector3Template::one = Vector3Template(1, 1, 1); + +using Vector3f = Vector3Template; + -- cgit v1.1-26-g67d0