|
Gin
|
A 3D vector class for representing points and directions in 3D space. More...
#include <gin_vec3.h>
Public Member Functions | |
| Vec3 ()=default | |
| Vec3 (T x_, T y_, T z_) | |
| Vec3 | operator+ (const Vec3 &other) const |
| Vec3 | operator- (const Vec3 &other) const |
| Vec3 | operator* (T scalar) const |
| Vec3 | operator/ (T scalar) const |
| Vec3 & | operator+= (const Vec3 &other) |
| Vec3 & | operator-= (const Vec3 &other) |
| Vec3 & | operator*= (T scalar) |
| Vec3 & | operator/= (T scalar) |
| Vec3 | operator- () const |
| bool | operator== (const Vec3 &other) const |
| bool | operator!= (const Vec3 &other) const |
| T | dot (const Vec3 &other) const |
| Vec3 | cross (const Vec3 &other) const |
| T | length () const |
| T | lengthSquared () const |
| Vec3 | normalized () const |
| void | normalize () |
| Vec3 | lerp (const Vec3 &other, T t) const |
| Linear interpolation between this vector and another. | |
Public Attributes | |
| T | x = 0 |
| T | y = 0 |
| T | z = 0 |
A 3D vector class for representing points and directions in 3D space.
References Point< T >::x, Vec3< T >::x, Point< T >::y, Vec3< T >::y, and Vec3< T >::z.
References Point< T >::x, Vec3< T >::x, Point< T >::y, Vec3< T >::y, and Vec3< T >::z.
| Vec3 Vec3< T >::operator* | ( | T | scalar | ) | const |
References Vec3< T >::x, Vec3< T >::y, and Vec3< T >::z.
| Vec3 Vec3< T >::operator/ | ( | T | scalar | ) | const |
References Vec3< T >::x, Vec3< T >::y, and Vec3< T >::z.
References Point< T >::x, Vec3< T >::x, Point< T >::y, Vec3< T >::y, and Vec3< T >::z.
References Point< T >::x, Vec3< T >::x, Point< T >::y, Vec3< T >::y, and Vec3< T >::z.
| Vec3 & Vec3< T >::operator*= | ( | T | scalar | ) |
References Vec3< T >::x, Vec3< T >::y, and Vec3< T >::z.
| Vec3 & Vec3< T >::operator/= | ( | T | scalar | ) |
References Vec3< T >::x, Vec3< T >::y, and Vec3< T >::z.
| Vec3 Vec3< T >::operator- | ( | ) | const |
References Vec3< T >::x, Vec3< T >::y, and Vec3< T >::z.
References Point< T >::x, Vec3< T >::x, Point< T >::y, Vec3< T >::y, and Vec3< T >::z.
References Point< T >::x, Vec3< T >::x, Point< T >::y, Vec3< T >::y, and Vec3< T >::z.
References Point< T >::x, Vec3< T >::x, Point< T >::y, Vec3< T >::y, and Vec3< T >::z.
Referenced by Camera3D::pan().
References Vec3< T >::x, Vec3< T >::y, and Vec3< T >::z.
Referenced by Vec3< T >::normalize(), Vec3< T >::normalized(), Camera3D::orbit(), and Camera3D::zoom().
References Vec3< T >::x, Vec3< T >::y, and Vec3< T >::z.
References Vec3< T >::length().
Referenced by Camera3D::zoom().
References Vec3< T >::length().
Linear interpolation between this vector and another.
Referenced by Vec3< T >::cross(), Vec3< T >::dot(), Vec3< T >::length(), Vec3< T >::lengthSquared(), Vec3< T >::operator*(), Vec3< T >::operator*=(), Vec3< T >::operator+(), Vec3< T >::operator+=(), Vec3< T >::operator-(), Vec3< T >::operator-(), Vec3< T >::operator-=(), Vec3< T >::operator/(), Vec3< T >::operator/=(), Vec3< T >::operator==(), Camera3D::orbit(), and Object3D::setPosition().
Referenced by Vec3< T >::cross(), Vec3< T >::dot(), Vec3< T >::length(), Vec3< T >::lengthSquared(), Vec3< T >::operator*(), Vec3< T >::operator*=(), Vec3< T >::operator+(), Vec3< T >::operator+=(), Vec3< T >::operator-(), Vec3< T >::operator-(), Vec3< T >::operator-=(), Vec3< T >::operator/(), Vec3< T >::operator/=(), Vec3< T >::operator==(), Camera3D::orbit(), and Object3D::setPosition().
Referenced by Vec3< T >::cross(), Vec3< T >::dot(), Vec3< T >::length(), Vec3< T >::lengthSquared(), Vec3< T >::operator*(), Vec3< T >::operator*=(), Vec3< T >::operator+(), Vec3< T >::operator+=(), Vec3< T >::operator-(), Vec3< T >::operator-(), Vec3< T >::operator-=(), Vec3< T >::operator/(), Vec3< T >::operator/=(), Vec3< T >::operator==(), Camera3D::orbit(), and Object3D::setPosition().