Revision: 6793
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6793&view=rev
Author:   jeremy_asher
Date:     2008-07-07 15:47:14 -0700 (Mon, 07 Jul 2008)

Log Message:
-----------
Fixed orthocam also not loading defaults correctly

Modified Paths:
--------------
    code/stage/trunk/libstage/camera.cc
    code/stage/trunk/worlds/fasr.world

Modified: code/stage/trunk/libstage/camera.cc
===================================================================
--- code/stage/trunk/libstage/camera.cc 2008-07-07 22:38:56 UTC (rev 6792)
+++ code/stage/trunk/libstage/camera.cc 2008-07-07 22:47:14 UTC (rev 6793)
@@ -87,10 +87,10 @@
 }
 
 void StgPerspectiveCamera::Load( Worldfile* wf, int sec ) {
-       float x = wf->ReadTupleFloat(sec, "pcam_loc", 0, this->x() );
-       float y = wf->ReadTupleFloat(sec, "pcam_loc", 1, this->y() );
-       float z = wf->ReadTupleFloat(sec, "pcam_loc", 2, this->z() );
-       setPose( x, y, z );
+       float x_pos = wf->ReadTupleFloat(sec, "pcam_loc", 0, x() );
+       float y_pos = wf->ReadTupleFloat(sec, "pcam_loc", 1, y() );
+       float z_pos = wf->ReadTupleFloat(sec, "pcam_loc", 2, z() );
+       setPose( x_pos, y_pos, z_pos );
        setPitch( wf->ReadTupleFloat( sec, "pcam_angle", 0, pitch() ) );
        setYaw( wf->ReadTupleFloat( sec, "pcam_angle", 1, yaw() ) );
 }
@@ -206,11 +206,11 @@
 }
 
 void StgOrthoCamera::Load( Worldfile* wf, int sec ) {
-       float x = wf->ReadTupleFloat(sec, "center", 0, 0 );
-       float y = wf->ReadTupleFloat(sec, "center", 1, 0 );
-       setPose( x, y );
-       setPitch( wf->ReadTupleFloat( sec, "rotate", 0, 0 ) );
-       setYaw( wf->ReadTupleFloat( sec, "rotate", 1, 0 ) );
+       float x_pos = wf->ReadTupleFloat(sec, "center", 0, x() );
+       float y_pos = wf->ReadTupleFloat(sec, "center", 1, y() );
+       setPose( x_pos, y_pos );
+       setPitch( wf->ReadTupleFloat( sec, "rotate", 0, pitch() ) );
+       setYaw( wf->ReadTupleFloat( sec, "rotate", 1, yaw() ) );
        setScale( wf->ReadFloat(sec, "scale", scale() ) );
 }
 

Modified: code/stage/trunk/worlds/fasr.world
===================================================================
--- code/stage/trunk/worlds/fasr.world  2008-07-07 22:38:56 UTC (rev 6792)
+++ code/stage/trunk/worlds/fasr.world  2008-07-07 22:47:14 UTC (rev 6793)
@@ -27,7 +27,7 @@
   rotate [ 0 0 ]
   scale 32.344 
 
-  pcam_loc [ 0 -4.000 2.000 ]
+  pcam_loc [ 0 -4 2 ]
   pcam_angle [ 70.000 0 ]
   pcam_on 0
   


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to