11namespace LinearAlgebra {
83 inline float Up()
const {
return y; };
84 inline float Right()
const {
return x; };
AngleOf< float > Angle
Definition Angle.h:42
Definition AbsoluteEncoder.h:5
A spherical vector.
Definition Spherical.h:21
3-dimensional Vector representation
Definition Vector3.h:21
float z
The forward axis of the vector.
Definition Vector3.h:34
float y
The upward axis of the vector.
Definition Vector3.h:30
float x
The right axis of the vector.
Definition Vector3.h:26
A 2=dimensional vector.
Definition Vector2.h:38
A 3-dimensional vector.
Definition Vector3.h:42
float Right() const
Definition Vector3.h:84
static const Vector3 back
A normalized back-oriented vector.
Definition Vector3.h:71
static const Vector3 left
A normalized left-oriented vector.
Definition Vector3.h:75
Vector3()
A new 3-dimensional zero vector.
Definition Vector3.cpp:15
static float Distance(const Vector3 &v1, const Vector3 &v2)
The distance between two vectors.
Definition Vector3.cpp:154
float Forward() const
Definition Vector3.h:82
Vector3(Spherical v)
Convert vector in spherical coordinates to 3d carthesian coordinates.
static const Vector3 one
A vector with one for all axis.
Definition Vector3.h:67
static float Dot(const Vector3 &v1, const Vector3 &v2)
The dot product of two vectors.
Definition Vector3.cpp:146
static float SqrMagnitude(const Vector3 &v)
The squared vector length.
Definition Vector3.cpp:73
static Vector3 Normalize(const Vector3 &v)
Convert the vector to a length of 1.
Definition Vector3.cpp:78
Vector3 operator+=(const Vector3 &v)
Definition Vector3.cpp:111
friend Vector3 operator*(const Vector3 &v, float f)
Scale the vector uniformly up.
static Vector3 Lerp(const Vector3 &v1, const Vector3 &v2, float f)
Lerp (linear interpolation) between two vectors.
Definition Vector3.cpp:215
~Vector3()
Vector3 destructor.
Definition Vector3.cpp:50
float magnitude() const
The vector length.
Definition Vector3.cpp:71
Vector3 normalized() const
Convert the vector to a length of 1.
Definition Vector3.cpp:86
bool operator==(const Vector3 &v)
Check if this vector to the given vector.
Definition Vector3.cpp:150
Vector3 operator/=(float f)
Definition Vector3.cpp:139
Vector3 operator+(const Vector3 &v) const
Add a vector to this vector.
Definition Vector3.cpp:108
static const Vector3 up
A normalized up-oriented vector.
Definition Vector3.h:77
static const Vector3 zero
A vector with zero for all axis.
Definition Vector3.h:65
static float SignedAngle(const Vector3 &v1, const Vector3 &v2, const Vector3 &axis)
The signed angle between two vectors.
Definition Vector3.cpp:200
static Vector3 Cross(const Vector3 &v1, const Vector3 &v2)
The cross product of two vectors.
Definition Vector3.cpp:158
static const Vector3 forward
A normalized forward-oriented vector.
Definition Vector3.h:69
friend Vector3 operator/(float f, const Vector3 &v)
Vector3 operator*=(float f)
Definition Vector3.cpp:127
static Vector3 ProjectOnPlane(const Vector3 &v, const Vector3 &n)
Project the vector on a plane defined by a normal orthogonal to the plane.
Definition Vector3.cpp:174
static const Vector3 down
A normalized down-oriented vector.
Definition Vector3.h:79
float sqrMagnitude() const
The squared vector length.
Definition Vector3.cpp:76
float Up() const
Definition Vector3.h:83
Vector3 operator-() const
Negate te vector such that it points in the opposite direction.
Definition Vector3.cpp:95
static float Magnitude(const Vector3 &v)
The vector length.
Definition Vector3.cpp:68
friend Vector3 operator/(const Vector3 &v, float f)
Scale the vector uniformly down.
static Vector3 Project(const Vector3 &v, const Vector3 &n)
Project the vector on another vector.
Definition Vector3.cpp:163
Vector3 operator-=(const Vector3 &v)
Definition Vector3.cpp:102
static const Vector3 right
A normalized right-oriented vector.
Definition Vector3.h:73
static Vector3 Scale(const Vector3 &v1, const Vector3 &v2)
Scale the vector using another vector.
Definition Vector3.cpp:118
friend Vector3 operator*(float f, const Vector3 &v)