49 Vector4(
float newX,
float newY,
float newZ,
float newW):
90 return Vector4(x + vec.
x, y + vec.
y, z + vec.
z, w + vec.
w);
95 return Vector4(x - vec.
x, y - vec.
y, z - vec.
z, w - vec.
w);
100 return Vector4(x * value, y * value, z * value, w * value);
105 if (value == 0.0f)
return Vector4(0.0f, 0.0f, 0.0f, 0.0f);
106 return Vector4(x / value, y / value, z / value, w / value);
111 return !((*this) == vec);
116 return Vector4(x + vec.
x, y + vec.
y, z + vec.
z, w + vec.
w);
121 return Vector4(x - vec.
x, y - vec.
y, z - vec.
z, w - vec.
w);
126 return Vector4(x * value, y * value, z * value, w * value);
131 if(value == 0.0f)
return Vector4(0.0f, 0.0f, 0.0f, 0.0f);
132 return Vector4(x / value, y / value, z / value, w / value);
142 if(x == vec.
x && y == vec.
y && z == vec.
z && w == vec.
w){
151 return !((*this) == vec);
170 void operator *= (
const float value)
178 void operator /= (
const float value)
194 return Vector4(-x, -y, -z, -w);
202 operator float* ()
const
204 return (
float*)
this;
207 operator const float* ()
const
209 return (
const float*)
this;
216 void set(
float newX,
float newY,
float newZ,
float newW)
234 return x*vec.
x + y*vec.
y + z*vec.
z + w*vec.
w;
239 return ((*
this) * (1.0f - factor)) + (vec * factor);
bool equals(const Vector4 &vec) const
Definition: Vector4.h:109
Vector4(const float *values)
Definition: Vector4.h:63
Vector4 substract(const Vector4 &vec) const
Definition: Vector4.h:93
float w
Definition: Vector4.h:38
float y
Definition: Vector4.h:36
float x
Definition: Vector4.h:35
Vector4(const Vector3 &vec)
Definition: Vector4.h:77
Vector4(const Vector4 &vec)
Definition: Vector4.h:70
float dotProduct(const Vector4 &vec)
Definition: Vector4.h:232
Vector4 lerp(const Vector4 &vec, float factor) const
Definition: Vector4.h:237
void loadIdentity(void)
Definition: Vector4.h:224
void set(float newX, float newY, float newZ, float newW)
Definition: Vector4.h:216
Vector4 add(const Vector4 &vec) const
Definition: Vector4.h:88
Vector4(const float value)
Definition: Vector4.h:56
Vector4 divide(const float value) const
Definition: Vector4.h:103
Vector4(void)
Definition: Vector4.h:42
Vector4(float newX, float newY, float newZ, float newW)
Definition: Vector4.h:49
float z
Definition: Vector4.h:37
Vector4 multiply(const float value) const
Definition: Vector4.h:98