diff options
Diffstat (limited to 'src/math/axis.h')
-rw-r--r-- | src/math/axis.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/math/axis.h b/src/math/axis.h index 5f532c8..0ece016 100644 --- a/src/math/axis.h +++ b/src/math/axis.h @@ -20,53 +20,53 @@ class Axis public: Axis(); Axis(const Axis & other); - + void clear(); - + void assign(const Axis & other); - + /// global coordinates of the X-axis in the local coordinates system inline const Vector3f & forward() const { return axis_vector[0]; } - + /// global coordinates of the Y-axis in the local coordinates system inline const Vector3f & left() const { return axis_vector[1]; } - + /// global coordinates of the Z-axis in the local coordinates system inline const Vector3f & up() const { return axis_vector[2]; } - + inline Vector3f & operator[](size_t index) { return axis_vector[index]; } - + inline const Vector3f & operator[](size_t index) const { return axis_vector[index]; } - + Axis & operator=(const Axis & other); const Axis operator*(const Axis &other) const; - + /// change direction, rotate around up vector (positive is left) void change_direction(const float angle); - + /// change pitch, rotate around left vector (positive is up) void change_pitch(const float angle); - + /// change roll, rotate around forward vector (positive is left) void change_roll(const float angle); - + /// rotation about an arbitrary axis void rotate(const Vector3f & normal, const float angle); - + /// return the transpose of this matrix const Axis transpose() const; - + private: Vector3f axis_vector[3]; }; |