From 668026125ae19b9bd800004ae9ec0510f20753ad Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 6 Aug 2008 14:40:36 +0000 Subject: improved target drawing --- src/math/axis.cc | 8 +++----- src/math/axis.h | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/math') diff --git a/src/math/axis.cc b/src/math/axis.cc index aa35d92..e6442eb 100644 --- a/src/math/axis.cc +++ b/src/math/axis.cc @@ -91,17 +91,15 @@ void Axis::rotate(Vector3f const &normal, float angle) } } -/* -Axis const Axis::transpose() +Axis Axis::transpose() const { - Axis` t; + Axis t; for (size_t i = 0; i < 3; i++) for (size_t j = 0; j < 3; j++) - t.axis_vector[j][i] = axis_vector[j][i]; + t.axis_vector[i][j] = axis_vector[j][i]; return t; } -*/ // write an axis to a std::ostream std::ostream &operator<<(std::ostream & os, Axis const & axis) diff --git a/src/math/axis.h b/src/math/axis.h index 1422564..1396521 100644 --- a/src/math/axis.h +++ b/src/math/axis.h @@ -51,6 +51,9 @@ public: /// rotation about an arbitrary axis void rotate(Vector3f const &normal, float angle); + /// return the transpose of this matrix + Axis transpose() const; + private: Vector3f axis_vector[3]; }; -- cgit v1.2.3