22 inline virtual void AddImpl(
const float* p_value);
28 inline virtual void AddImpl(
float p_value);
34 inline virtual void SubImpl(
const float* p_value);
40 inline virtual void MulImpl(
const float* p_value);
46 inline virtual void MulImpl(
const float& p_value);
52 inline virtual void DivImpl(
const float& p_value);
60 inline virtual float DotImpl(
const float* p_a,
const float* p_b)
const;
66 inline virtual void SetData(
float* p_data);
116 inline virtual float Dot(
const float* p_a,
const float* p_b)
const;
132 inline virtual float Dot(
const float* p_a,
const Vector2& p_b)
const;
140 inline virtual float Dot(
const Vector2& p_a,
const float* p_b)
const;
254 inline void AddImpl(
const float* p_value)
override;
264 inline void SubImpl(
const float* p_value)
override;
269 inline void MulImpl(
const float* p_value)
override;
274 inline void MulImpl(
const float& p_value)
override;
279 inline void DivImpl(
const float& p_value)
override;
284 inline float DotImpl(
const float* p_a,
const float* p_b)
const override;
353 inline virtual void Fill(
const float& p_value);
370 inline void AddImpl(
const float* p_value)
override;
380 inline void SubImpl(
const float* p_value)
override;
385 inline void MulImpl(
const float* p_value)
override;
390 inline void MulImpl(
const float& p_value)
override;
395 inline void DivImpl(
const float& p_value)
override;
400 inline float DotImpl(
const float* p_a,
const float* p_b)
const override;
436 inline void Fill(
const float& p_value)
override;
[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.
[AI] 4D point class for floating point values.
[AI] Represents a 2D mathematical vector with floating-point coordinates.
float * m_data
[AI] Pointer to externally provided float storage (owned elsewhere).
float & operator[](int idx)
[AI] Accesses the idx-th float in the vector (0 or 1).
virtual float Dot(const Vector2 &p_a, const Vector2 &p_b) const
[AI] Compute the dot product of two Vector2 objects.
virtual void operator+=(float p_value)
[AI] In-place add a scalar to all coordinates.
virtual float Dot(const float *p_a, const Vector2 &p_b) const
[AI] Compute the dot product given a pointer and a Vector2 (second param).
virtual float Dot(const float *p_a, const float *p_b) const
[AI] Compute the dot product of the two float arrays interpreted as vectors of 2 elements.
virtual void AddImpl(float p_value)
[AI] Adds a scalar value to every element of this vector.
virtual void operator+=(const float *p_other)
[AI] In-place add vector elements via float pointer.
Vector2(float *p_data)
[AI] Construct a 2D vector using an external float buffer.
virtual void operator/=(const float &p_value)
[AI] In-place scalar division.
virtual void AddImpl(const float *p_value)
[AI] Adds the values pointed to by p_value to this vector.
virtual void SetData(float *p_data)
[AI] Set the internal data pointer to external storage.
virtual void operator*=(const float &p_value)
[AI] In-place multiplication by a scalar.
virtual void operator-=(const Vector2 &p_other)
[AI] In-place subtraction of another Vector2.
virtual void DivImpl(const float &p_value)
[AI] Divides this vector by a scalar value.
virtual float * GetData()
[AI] Retrieves the mutable in-memory data pointer for this vector.
virtual float LenSquared() const
[AI] Compute the squared length (magnitude^2) of the vector.
virtual void SubImpl(const float *p_value)
[AI] Subtracts the vector specified by p_value from this vector.
virtual int Unitize()
[AI] Scales the vector so its norm is 1 (unit vector).
virtual void MulImpl(const float *p_value)
[AI] Multiplies this vector by another vector (per element).
virtual float Dot(const Vector2 &p_a, const float *p_b) const
[AI] Compute the dot product given a Vector2 (first param) and a pointer (second param).
const float & operator[](int idx) const
[AI] Const version of the index operator.
virtual void operator*=(const Vector2 &p_other)
[AI] In-place per-element multiplication by another Vector2.
virtual const float * GetData() const
[AI] Retrieves the immutable data pointer for this vector.
virtual void operator+=(const Vector2 &p_other)
[AI] In-place add another Vector2.
Vector2(const float *p_data)
[AI] Construct a 2D vector from a (likely constant) array of floats without copying (just pointer ass...
virtual void operator-=(const float *p_other)
[AI] In-place subtraction of vector pointed to by p_other.
virtual void operator*=(const float *p_other)
[AI] In-place per-element multiplication of this vector by another array.
virtual void operator=(const Vector2 &p_other)
[AI] Assigns this vector's elements from another Vector2.
virtual void EqualsImpl(const float *p_data)
[AI] Assigns values from provided array to this vector.
virtual void Clear()
[AI] Zeros all elements (sets all coordinates to 0.0).
virtual void operator=(const float *p_other)
[AI] Assigns this vector's elements from a pointer to two floats.
virtual void MulImpl(const float &p_value)
[AI] Multiplies this vector by a scalar value.
virtual float DotImpl(const float *p_a, const float *p_b) const
[AI] Computes the dot product of two arrays interpreted as vectors.
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
virtual void EqualsCrossImpl(const float *p_a, const float *p_b)
[AI] Assigns this vector to the cross product of p_a and p_b.
void EqualsImpl(const float *p_data) override
[AI] Assigns values from provided array to this vector.
float DotImpl(const float *p_a, const float *p_b) const override
void AddImpl(float p_value) override
[AI] Adds a scalar value to every element of this vector.
Vector3(float *p_data)
[AI] Construct a 3D vector pointing at external data storage.
virtual void EqualsCross(const Vector3 &p_a, const float *p_b)
[AI] Sets this vector to be the cross product of p_a and p_b, with b as a pointer.
virtual void EqualsCross(const float *p_a, const Vector3 &p_b)
[AI] Sets this vector to be the cross product of p_a and p_b, with a as a pointer.
void MulImpl(const float &p_value) override
[AI] Multiplies this vector by a scalar value.
void Clear() override
[AI] Sets every coordinate (x, y, z) to zero.
virtual void Fill(const float &p_value)
[AI] Fills all coordinates with p_value.
void DivImpl(const float &p_value) override
[AI] Divides this vector by a scalar value.
void MulImpl(const float *p_value) override
[AI] Multiplies this vector by another vector (per element).
void SubImpl(const float *p_value) override
[AI] Subtracts the vector specified by p_value from this vector.
float LenSquared() const override
[AI] Computes the squared magnitude (x^2 + y^2 + z^2) of this vector.
void AddImpl(const float *p_value) override
[AI] Adds the values pointed to by p_value to this vector.
virtual void EqualsCross(const Vector3 &p_a, const Vector3 &p_b)
[AI] Sets this vector to be the cross product of p_a and p_b.
Vector3(const float *p_data)
[AI] Construct a 3D vector from const float* (pointer is cast to non-const in base).
[AI] A four-dimensional vector, supporting operations relevant for matrix and quaternion math (homoge...
virtual int EqualsHamiltonProduct(const Vector4 &p_a, const Vector4 &p_b)
[AI] Set this vector to the Hamilton product of two quaternion Vector4s.
void Clear() override
[AI] Sets all four components to zero.
void AddImpl(float p_value) override
[AI] Adds a scalar value to every element of this vector.
virtual void SetMatrixProduct(const float *p_vec, const float *p_mat)
[AI] Set this vector to the result of a matrix-vector product: result = p_mat * p_vec.
void AddImpl(const float *p_value) override
[AI] Adds the values pointed to by p_value to this vector.
Vector4(float *p_data)
[AI] Constructs a Vector4 using external float storage.
Vector4(const float *p_data)
[AI] Constructs a Vector4 using a const float pointer (pointer is reinterpreted as mutable).
virtual int NormalizeQuaternion()
[AI] Normalize this quaternion (interpreted as vector) in place.
float DotImpl(const float *p_a, const float *p_b) const override
void EqualsImpl(const float *p_data) override
[AI] Assigns values from provided array to this vector.
const float & operator[](int idx) const
[AI] Const version for coordinate access (0...3).
void SubImpl(const float *p_value) override
[AI] Subtracts the vector specified by p_value from this vector.
void MulImpl(const float *p_value) override
[AI] Multiplies this vector by another vector (per element).
void Fill(const float &p_value) override
[AI] Fill all four floats with p_value.
float LenSquared() const override
[AI] Computes the squared magnitude of the 4D vector.
virtual void SetMatrixProduct(const Vector4 &p_a, const float *p_b)
[AI] Set this vector to result of matrix-vector product with source given as Vector4,...
void MulImpl(const float &p_value) override
[AI] Multiplies this vector by a scalar value.
float & operator[](int idx)
[AI] Indexes 0-3: returns reference to the fast access coordinate.
void DivImpl(const float &p_value) override
[AI] Divides this vector by a scalar value.