Vector4.hh
Go to the documentation of this file.
const Vector4< T > & operator+=(const T _s)
Addition assignment operator.
Definition: Vector4.hh:343
Vector4 Rounded() const
Get a rounded version of this vector.
Definition: Vector4.hh:132
friend Vector4< T > operator-(const T _s, const Vector4< T > &_v)
Subtraction operators.
Definition: Vector4.hh:400
Vector4(const T &_x, const T &_y, const T &_z, const T &_w)
Constructor with component values.
Definition: Vector4.hh:59
bool IsFinite() const
See if a point is finite (e.g., not nan)
Definition: Vector4.hh:580
T Min() const
Get the minimum value in the vector.
Definition: Vector4.hh:258
bool operator!=(const Vector4< T > &_pt) const
Not equal to operator.
Definition: Vector4.hh:573
const Vector4< T > & operator+=(const Vector4< T > &_v)
Addition operator.
Definition: Vector4.hh:309
Vector4< T > & operator=(T _value)
Assignment operator.
Definition: Vector4.hh:285
const Vector4< T > operator*(T _v) const
Multiplication operators.
Definition: Vector4.hh:518
const Vector4< T > operator/(const Vector4< T > &_v) const
Division assignment operator.
Definition: Vector4.hh:424
Vector4< T > & operator=(const Vector4< T > &_v)
Assignment operator.
Definition: Vector4.hh:273
static const Vector4< T > Zero
math::Vector4(0, 0, 0, 0)
Definition: Vector4.hh:40
void Set(T _x=0, T _y=0, T _z=0, T _w=0)
Set the contents of the vector.
Definition: Vector4.hh:219
const Vector4< T > operator*(const Matrix4< T > &_m) const
Matrix multiplication operator.
Definition: Vector4.hh:487
friend Vector4< T > operator+(const T _s, const Vector4< T > &_v)
Addition operators.
Definition: Vector4.hh:334
bool operator==(const Vector4< T > &_v) const
Equal to operator.
Definition: Vector4.hh:564
T operator[](const std::size_t _index) const
Const-qualified array subscript operator.
Definition: Vector4.hh:603
void Min(const Vector4< T > &_v)
Set this vector's components to the minimum of itself and the passed in vector.
Definition: Vector4.hh:241
const Vector4< T > & operator*=(const Vector4< T > &_pt)
Multiplication assignment operator.
Definition: Vector4.hh:505
T Dot(const Vector4< T > &_v) const
Return the dot product of this vector and another vector.
Definition: Vector4.hh:180
const Vector4< T > & operator-=(const Vector4< T > &_v)
Subtraction assigment operators.
Definition: Vector4.hh:375
static const Vector4< T > One
math::Vector4(1, 1, 1, 1)
Definition: Vector4.hh:43
T & operator[](const std::size_t _index)
Array subscript operator.
Definition: Vector4.hh:594
const Vector4< T > & operator*=(T _v)
Multiplication assignment operator.
Definition: Vector4.hh:537
void Max(const Vector4< T > &_v)
Set this vector's components to the maximum of itself and the passed in vector.
Definition: Vector4.hh:230
T AbsDot(const Vector4< T > &_v) const
Return the absolute dot product of this vector and another vector. This is similar to the Dot functio...
Definition: Vector4.hh:196
const Vector4< T > & operator/=(T _v)
Division operator.
Definition: Vector4.hh:461
const Vector4< T > & operator-=(const T _s)
Subtraction assignment operator.
Definition: Vector4.hh:409
T SquaredLength() const
Return the square of the length (magnitude) of the vector.
Definition: Vector4.hh:112
T Max() const
Get the maximum value in the vector.
Definition: Vector4.hh:251
Vector4 Normalized() const
Return a normalized vector.
Definition: Vector4.hh:170
Vector4< T > operator-(const Vector4< T > &_v) const
Subtraction operator.
Definition: Vector4.hh:364
Vector4 Abs() const
Get the absolute value of the vector.
Definition: Vector4.hh:206
Vector4< T > operator+(const Vector4< T > &_v) const
Addition operator.
Definition: Vector4.hh:298
const Vector4< T > operator/(T _v) const
Division assignment operator.
Definition: Vector4.hh:452
friend std::istream & operator>>(std::istream &_in, Vector4< T > &_pt)
Stream extraction operator.
Definition: Vector4.hh:717
const Vector4< T > & operator/=(const Vector4< T > &_v)
Division assignment operator.
Definition: Vector4.hh:437
T Length() const
Returns the length (magnitude) of the vector.
Definition: Vector4.hh:105
friend std::ostream & operator<<(std::ostream &_out, const Vector4< T > &_pt)
Stream insertion operator.
Definition: Vector4.hh:706
T Distance(T _x, T _y, T _z, T _w) const
Calc distance to the given point.
Definition: Vector4.hh:98
Vector4< T > operator+(const T _s) const
Addition operators.
Definition: Vector4.hh:322
T Distance(const Vector4< T > &_pt) const
Calc distance to the given point.
Definition: Vector4.hh:83
Vector4(const Vector4< T > &_v)
Copy constructor.
Definition: Vector4.hh:69
bool operator<(const Vector4< T > &_pt) const
Less than operator.
Definition: Vector4.hh:696
const Vector4< T > operator*(const Vector4< T > &_pt) const
Multiplication operator.
Definition: Vector4.hh:476
Vector4 operator-() const
Negation operator.
Definition: Vector4.hh:355
static const Vector4 NaN
math::Vector4(NaN, NaN, NaN, NaN)
Definition: Vector4.hh:46
bool Equal(const Vector4 &_v, const T &_tol) const
Equality test with tolerance.
Definition: Vector4.hh:552
friend const Vector4 operator*(const T _s, const Vector4 &_v)
Scalar left multiplication operators.
Definition: Vector4.hh:528
void Normalize()
Normalize the vector length.
Definition: Vector4.hh:155
Vector4< T > operator-(const T _s) const
Subtraction operators.
Definition: Vector4.hh:388
T fail(T... args)
T isfinite(T... args)
T max_element(T... args)
T max(T... args)
T min_element(T... args)
T min(T... args)
static const size_t IGN_ZERO_SIZE_T
size_t type with a value of 0
Definition: Helpers.hh:227
T clamp(T _v, T _min, T _max)
Simple clamping function.
Definition: Helpers.hh:406
static const size_t IGN_THREE_SIZE_T
size_t type with a value of 3
Definition: Helpers.hh:236
Definition: Angle.hh:43
T setf(T... args)