Revision: 6789 http://playerstage.svn.sourceforge.net/playerstage/?rev=6789&view=rev Author: alexcb Date: 2008-07-07 14:43:36 -0700 (Mon, 07 Jul 2008)
Log Message: ----------- fixed camera loading code to fall back on default values Modified Paths: -------------- code/stage/trunk/libstage/camera.cc Modified: code/stage/trunk/libstage/camera.cc =================================================================== --- code/stage/trunk/libstage/camera.cc 2008-07-07 21:26:06 UTC (rev 6788) +++ code/stage/trunk/libstage/camera.cc 2008-07-07 21:43:36 UTC (rev 6789) @@ -87,12 +87,12 @@ } void StgPerspectiveCamera::Load( Worldfile* wf, int sec ) { - float x = wf->ReadTupleFloat(sec, "pcam_loc", 0, 0 ); - float y = wf->ReadTupleFloat(sec, "pcam_loc", 1, 0 ); - float z = wf->ReadTupleFloat(sec, "pcam_loc", 2, 0 ); + 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 ); - setPitch( wf->ReadTupleFloat( sec, "pcam_angle", 0, 0 ) ); - setYaw( wf->ReadTupleFloat( sec, "pcam_angle", 1, 0 ) ); + setPitch( wf->ReadTupleFloat( sec, "pcam_angle", 0, pitch() ) ); + setYaw( wf->ReadTupleFloat( sec, "pcam_angle", 1, yaw() ) ); } void StgPerspectiveCamera::Save( Worldfile* wf, int sec ) { 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