|
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.
|
default |
| Vec3< T >::Vec3 | ( | T | x_, |
| T | y_, | ||
| T | z_ ) |
Referenced by Mat4< float >::lookAt().
Referenced by Mat4< float >::lookAt(), and Camera3D::pan().
| T Vec3< T >::length | ( | ) | const |
Referenced by Vec3< float >::normalize(), Vec3< float >::normalized(), Camera3D::orbit(), and Camera3D::zoom().
| T Vec3< T >::lengthSquared | ( | ) | const |
Referenced by Mat4< float >::lookAt(), Camera3D::pan(), and Camera3D::zoom().
| void Vec3< T >::normalize | ( | ) |
Linear interpolation between this vector and another.
| T Vec3< T >::x = 0 |
Referenced by Vec3< float >::cross(), Vec3< float >::dot(), Mat4< float >::lookAt(), Vec3< float >::operator+(), Vec3< float >::operator+=(), Vec3< float >::operator-(), Vec3< float >::operator-=(), Vec3< float >::operator==(), Camera3D::orbit(), Mat4< float >::project(), Object3D::setPosition(), Mat4< float >::transformPoint(), Mat4< float >::transformVector(), and Mat4< float >::translation().
| T Vec3< T >::y = 0 |
Referenced by Vec3< float >::cross(), Vec3< float >::dot(), Mat4< float >::lookAt(), Vec3< float >::operator+(), Vec3< float >::operator+=(), Vec3< float >::operator-(), Vec3< float >::operator-=(), Vec3< float >::operator==(), Camera3D::orbit(), Mat4< float >::project(), Object3D::setPosition(), Mat4< float >::transformPoint(), Mat4< float >::transformVector(), and Mat4< float >::translation().
| T Vec3< T >::z = 0 |
Referenced by Vec3< float >::cross(), Vec3< float >::dot(), Mat4< float >::lookAt(), Vec3< float >::operator+(), Vec3< float >::operator+=(), Vec3< float >::operator-(), Vec3< float >::operator-=(), Vec3< float >::operator==(), Camera3D::orbit(), Mat4< float >::project(), Object3D::setPosition(), Mat4< float >::transformPoint(), Mat4< float >::transformVector(), and Mat4< float >::translation().