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-03-02 12:23:48 +0000
committerStijn Buys <ingar@osirion.org>2008-03-02 12:23:48 +0000
commit81787e9004377016236865e95b95707ed6cf1d0b (patch)
treeb8a7bd0d51f97848ad98ec8c8f5e424de910df32 /src/math/vector3f.cc
parent1d45d8ecb4633f07a0ff163255dbedc3c3a72ac8 (diff)
initial (buggy) support for .map models
Diffstat (limited to 'src/math/vector3f.cc')
-rw-r--r--src/math/vector3f.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/math/vector3f.cc b/src/math/vector3f.cc
index ddf46af..371ada1 100644
--- a/src/math/vector3f.cc
+++ b/src/math/vector3f.cc
@@ -141,15 +141,6 @@ Vector3f operator*(float scalar, const Vector3f& vector)
return vector * scalar;
}
-Vector3f crossproduct(const Vector3f& first, const Vector3f& second)
-{
- float x = first[1]*second[2] - first[2]*second[1];
- float y = first[2]*second[0] - first[0]*second[2];
- float z = first[0]*second[1] - first[1]*second[0];
-
- return(Vector3f(x,y,z));
-}
-
std::ostream &operator<<(std::ostream & os, Vector3f const & vector)
{
os << vector[0] << " " << vector[1] << " " << vector[2];
@@ -163,6 +154,15 @@ std::istream &operator>>(std::istream & is, Vector3f & vector)
return is;
}
+const Vector3f crossproduct(Vector3f const & first, Vector3f const& second)
+{
+ float x = first[1]*second[2] - first[2]*second[1];
+ float y = first[2]*second[0] - first[0]*second[2];
+ float z = first[0]*second[1] - first[1]*second[0];
+
+ return(Vector3f(x,y,z));
+}
+
float dotproduct(const Vector3f& first, const Vector3f& second)
{
float r = 0;
@@ -170,5 +170,4 @@ float dotproduct(const Vector3f& first, const Vector3f& second)
r += first[i] * second[i];
return (r);
}
-
} // namespace math