24 Vec4() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {}
33 Vec4(
float x,
float y,
float z,
float w) : x(x), y(y), z(z), w(w) {}
42 Vec4(
int x,
int y,
int z,
int w) : x((float)x), y((float)y), z((float)z), w((float)w) {}
78 return float(sqrt((w*w) + (x*x) + (y*y) + (z*z)));
106 vecOut.
x = vecInA.
x - vecInB.
x;
107 vecOut.
y = vecInA.
y - vecInB.
y;
108 vecOut.
z = vecInA.
z - vecInB.
z;
109 vecOut.
w = vecInA.
w - vecInB.
w;
122 vecOut.
x = vecInA.
x + vecInB.
x;
123 vecOut.
y = vecInA.
y + vecInB.
y;
124 vecOut.
z = vecInA.
z + vecInB.
z;
125 vecOut.
w = vecInA.
w + vecInB.
w;
138 vecOut.
x = vecInA.
x / scalar;
139 vecOut.
y = vecInA.
y / scalar;
140 vecOut.
z = vecInA.
z / scalar;
141 vecOut.
w = vecInA.
w / scalar;
154 vecOut.
x = vecInA.
x * scalar;
155 vecOut.
y = vecInA.
y * scalar;
156 vecOut.
z = vecInA.
z * scalar;
157 vecOut.
w = vecInA.
w * scalar;
170 vecOut.
x = vecInA.
x * vecInB.
x;
171 vecOut.
y = vecInA.
y * vecInB.
y;
172 vecOut.
z = vecInA.
z * vecInB.
z;
173 vecOut.
w = vecInA.
w * vecInB.
w;
float z
Definition: Vec4.h:19
Mat4 operator-(Mat4 mInA, float s)
Overloads the - operator allowing a Mat4 to be added to a scalar.
Definition: Mat4.h:216
float x
Position variables.
Definition: Vec4.h:19
Vec4 * operator+=(Vec4 vecIn)
Overloads the += operator.
Definition: Vec4.h:49
float w
Definition: Vec4.h:19
Contains the Vec4 structure with functions and overloaded operators.
Definition: Vec4.h:16
Vec2 operator/(Vec2 vecInA, float scalar)
Overloads the / operator allowing a Vec2 to be divided by a scalar.
Definition: Vec2.h:121
Mat4 operator*(Mat4 mInA, float s)
Overloads the * operator allowing a Mat4 to be multiplied to a scalar.
Definition: Mat4.h:248
Vec4()
Constructs the Vec4 setting the values to 0,0,0,0.
Definition: Vec4.h:24
float getLength()
Returns the length of the Vec4.
Definition: Vec4.h:76
Mat4 operator+(Mat4 mIn, float s)
Overloads the + operator allowing a Mat4 to be added to a scalar.
Definition: Mat4.h:184
float y
Definition: Vec4.h:19
Vec4(float x, float y, float z, float w)
Constructs the Vec4 setting the values to the input coordinates.
Definition: Vec4.h:33
Vec4(int x, int y, int z, int w)
Constructs the Vec4 setting the values to the input coordinates.
Definition: Vec4.h:42
The namespace for all maths code.
Definition: Convert.cpp:5
Vec4 * operator-=(Vec4 vecIn)
Overloads the -= operator.
Definition: Vec4.h:63