dynamic.cc
Go to the documentation of this file.
00001 #include "stage.hh"
00002 using namespace Stg;
00003 
00004 
00005 // Stage calls this when the model starts up
00006 extern "C" int Init( Model* mod )
00007 {
00008   printf( "Creating 100 models" );
00009   
00010   for( int i=0; i<100; i++ )
00011          {
00012                 Model* child = mod->GetWorld()->CreateModel( mod, "model" );            
00013                 assert(child);
00014 
00015                 child->SetPose( Pose::Random( -1, 1, -1, 1 ) );
00016                 child->SetGeom( Geom( Pose(), Stg::Size( 0.1, 0.1, 0.1 ) ));
00017                 child->SetColor( Color(0,0,1,1) );
00018          }
00019   return 0; //ok
00020 }
00021 


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Thu Aug 27 2015 15:20:57