Revision: 8319
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8319&view=rev
Author:   rtv
Date:     2009-10-21 04:28:46 +0000 (Wed, 21 Oct 2009)

Log Message:
-----------
release 3.2.1

Modified Paths:
--------------
    code/stage/trunk/libstage/CMakeLists.txt
    code/stage/trunk/libstage/stage.hh

Removed Paths:
-------------
    code/stage/trunk/libstage/test.cc

Modified: code/stage/trunk/libstage/CMakeLists.txt
===================================================================
--- code/stage/trunk/libstage/CMakeLists.txt    2009-10-20 21:43:52 UTC (rev 
8318)
+++ code/stage/trunk/libstage/CMakeLists.txt    2009-10-21 04:28:46 UTC (rev 
8319)
@@ -72,14 +72,6 @@
 
 target_link_libraries( stagebinary stage )
 
-set( stagetestSrcs test.cc )
-
-add_executable( stagetest ${stagetestSrcs} )
-target_link_libraries( stagetest stage )
-set_target_properties( stagetest PROPERTIES LINK_FLAGS "${FLTK_LDFLAGS}" )
-set_source_files_properties( ${stagetestSrcs} PROPERTIES COMPILE_FLAGS 
"${FLTK_CFLAGS}" )
-
-
 INSTALL(TARGETS stagebinary stage
        RUNTIME DESTINATION bin
        LIBRARY DESTINATION lib
@@ -88,4 +80,3 @@
 INSTALL(FILES stage.hh 
         DESTINATION include/${PROJECT_NAME}-${APIVERSION})
 
-ADD_TEST( test1 ${EXECUTABLE_OUTPUT_PATH}stagetest )

Modified: code/stage/trunk/libstage/stage.hh
===================================================================
--- code/stage/trunk/libstage/stage.hh  2009-10-20 21:43:52 UTC (rev 8318)
+++ code/stage/trunk/libstage/stage.hh  2009-10-21 04:28:46 UTC (rev 8319)
@@ -37,7 +37,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <libgen.h>
-//#include <string.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/time.h>
 #include <pthread.h> 

Deleted: code/stage/trunk/libstage/test.cc
===================================================================
--- code/stage/trunk/libstage/test.cc   2009-10-20 21:43:52 UTC (rev 8318)
+++ code/stage/trunk/libstage/test.cc   2009-10-21 04:28:46 UTC (rev 8319)
@@ -1,213 +0,0 @@
-#include "stage.hh"
-
-/* libstage test program */
-
-using namespace Stg;
-
-const double epsilon = 1e-5;
-
-void interact( WorldGui* wg )
-{
-  //for( int i=0; i<100; i++ )
-  // wg->Cycle();
-
-  wg->Update();
-}
-
-void test( const char* str, double a, double b )
-{
-  if( fabs(a-b) > epsilon )
-        printf( "FAIL %s expected %.3f saw %.3f\n", str, a, b );  
-}
-
-void test( const char* str, Pose a, Pose b )
-{
-  if( fabs(a.x-b.x) > epsilon )
-        printf( "POSE FAIL %s expected pose.x %.3f saw pose.x %.3f\n", str, 
a.x, b.x );  
-  if( fabs(a.y-b.y) > epsilon )
-        printf( "POSE FAIL %s expected pose.y %.3f saw pose.y %.3f\n", str, 
a.y, b.y );  
-  if( fabs(a.z-b.z) > epsilon )
-        printf( "POSE FAIL %s expected pose.z %.3f saw pose.z %.3f\n", str, 
a.z, b.z );  
-  if( fabs(a.a-b.a) > epsilon )
-        printf( "POSE FAIL %s expected pose.a %.3f saw pose.a %.3f\n", str, 
a.a, b.a );  
-}
-
-int main( int argc,  char* argv[] )
-{
-  Init( &argc, &argv);
-
-  WorldGui world( 400,400, "Test" );
-  world.Start();
-
-  Geom geom;
-  bzero( &geom, sizeof(geom) );
-
-  if( 1 )
-  {
-        Model mod( &world );
-        
-        for( stg_meters_t x=0; x<5; x+=0.1 )    
-               {
-                 Pose pose( x, 0, 0, 0 );
-                 mod.SetPose( pose );                  
-                 test( "translate X",  mod.GetPose(), pose );          
-                 interact( &world );
-               }
-        
-        for( stg_meters_t y=0; y<5; y+=0.1 )    
-               {
-                 Pose pose( 0, y, 0, 0 );
-                 mod.SetPose( pose );                  
-                 test( "translate Y",  mod.GetPose(), pose );          
-                 interact( &world );
-               }
-        
-        for( stg_meters_t z=0; z<5; z+=0.1 )    
-               {
-               Pose pose( 0, 0, z, 0 );
-               mod.SetPose( pose );            
-               test( "translate Z",  mod.GetPose(), pose );            
-               interact( &world );
-               }
-        
-        for( stg_radians_t a=0; a<dtor(360); a+=dtor(2) )       
-        {
-               Pose pose( 0, 0, 0, a );
-               mod.SetPose( pose );              
-               pose = mod.GetPose();           
-               test( "rotate",  mod.GetPose(), pose );
-               interact( &world );
-        }
-
-  for( stg_radians_t a=0; a<dtor(360); a+=dtor(2) )     
-        {
-               Pose pose( cos(a), sin(a), 0, 0 );
-               mod.SetPose( pose );            
-               test( "translate X&Y",  mod.GetPose(), pose );          
-               interact( &world );
-        }
-
-  mod.SetPose( Pose( 0,0,0,0 ));               
-
-  for( stg_meters_t x=0.01; x<5; x+=0.1 )       
-        {
-               geom.size.x = x;
-               geom.size.y = 1.0;
-               geom.size.z = 1.0;
-               
-               mod.SetGeom( geom );
-               interact( &world );
-        }
-  
-  for( stg_meters_t y=0.01; y<5; y+=0.1 )       
-        {
-               geom.size.x = 5;
-               geom.size.y = y;
-               geom.size.z = 1.0;
-               
-               mod.SetGeom( geom );
-               interact( &world );
-        }
-
-  for( stg_meters_t z=0.01; z<5; z+=0.1 )       
-        {
-               geom.size.x = 1;
-               geom.size.y = 1;
-               geom.size.z = z;
-               
-               mod.SetGeom( geom );
-               interact( &world );
-        }
-  
-  geom.size.x = 0.5;
-  geom.size.y = 0.5;
-  geom.size.z = 0.5;
-  
-  mod.SetGeom( geom );
-  
-  } // mod goes out of scope
-  
-
- #define POP 10
-  Velocity v( 0.0,0.0,0.0,0.0 );
-                 
-  Model* m[POP]; 
-  for( int i=0; i<POP; i++ )
-        {
-               m[i] = world.CreateModel( NULL, "laser" );
-
-               //m[i]->Say( "Hello" );
-               m[i]->Subscribe();
-               //m[i]->SetGeom( geom );
-               
-               //m[i]->SetPose( Pose::Random( -5,5, -5,5 ) );          
-               m[i]->PlaceInFreeSpace( 0, 10, 0, 10 );
-               m[i]->SetColor( Color::RandomColor() );
-
-               v.x = drand48() / 10.0;
-               v.y = drand48() / 10.0;
-               v.z = drand48() / 10.0;
-               v.a = drand48() / 3.0;
-
-               m[i]->SetVelocity( v );
-        }
-
-
- //  Pose o = { 1, 2, 0, 0 };
-//   Pose p = {0,0,0,0};
-
-//   m[0]->SetPose( o );
-
-//   Pose q = m[0]->LocalToGlobal( p );
-
-//   stg_print_pose( &o );
-//   stg_print_pose( &q );
-
-//   assert( fabs( q.x - o.x ) < 0.0001 );
-//   assert( fabs( q.y - o.y ) < 0.0001 );
-//   assert( fabs( q.z - o.z ) < 0.0001 );
-//   assert( fabs( q.a - o.a ) < 0.0001 );
-
-//   m[1]->SetPose( new_pose( 0,0,0,0 ));
-
-  //  geom.size.x = 0.2;
-  //geom.size.y = 0.2;
-  //geom.size.z = 0.2;
-
-//   for( int i=0; i<POP; i++ )
-//      {
-//             Model* top = new Model( &world, m[i] );
-//             top->SetGeom( geom );
-//             //top->SetPose( new_pose( 0,0,0,0 ) );
-//             //m[i]->SetPose( sgtg_pose_t::Random( -10,10, -10,10 ) );       
        
-//             //m[i]->PlaceInFreeSpace( -10, 10, -10, 10 );
-//             top->SetColor( lrand48() | 0xFF000000 );
-               
-//             //interact( &world );
-//      }
-
- //   for( int i=0; i<POP; i++ )
-//      {
-// //                  m[i]->PlaceInFreeSpace( -10, 10, -10, 10 );
-//             //m[i]->SetColor( 0xFF00FF00 );
-
-
-//             Velocity v = {0,0,0,0.1};
-               
-//             m[i]->SetVelocity( v );
-                                                               
-//             //interact( &world );
-//      }
-  
-//   for( int i=0; i<POP; i++ )
-//      {
-//             delete m[i];
-//             interact( &world );
-//      }
-  
-
-  for( unsigned long i=0; i<1000; i++ )
-        world.Update();
-
-  return 0; // success
-}


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to