18 Vector3(
float x,
float y,
float z)
23 Vector3 operator *(
float s)
const
25 return Vector3(X * s, Y * s, Z * s);
30 return Vector3(X * v.X, Y * v.Y, Z * v.Z);
33 Vector3 operator /(
float s)
const
35 return Vector3(X / s, Y / s, Z / s);
40 return Vector3(X - v.X, Y - v.Y, Z - v.Z);
50 return Vector3(X + v.X, Y + v.Y, Z + v.Z);
53 void operator +=(
const Vector3& v)
60 void operator -=(
const Vector3& v)
67 void operator *=(
float s)
74 void operator /=(
float s)
83 return sqrtf(X * X + Y * Y + Z * Z);
86 float LengthSquared()
const
88 return X * X + Y * Y + Z * Z;
111 static void Multiply(
const Vector3& v,
float scaleFactor,
Vector3& result)
113 result.X = v.X * scaleFactor;
114 result.Y = v.Y * scaleFactor;
115 result.Z = v.Z * scaleFactor;
118 static void Dot(
const Vector3& v1,
const Vector3& v2,
float& result);
126 static Vector3 TransformNormal(
const Vector3& normal,
const Matrix& matrix) {
Vector3 v; TransformNormal(normal, matrix, v);
return v; }
130 static float DistanceSquared(
const Vector3& v1,
const Vector3& v2);
134 #endif // MATH_VECTOR3_H
Definition: Quaternion.h:6