From: <axl...@us...> - 2009-07-25 18:58:50
|
Revision: 436 http://hgengine.svn.sourceforge.net/hgengine/?rev=436&view=rev Author: axlecrusher Date: 2009-07-25 18:58:42 +0000 (Sat, 25 Jul 2009) Log Message: ----------- camera and frustum go into viewmatrix Modified Paths: -------------- Mercury2/src/Camera.cpp Mercury2/src/Viewport.cpp Modified: Mercury2/src/Camera.cpp =================================================================== --- Mercury2/src/Camera.cpp 2009-07-25 18:33:03 UTC (rev 435) +++ Mercury2/src/Camera.cpp 2009-07-25 18:58:42 UTC (rev 436) @@ -32,7 +32,8 @@ r.toMatrix4( local ); local.Translate( GetPosition()*-1 ); - m_globalMatrix = local * parent; //fold in any parent transform in reverse (correct rotation) +// m_globalMatrix = local * parent; //fold in any parent transform in reverse (correct rotation) + VIEWMATRIX = local * parent; //compute camera position in world space (broken if camera is in transform node) local = MercuryMatrix::Identity(); Modified: Mercury2/src/Viewport.cpp =================================================================== --- Mercury2/src/Viewport.cpp 2009-07-25 18:33:03 UTC (rev 435) +++ Mercury2/src/Viewport.cpp 2009-07-25 18:58:42 UTC (rev 436) @@ -31,7 +31,7 @@ // EYE = MercuryVertex(0,0,0,1); //wrong // EYE = matrix * EYE; - VIEWMATRIX = matrix; +// VIEWMATRIX = matrix; //the camera sets this (the calculation here is wrong) // MercuryVector z(0,0,-1); //look down Z by default This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |