Skip to content

Commit

Permalink
working on proper recursive 3D poses - it's been a hack so far
Browse files Browse the repository at this point in the history
  • Loading branch information
rtv committed Jul 5, 2008
1 parent 7c871fb commit 88919f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
9 changes: 6 additions & 3 deletions libstage/model.cc
Expand Up @@ -176,17 +176,17 @@ StgModel::StgModel( StgWorld* world,
world->AddModel( this );

bzero( &pose, sizeof(pose));
if( parent )
pose.z = parent->geom.size.z;
if( parent) pose.z += parent->geom.size.z;

bzero( &global_pose, sizeof(global_pose));
this->gpose_dirty = true;

this->trail = g_array_new( false, false, sizeof(stg_trail_item_t) );

this->data_fresh = false;
this->disabled = false;
this->blocks = NULL;
this->rebuild_displaylist = true;
this->gpose_dirty = true;
this->say_string = NULL;
this->subs = 0;
this->stall = false;
Expand Down Expand Up @@ -1268,6 +1268,9 @@ void StgModel::SetPose( stg_pose_t pose )
//PRINT_DEBUG5( "%s.SetPose(%.2f %.2f %.2f %.2f)",
// this->token, pose->x, pose->y, pose->z, pose->a );

if( parent )
pose.z += parent->geom.size.z;

// if the pose has changed, we need to do some work
if( memcmp( &this->pose, &pose, sizeof(stg_pose_t) ) != 0 )
{
Expand Down
10 changes: 5 additions & 5 deletions libstage/worldgui.cc
Expand Up @@ -125,10 +125,10 @@ static const char* AboutText =
"Part of the Player Project\n"
"http://playerstage.org\n"
"\n"
"Copyright 2000-2008 Richard Vaughan, Brian Gerkey, "
"Andrew Howard, Reed Hedges, Toby Collett, "
"Alex Couture-Beil, Jeremy Asher "
"and contributors";
"Copyright 2000-2008 Richard Vaughan,\n"
" Brian Gerkey, Andrew Howard, Reed Hedges, \n"
" Toby Collett, Alex Couture-Beil, Jeremy Asher \n"
" and contributors";

StgWorldGui::StgWorldGui(int W,int H,const char* L) :
Fl_Window(W,H,L )
Expand Down Expand Up @@ -544,7 +544,7 @@ void StgWorldGui::helpAboutCb( Fl_Widget* w, void* p )
tbuf->append( "-" );
tbuf->append( VERSION );
tbuf->append( AboutText );
textDisplay->wrap_mode( true, 50 );
//textDisplay->wrap_mode( true, 50 );
textDisplay->buffer( tbuf );

Fl_Return_Button* button;
Expand Down
2 changes: 1 addition & 1 deletion worlds/swarmbenchmark/cave.world
Expand Up @@ -33,7 +33,7 @@ define rob pioneer2dx
#define rob fancypioneer2dx # alternative with more complex polygons
(

sicklaser( pose [ 0.040 0.000 0.000 ] samples 180 )
sicklaser( )#pose4 [ 0.040 0.000 0.01 0.000 ] samples 180 )
# alternative laser with more complex polygons
# fancysicklaser( pose [ 0.040 0.000 0.000 ] samples 180 )

Expand Down

0 comments on commit 88919f9

Please sign in to comment.