|
ShishGL
1.0
A simple modular cross-platform graphics library
|
|
Go to the documentation of this file.
2 #ifndef SHISHGL_VECTOR3_HPP
3 #define SHISHGL_VECTOR3_HPP
52 out <<
"(" << vec.
x <<
"; " << vec.
y <<
"; " << vec.
z <<
")";
77 *
this += (right - *
this) * 2;
90 *
this = right * ((*
this ^ right) / (right ^ right));
101 template <
typename T>
109 template <
typename T>
116 template <
typename T>
118 return (&
this += (-right));
121 template <
typename T>
128 template <
typename T>
130 x *= mul; y *= mul; z *= mul;
134 template <
typename T>
141 template <
typename T>
143 return (x * right.
x + y * right.
y + z * right.
z);
150 #endif //SHISHGL_VECTOR3_HPP
Vector3< T > & operator*=(const T &mul)
Definition: Vector3.hpp:129
Vector3< T > operator|(const Vector3< T > &right) const
Definition: Vector3.hpp:95
T z
Definition: Vector3.hpp:15
Vector3< T > & operator|=(const Vector3< T > &right)
Definition: Vector3.hpp:89
Vector3< T > & operator+=(const Vector3< T > &right)
Definition: Vector3.hpp:102
Definition: Vector3.hpp:14
Vector3< T > operator-() const
Definition: Vector3.hpp:59
T operator^(const Vector3< T > &right) const
Definition: Vector3.hpp:142
Definition: CoreApplication.hpp:10
std::ostream & operator<<(std::ostream &out, const Vector3< T > &vec)
Definition: Vector3.hpp:51
Vector3< T > & operator-=(const Vector3< T > &right)
Definition: Vector3.hpp:117
Vector3< T > operator-(const Vector3< T > &right) const
Definition: Vector3.hpp:122
Vector3< T > operator!() const
Definition: Vector3.hpp:66
Vector3< T > & operator%=(const Vector3< T > &right)
Definition: Vector3.hpp:76
T y
Definition: Vector3.hpp:15
Vector3< T > operator%(const Vector3< T > &right) const
Definition: Vector3.hpp:82
double cos(const Vector3< double > &v1, const Vector3< double > &v2)
Definition: Vector3.cpp:16
Vector3< T > operator*(const T &mul) const
Definition: Vector3.hpp:135
T x
Definition: Vector3.hpp:15
Vector3< T > operator+(const Vector3< T > &right) const
Definition: Vector3.hpp:110