#include <Quaternion.h>
Public Member Functions | |
Vector3 (float x_, float y_, float z_) | |
Vector3 | operator+ (Vector3 vt) |
Vector3 | operator+ (float nt) |
Vector3 | operator- (Vector3 vt) |
Vector3 | operator- (float nt) |
Vector3 | operator+= (Vector3 vt) |
Vector3 | operator+= (float nt) |
Vector3 | operator-= (Vector3 vt) |
Vector3 | operator-= (float nt) |
Vector3 | operator* (Vector3 vt) |
Vector3 | operator* (float nt) |
Vector3 | operator/ (Vector3 vt) |
Vector3 | operator/ (float nt) |
Vector3 | operator*= (Vector3 vt) |
Vector3 | operator*= (float nt) |
Vector3 | operator/= (Vector3 vt) |
Vector3 | operator/= (float nt) |
Vector3 | normalize () |
float | get_magnitude () |
float | dot_product (Vector3 vt) |
Vector3 | cross_product (Vector3 vt) |
float | angle_between_vectors (Vector3 vt) |
Vector3 | rad_to_deg () |
Vector3 | deg_to_rad () |
Public Attributes | |
float | x |
float | y |
float | z |
Class to perform 3 dimensional vector math, also used for quaternions
x - y - z components
X Roll Y Pitch Z Yaw
float Vector3::angle_between_vectors | ( | Vector3 | vt | ) |
Returns the angle between the two vectors
vt | Other vector |
Cross product of this vector and another vector vt (v_this x v_other)
vt | Other vector to calculate cross product with |
Vector3 Vector3::deg_to_rad | ( | ) |
float Vector3::dot_product | ( | Vector3 | vt | ) |
Dot product of this vector and another vector vt
vt | Other vector to calculate dot product with |
Vector3 Vector3::normalize | ( | ) |
Returns normalized vector (scales length to 1) if its length is not zero
Vector3 Vector3::rad_to_deg | ( | ) |