|
From: <axl...@us...> - 2009-05-17 12:59:56
|
Revision: 266
http://hgengine.svn.sourceforge.net/hgengine/?rev=266&view=rev
Author: axlecrusher
Date: 2009-05-17 12:59:54 +0000 (Sun, 17 May 2009)
Log Message:
-----------
debugging
Modified Paths:
--------------
Mercury2/src/MercuryVertex.cpp
Mercury2/src/MercuryVertex.h
Mercury2/src/Viewport.cpp
Modified: Mercury2/src/MercuryVertex.cpp
===================================================================
--- Mercury2/src/MercuryVertex.cpp 2009-05-17 12:48:57 UTC (rev 265)
+++ Mercury2/src/MercuryVertex.cpp 2009-05-17 12:59:54 UTC (rev 266)
@@ -105,9 +105,9 @@
return dp;
}
-void MercuryVertex::Print() const
+void MercuryVertex::Print(const MString& s) const
{
- printf("Vertex: %f %f %f %f\n", (*this)[0], (*this)[1], (*this)[2], (*this)[3]);
+ printf("%s: %f %f %f %f\n", s.c_str(), (*this)[0], (*this)[1], (*this)[2], (*this)[3]);
}
Modified: Mercury2/src/MercuryVertex.h
===================================================================
--- Mercury2/src/MercuryVertex.h 2009-05-17 12:48:57 UTC (rev 265)
+++ Mercury2/src/MercuryVertex.h 2009-05-17 12:59:54 UTC (rev 266)
@@ -2,6 +2,7 @@
#define MERCURYVECTOR_H
#include <MercuryMath.h>
+#include <MercuryString.h>
#ifndef WIN32
#define __inline__ __inline__ __attribute__((always_inline))
@@ -77,7 +78,7 @@
float DotProduct(const MercuryVertex& rhs) const;
MercuryVertex DotProduct3(const MercuryVertex& rhs1, const MercuryVertex& rhs2, const MercuryVertex& rhs3) const;
- void Print() const;
+ void Print(const MString& s = "Vertex") const;
// float (*this)[3];
FloatRow m_xyzw;
Modified: Mercury2/src/Viewport.cpp
===================================================================
--- Mercury2/src/Viewport.cpp 2009-05-17 12:48:57 UTC (rev 265)
+++ Mercury2/src/Viewport.cpp 2009-05-17 12:59:54 UTC (rev 266)
@@ -32,18 +32,20 @@
//compute the position of the eye
EYE = MercuryVertex(0,0,0,1);
EYE = matrix * EYE;
- EYE *= -1;
-
-// VIEWMATRIX = MercuryMatrix::Identity();
-// VIEWMATRIX.Scale(1,1,1);
-// VIEWMATRIX.Translate( EYE[0], EYE[1], EYE[2] );
-// VIEWMATRIX.RotateXYZ( matrix[0][0], matrix[1][1], matrix[2][2] );
+
VIEWMATRIX = matrix;
+
+ MercuryVector z(0,0,1);
+ LOOKAT = (matrix * z).Normalize();
+
// matrix.Print();
+ EYE.Print("Eye");
+ LOOKAT.Print("Lookat");
+ printf("******\n");
+// LOOKAT = (matrix * l).Normalize();
+// LOOKAT.
+// LOOKAT.Print();
- MercuryVector l(0,0,1);
- LOOKAT = (matrix * l).Normalize();
-
//Sets up the clipping frustum
m_frustum.LookAt(EYE, LOOKAT, MercuryVertex(0,1,0));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|