Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-08-06 14:40:36 +0000
committerStijn Buys <ingar@osirion.org>2008-08-06 14:40:36 +0000
commit668026125ae19b9bd800004ae9ec0510f20753ad (patch)
tree27a8c540bd3ef68f2f5a0b653246adc4dd180a21 /src/math
parent18f21c931e6e071b6616a1c0a07026af9b185ad5 (diff)
improved target drawing
Diffstat (limited to 'src/math')
-rw-r--r--src/math/axis.cc8
-rw-r--r--src/math/axis.h3
2 files changed, 6 insertions, 5 deletions
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];
};