Revision: 6760
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6760&view=rev
Author:   alexcb
Date:     2008-07-04 12:55:31 -0700 (Fri, 04 Jul 2008)

Log Message:
-----------
fixed drawing issue with laser and camera

Modified Paths:
--------------
    code/stage/trunk/libstage/model_camera.cc
    code/stage/trunk/libstage/model_laser.cc

Modified: code/stage/trunk/libstage/model_camera.cc
===================================================================
--- code/stage/trunk/libstage/model_camera.cc   2008-07-04 18:18:25 UTC (rev 
6759)
+++ code/stage/trunk/libstage/model_camera.cc   2008-07-04 19:55:31 UTC (rev 
6760)
@@ -237,16 +237,17 @@
 
 //TODO create lines outlining camera frustrum, then iterate over each depth 
measurement and create a square
 void StgModelCamera::DataVisualize( void )
-{
+{      
+       
        if( _frame_data == NULL || !showCameraData )
                return;
-
+       
        float w_fov = _camera.horizFov();
        float h_fov = _camera.vertFov();
-       
+
        float start_fov = w_fov / 2.0 + 180.0; //start at right
        float start_vert_fov = h_fov / 2.0 + 90.0; //start at top
-               
+
        int w = _width;
        int h = _height;
        float a_space = w_fov / w; //degrees between each sample
@@ -284,7 +285,6 @@
                _valid_vertexbuf_cache = true;
        }
        
-       glTranslatef( 0, 0, CAMERA_HEIGHT / 2.0 );
        glDisable( GL_CULL_FACE );
        glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
        //glBegin( GL_QUADS );

Modified: code/stage/trunk/libstage/model_laser.cc
===================================================================
--- code/stage/trunk/libstage/model_laser.cc    2008-07-04 18:18:25 UTC (rev 
6759)
+++ code/stage/trunk/libstage/model_laser.cc    2008-07-04 19:55:31 UTC (rev 
6760)
@@ -310,6 +310,8 @@
   if ( ! (showLaserData || showLaserStrikes) )
     return;
     
+       glPushMatrix();
+       
   // we only regenerate the list if there's new data
   if( data_dirty )
     {      
@@ -383,4 +385,5 @@
   
   glCallList( data_dl );
            
+       glPopMatrix();
 }


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
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to