Vector4.hh
Go to the documentation of this file.
friend Vector4< T > operator+(const T _s, const Vector4< T > &_v)
Addition operators.
Definition: Vector4.hh:328
const Vector4< T > operator*(T _v) const
Multiplication operators.
Definition: Vector4.hh:512
T setf(T... args)
static const Vector4< T > Zero
math::Vector4(0, 0, 0, 0)
Definition: Vector4.hh:39
const Vector4< T > operator/(T _v) const
Division assignment operator.
Definition: Vector4.hh:446
T Dot(const Vector4< T > &_v) const
Return the dot product of this vector and another vector.
Definition: Vector4.hh:174
Vector4< T > operator-(const T _s) const
Subtraction operators.
Definition: Vector4.hh:382
bool operator!=(const Vector4< T > &_pt) const
Not equal to operator.
Definition: Vector4.hh:567
Vector4< T > operator+(const T _s) const
Addition operators.
Definition: Vector4.hh:316
bool operator==(const Vector4< T > &_v) const
Equal to operator.
Definition: Vector4.hh:558
friend std::istream & operator>>(std::istream &_in, Vector4< T > &_pt)
Stream extraction operator.
Definition: Vector4.hh:711
T max_element(T... args)
const Vector4< T > & operator/=(const Vector4< T > &_v)
Division assignment operator.
Definition: Vector4.hh:431
friend const Vector4 operator*(const T _s, const Vector4 &_v)
Scalar left multiplication operators.
Definition: Vector4.hh:522
friend std::ostream & operator<<(std::ostream &_out, const Vector4< T > &_pt)
Stream insertion operator.
Definition: Vector4.hh:700
Vector4< T > & operator=(T _value)
Assignment operator.
Definition: Vector4.hh:279
T Distance(T _x, T _y, T _z, T _w) const
Calc distance to the given point.
Definition: Vector4.hh:93
STL class.
const Vector4< T > & operator-=(const T _s)
Subtraction assignment operator.
Definition: Vector4.hh:403
T min(T... args)
void Min(const Vector4< T > &_v)
Set this vector's components to the minimum of itself and the passed in vector.
Definition: Vector4.hh:235
static const Vector4< T > One
math::Vector4(1, 1, 1, 1)
Definition: Vector4.hh:42
T operator[](const std::size_t _index) const
Const-qualified array subscript operator.
Definition: Vector4.hh:597
Vector4< T > & operator=(const Vector4< T > &_v)
Assignment operator.
Definition: Vector4.hh:267
const Vector4< T > & operator/=(T _v)
Division operator.
Definition: Vector4.hh:455
static const size_t IGN_ZERO_SIZE_T
size_t type with a value of 0
Definition: Helpers.hh:226
T isfinite(T... args)
const Vector4< T > operator*(const Matrix4< T > &_m) const
Matrix multiplication operator.
Definition: Vector4.hh:481
Vector4 Rounded() const
Get a rounded version of this vector.
Definition: Vector4.hh:126
T max(T... args)
T Length() const
Returns the length (magnitude) of the vector.
Definition: Vector4.hh:100
Vector4(const Vector4< T > &_v)
Copy constructor.
Definition: Vector4.hh:65
void Normalize()
Normalize the vector length.
Definition: Vector4.hh:149
Vector4 Abs() const
Get the absolute value of the vector.
Definition: Vector4.hh:200
const Vector4< T > & operator*=(const Vector4< T > &_pt)
Multiplication assignment operator.
Definition: Vector4.hh:499
const Vector4< T > operator/(const Vector4< T > &_v) const
Division assignment operator.
Definition: Vector4.hh:418
const Vector4< T > & operator-=(const Vector4< T > &_v)
Subtraction assigment operators.
Definition: Vector4.hh:369
T pow(T... args)
const Vector4< T > & operator*=(T _v)
Multiplication assignment operator.
Definition: Vector4.hh:531
Vector4 Normalized() const
Return a normalized vector.
Definition: Vector4.hh:164
T & operator[](const std::size_t _index)
Array subscript operator.
Definition: Vector4.hh:588
T SquaredLength() const
Return the square of the length (magnitude) of the vector.
Definition: Vector4.hh:107
Vector4< T > operator-(const Vector4< T > &_v) const
Subtraction operator.
Definition: Vector4.hh:358
bool Equal(const Vector4 &_v, const T &_tol) const
Equality test with tolerance.
Definition: Vector4.hh:546
const Vector4< T > & operator+=(const T _s)
Addition assignment operator.
Definition: Vector4.hh:337
T Max() const
Get the maximum value in the vector.
Definition: Vector4.hh:245
static const size_t IGN_THREE_SIZE_T
size_t type with a value of 3
Definition: Helpers.hh:235
bool IsFinite() const
See if a point is finite (e.g., not nan)
Definition: Vector4.hh:574
Definition: Angle.hh:42
T min_element(T... args)
T Min() const
Get the minimum value in the vector.
Definition: Vector4.hh:252
friend Vector4< T > operator-(const T _s, const Vector4< T > &_v)
Subtraction operators.
Definition: Vector4.hh:394
Vector4< T > operator+(const Vector4< T > &_v) const
Addition operator.
Definition: Vector4.hh:292
STL class.
const Vector4< T > & operator+=(const Vector4< T > &_v)
Addition operator.
Definition: Vector4.hh:303
void Max(const Vector4< T > &_v)
Set this vector's components to the maximum of itself and the passed in vector.
Definition: Vector4.hh:224
const Vector4< T > operator*(const Vector4< T > &_pt) const
Multiplication operator.
Definition: Vector4.hh:470
void Set(T _x=0, T _y=0, T _z=0, T _w=0)
Set the contents of the vector.
Definition: Vector4.hh:213
T clamp(T _v, T _min, T _max)
Simple clamping function.
Definition: Helpers.hh:405
T Distance(const Vector4< T > &_pt) const
Calc distance to the given point.
Definition: Vector4.hh:79
Vector4(const T &_x, const T &_y, const T &_z, const T &_w)
Constructor with component values.
Definition: Vector4.hh:55
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:190
Vector4 operator-() const
Negation operator.
Definition: Vector4.hh:349