16#ifndef AEONGAMES_VECTOR3_H
17#define AEONGAMES_VECTOR3_H
40 DLL
Vector3 (
const float*
const aVector );
45 DLL
Vector3 (
const void*
const aVector,
const uint32_t aStride );
51 DLL
Vector3 (
float aX,
float aY,
float aZ );
55 DLL
void Get (
float* aData )
const;
63 DLL
const float&
GetX()
const;
67 DLL
const float&
GetY()
const;
71 DLL
const float&
GetZ()
const;
75 DLL
void SetVector3 (
const float*
const aVector );
80 DLL
void SetVector3 (
const void*
const aVector,
const uint32_t aStride );
129 DLL
float operator[] (
const size_t aIndex )
const;
DLL float GetLenghtSquared() const
Get the squared length of the vector.
DLL const float *const GetVector3() const
Get a pointer to the internal vector data.
DLL float operator[](const size_t aIndex) const
Access a component by index (const).
DLL float GetMaxAxisLenght() const
Get the absolute value of the largest axis component.
DLL const float & GetZ() const
Get the Z component.
DLL float GetMinAxisLenght() const
Get the absolute value of the smallest axis component.
DLL size_t GetMaxAxisIndex() const
Get the index of the axis with the largest absolute value.
DLL float GetDistanceToPlane(const Plane &aPlane) const
Get the signed distance from this point to a plane.
DLL float GetLenght() const
Get the length of the vector.
DLL Vector3 & operator=(const float *aLhs)
Assign from a raw float array.
DLL Vector3 & operator*=(const float aLhs)
Scale this vector by a scalar.
DLL Vector3 & operator/=(const float aLhs)
Divide this vector by a scalar.
DLL void SetVector3(const float *const aVector)
Set the vector from a float array.
DLL bool IsZero() const
Check whether all components are zero.
DLL Vector3 & operator-=(const Vector3 &aLhs)
Subtract a vector from this vector.
DLL const float & GetY() const
Get the Y component.
DLL Vector3()
Default constructor.
DLL Vector3 & operator+=(const Vector3 &aLhs)
Add a vector to this vector.
DLL const float & GetX() const
Get the X component.
DLL void Get(float *aData) const
Copy vector data to an external float array.
DLL size_t GetMinAxisIndex() const
Get the index of the axis with the smallest absolute value.
<- This is here just for the literals
DLL const Vector3 Spline(const Vector3 &p0, const Vector3 &p1, const Vector3 &p2, const Vector3 &p3, double interpolation)
Catmull-Rom spline interpolation between four control points.
DLL bool operator!=(const Vector3 &aLhs, const Vector3 &aRhs)
Inequality comparison operator.
DLL const Vector3 operator/(const Vector3 &aLhs, const float aRhs)
Scalar division operator.
DLL const Matrix3x3 operator*(const Matrix3x3 &lhs, const Matrix3x3 &rhs)
Multiplies two 3x3 matrices. Multiplies two 3x3 matrices.
DLL const float Dot(const Vector3 &aLhs, const Vector3 &aRhs)
Compute the dot product of two vectors.
DLL const Vector3 operator+(const Vector3 &aLhs, const Vector3 &aRhs)
Addition operator.
DLL const Matrix3x3 Abs(const Matrix3x3 &aMatrix3x3)
Compute the element-wise absolute value of a matrix.
DLL const Vector3 Cross(const Vector3 &aLhs, const Vector3 &aRhs)
Compute the cross product of two vectors.
DLL const Vector3 operator-(const Vector3 &aLhs, const Vector3 &aRhs)
Subtraction operator.
DLL const bool operator==(const Matrix3x3 &lhs, const Matrix3x3 &rhs)
Compare two 3x3 matrices for equality.
DLL const Vector3 Normalize(const Vector3 &aVector)
Return a normalized (unit length) copy of the vector.