Isle
Loading...
Searching...
No Matches
vector2d.inl.h
Go to the documentation of this file.
1#ifndef VECTOR2D_H
2#define VECTOR2D_H
3
4#include "vector.h"
5
6#include <math.h>
7#include <memory.h>
8
15void Vector2::AddImpl(const float* p_value);
16
23void Vector2::AddImpl(float p_value);
24
31void Vector2::SubImpl(const float* p_value);
32
39void Vector2::MulImpl(const float* p_value);
40
47void Vector2::MulImpl(const float& p_value);
48
55void Vector2::DivImpl(const float& p_value);
56
65float Vector2::DotImpl(const float* p_a, const float* p_b) const;
66
73void Vector2::SetData(float* p_data);
74
81void Vector2::EqualsImpl(const float* p_data);
82
89float* Vector2::GetData();
90
97const float* Vector2::GetData() const;
98
104void Vector2::Clear();
105
114float Vector2::Dot(const float* p_a, const float* p_b) const;
115
124float Vector2::Dot(const Vector2& p_a, const Vector2& p_b) const;
125
134float Vector2::Dot(const float* p_a, const Vector2& p_b) const;
135
144float Vector2::Dot(const Vector2& p_a, const float* p_b) const;
145
152float Vector2::LenSquared() const;
153
160int Vector2::Unitize();
161
168void Vector2::operator+=(float p_value);
169
176void Vector2::operator+=(const float* p_other);
177
184void Vector2::operator+=(const Vector2& p_other);
185
192void Vector2::operator-=(const float* p_other);
193
200void Vector2::operator-=(const Vector2& p_other);
201
208void Vector2::operator*=(const float* p_other);
209
216void Vector2::operator*=(const Vector2& p_other);
217
224void Vector2::operator*=(const float& p_value);
225
232void Vector2::operator/=(const float& p_value);
233
240void Vector2::operator=(const float* p_other);
241
248void Vector2::operator=(const Vector2& p_other);
249
250#endif // VECTOR2D_H
[AI] Represents a 2D mathematical vector with floating-point coordinates.
Definition: vector.h:16
virtual void operator+=(float p_value)
[AI] In-place add a scalar to all coordinates.
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 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 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 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 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 float DotImpl(const float *p_a, const float *p_b) const
[AI] Computes the dot product of two arrays interpreted as vectors.