Revision: 7552
http://playerstage.svn.sourceforge.net/playerstage/?rev=7552&view=rev
Author: rtv
Date: 2009-03-27 23:37:32 +0000 (Fri, 27 Mar 2009)
Log Message:
-----------
fixed crash bug when a saystring was present without a powerpack
Modified Paths:
--------------
code/stage/trunk/libstage/model_draw.cc
code/stage/trunk/libstage/model_position.cc
code/stage/trunk/libstage/stage.hh
code/stage/trunk/libstage/worldgui.cc
Modified: code/stage/trunk/libstage/model_draw.cc
===================================================================
--- code/stage/trunk/libstage/model_draw.cc 2009-03-27 16:15:13 UTC (rev
7551)
+++ code/stage/trunk/libstage/model_draw.cc 2009-03-27 23:37:32 UTC (rev
7552)
@@ -321,11 +321,7 @@
glRotatef( robotAngle - yaw, 0,0,1 );
glRotatef( -pitch, 1,0,0 );
-
- //if( ! parent )
- // glRectf( 0,0,1,1 );
-
- //if( power_pack->stored > 0.0 )
+ if( power_pack )
power_pack->Visualize( cam );
if( say_string )
@@ -339,8 +335,7 @@
glGetBooleanv( GL_CURRENT_RASTER_POSITION_VALID,
&valid );
if( valid )
- {
-
+ {
fl_font( FL_HELVETICA, 12 );
float w = gl_width( this->say_string ); //
scaled text width
float h = gl_height(); // scaled text height
Modified: code/stage/trunk/libstage/model_position.cc
===================================================================
--- code/stage/trunk/libstage/model_position.cc 2009-03-27 16:15:13 UTC (rev
7551)
+++ code/stage/trunk/libstage/model_position.cc 2009-03-27 23:37:32 UTC (rev
7552)
@@ -655,6 +655,8 @@
Gl::pose_inverse_shift( pose );
Gl::pose_shift( est_origin );
+ glTranslatef( 0,0, 0.02 );
+
// draw waypoints
for( unsigned int i=0; i < waypoint_count; i++ )
waypoints[i].Draw();
Modified: code/stage/trunk/libstage/stage.hh
===================================================================
--- code/stage/trunk/libstage/stage.hh 2009-03-27 16:15:13 UTC (rev 7551)
+++ code/stage/trunk/libstage/stage.hh 2009-03-27 23:37:32 UTC (rev 7552)
@@ -875,6 +875,8 @@
void LoadBlockGroup( Worldfile* wf, int entity, GHashTable* entitytable );
void LoadPuck( Worldfile* wf, int entity, GHashTable* entitytable );
+ virtual Model* RecentlySelectedModel(){ return NULL; }
+
SuperRegion* AddSuperRegion( const stg_point_int_t& coord );
SuperRegion* GetSuperRegion( const stg_point_int_t& coord );
SuperRegion* GetSuperRegionCached( const stg_point_int_t& coord);
@@ -1369,14 +1371,15 @@
WorldGui(int W,int H,const char*L=0);
~WorldGui();
- virtual bool Update();
-
+ virtual bool Update();
virtual void Load( const char* filename );
virtual void UnLoad();
virtual bool Save( const char* filename );
inline virtual bool IsGUI() { return true; }
+ virtual Model* RecentlySelectedModel();
+
void DrawBoundingBoxTree();
void Start(){ paused = false; };
@@ -1755,7 +1758,7 @@
static void DrawBlocks( gpointer dummykey,
Model*
mod,
void*
arg );
-
+
virtual void DrawPicker();
virtual void DataVisualize( Camera* cam );
Modified: code/stage/trunk/libstage/worldgui.cc
===================================================================
--- code/stage/trunk/libstage/worldgui.cc 2009-03-27 16:15:13 UTC (rev
7551)
+++ code/stage/trunk/libstage/worldgui.cc 2009-03-27 23:37:32 UTC (rev
7552)
@@ -878,3 +878,6 @@
void WorldGui::PopColor()
{ canvas->PopColor(); }
+
+Model* WorldGui::RecentlySelectedModel()
+{ return canvas->last_selection; }
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit