Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-01 12:41:31 +0000
committerStijn Buys <ingar@osirion.org>2008-05-01 12:41:31 +0000
commitf5266b403c50cb2b6d712e6d8f41b62ad2433efb (patch)
treefbd1cbafbb6d43b2fd5838cff8ce85df245bac86 /src/math/axis.cc
parente2b18c44a6ae38bb84f717c86988a80da137c3e7 (diff)
lights
Diffstat (limited to 'src/math/axis.cc')
-rw-r--r--src/math/axis.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/math/axis.cc b/src/math/axis.cc
index 6f9710b..4d752bf 100644
--- a/src/math/axis.cc
+++ b/src/math/axis.cc
@@ -89,7 +89,9 @@ Axis const Axis::transpose()
// write an axis to a std::ostream
std::ostream &operator<<(std::ostream & os, Axis const & axis)
{
- os << axis.forward() << " " << axis.left() << " " << axis.up();
+ os << axis.forward() << " ";
+ os << axis.left() << " ";
+ os << axis.up();
return os;
}
@@ -102,4 +104,10 @@ std::istream &operator>>(std::istream & is, Axis & axis)
return is;
}
+// local-to-global coordinates
+Vector3f operator*(Axis const &axis, Vector3f const &vector)
+{
+ return (Vector3f(vector[0] * axis[0] + vector[1] * axis[1] + vector[2] * axis[2]));
+}
+
}