|
From: <axl...@us...> - 2009-03-02 19:41:42
|
Revision: 159
http://hgengine.svn.sourceforge.net/hgengine/?rev=159&view=rev
Author: axlecrusher
Date: 2009-03-02 19:41:32 +0000 (Mon, 02 Mar 2009)
Log Message:
-----------
update
Modified Paths:
--------------
Mercury2/src/MercuryVertex.cpp
Mercury2/src/MercuryVertex.h
Modified: Mercury2/src/MercuryVertex.cpp
===================================================================
--- Mercury2/src/MercuryVertex.cpp 2009-03-02 19:35:20 UTC (rev 158)
+++ Mercury2/src/MercuryVertex.cpp 2009-03-02 19:41:32 UTC (rev 159)
@@ -17,7 +17,7 @@
MercuryVertex::MercuryVertex( const float * in )
{
for (unsigned int i = 0; i < 3; ++i)
- m_xyz[i] *= in[i];
+ m_xyz[i] = in[i];
}
void MercuryVertex::NormalizeSelf()
@@ -86,7 +86,18 @@
return ret;
}
+float MercuryVertex::DotProduct(const MercuryVertex& rhs) const
+{
+ return (m_xyz[0]*rhs.m_xyz[0]+m_xyz[1]*rhs.m_xyz[1]+m_xyz[2]*rhs.m_xyz[2]);
+}
+void MercuryVertex::Print() const
+{
+ printf("%f %f %f\n", m_xyz[0], m_xyz[1], m_xyz[2]);
+}
+
+
+
/****************************************************************************
* Copyright (C) 2009 by Joshua Allen *
* *
Modified: Mercury2/src/MercuryVertex.h
===================================================================
--- Mercury2/src/MercuryVertex.h 2009-03-02 19:35:20 UTC (rev 158)
+++ Mercury2/src/MercuryVertex.h 2009-03-02 19:41:32 UTC (rev 159)
@@ -61,6 +61,9 @@
///Obtain the cross product (*this) x p
MercuryVertex CrossProduct(const MercuryVertex& p) const;
+
+ float DotProduct(const MercuryVertex& rhs) const;
+ void Print() const;
float m_xyz[3];
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|