1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
template<typename T>
struct Vector4Template
{
T x, y, z, w;
Vector4Template(T x = 0, T y = 0, T z = 0, T w = 0)
{
this->x = x;
this->y = y;
this->z = z;
this->w = w;
}
inline void Set(T x, T y, T z, T w)
{
this->x = x;
this->y = y;
this->z = z;
this->w = w;
}
static Vector4Template zero;
static Vector4Template one;
};
template<typename T>
Vector4Template<T> Vector4Template<T>::zero = Vector4Template(0, 0, 0, 0);
template<typename T>
Vector4Template<T> Vector4Template<T>::one = Vector4Template(1, 1, 1, 1);
using Vector4f = Vector4Template<float>;
|