Permalink
Browse files

cleaning up API

  • Loading branch information...
rtv committed Apr 17, 2012
1 parent 102e412 commit 1e01c9d1e090077185e4699cfe9672e24b3ce663
View
@@ -84,47 +84,37 @@ include_directories(
MESSAGE( STATUS "Checking for required libraries..." )
-SET( INDENT " * " )
-
find_package( JPEG REQUIRED )
-IF( JPEG_FOUND )
- #MESSAGE( STATUS ${INDENT} "JPEG_INCLUDE_DIR = ${JPEG_INCLUDE_DIR}" )
- #MESSAGE( STATUS ${INDENT} "JPEG_LIBRARIES = ${JPEG_LIBRARIES}" )
-ELSE( JPEG_FOUND )
- MESSAGE( ${INDENT} "JPEG library not detected" )
-ENDIF( JPEG_FOUND )
-
-find_package( PNG REQUIRED )
-IF( PNG_FOUND )
-# MESSAGE( STATUS ${INDENT} "PNG_INCLUDE_DIR = ${PNG_INCLUDE_DIR}" )
-# MESSAGE( STATUS ${INDENT} "PNG_LIBRARIES = ${PNG_LIBRARIES}" )
-ELSE( PNG_FOUND )
- MESSAGE( ${INDENT} "PNG library not detected" )
-ENDIF( PNG_FOUND )
-
-find_package( FLTK REQUIRED )
-IF( FLTK_FOUND )
-# MESSAGE( STATUS ${INDENT} "FLTK_LIBRARIES=${FLTK_LIBRARIES}" )
-# MESSAGE( STATUS ${INDENT} "FLTK_INCLUDE_DIR=${FLTK_INCLUDE_DIR}" )
-ELSE( FLTK_FOUND )
- MESSAGE( FATAL_ERROR "FLTK not found, aborting" )
-ENDIF( FLTK_FOUND )
+#find_package( PNG REQUIRED )
+# deal with missing OS X on Mountain Lion: do not commit
+SET( PNG_LIBRARIES /opt/X11/lib/libpng.dylib )
+SET( PNG_INCLUDE_DIR /opt/X11/include )
+
+find_package( FLTK REQUIRED )
find_package( OpenGL REQUIRED )
+
IF( NOT OPENGL_GLU_FOUND )
MESSAGE( FATAL_ERROR "OpenGL GLU not found, aborting" )
ENDIF( NOT OPENGL_GLU_FOUND )
-#MESSAGE( STATUS ${INDENT} "OpenGL GLU found at ${OPENGL_INCLUDE_DIR}" )
-#MESSAGE( STATUS " OPENGL_INCLUDE_DIR = ${OPENGL_INCLUDE_DIR}")
-#MESSAGE( STATUS " OPENGL_glu_LIBRARY = ${OPENGL_glu_LIBRARY}")
+SET( INDENT " * " )
+# MESSAGE( STATUS ${INDENT} "JPEG_INCLUDE_DIR = ${JPEG_INCLUDE_DIR}" )
+# MESSAGE( STATUS ${INDENT} "JPEG_LIBRARIES = ${JPEG_LIBRARIES}" )
+# MESSAGE( STATUS ${INDENT} "PNG_INCLUDE_DIR = ${PNG_INCLUDE_DIR}" )
+# MESSAGE( STATUS ${INDENT} "PNG_LIBRARIES = ${PNG_LIBRARIES}" )
+# MESSAGE( STATUS ${INDENT} "FLTK_LIBRARIES=${FLTK_LIBRARIES}" )
+# MESSAGE( STATUS ${INDENT} "FLTK_INCLUDE_DIR=${FLTK_INCLUDE_DIR}" )
+# MESSAGE( STATUS ${INDENT} "OpenGL GLU found at ${OPENGL_INCLUDE_DIR}" )
+# MESSAGE( STATUS " OPENGL_INCLUDE_DIR = ${OPENGL_INCLUDE_DIR}")
+# MESSAGE( STATUS " OPENGL_glu_LIBRARY = ${OPENGL_glu_LIBRARY}")
MESSAGE( STATUS "Checking for optional libraries..." )
# Player does not have a CMake package, but does provide pkgconfig info
include(FindPkgConfig)
-
+
pkg_search_module( PLAYER playercore>=2.1.0 )
IF( PLAYER_FOUND )
MESSAGE( STATUS ${INDENT} "Player version ${PLAYER_VERSION} detected at ${PLAYER_PREFIX}" )
View
@@ -712,7 +712,7 @@ class Robot
// ways since last time we planned
if( graphp == NULL ||
(graphp->GoodDirection( pose, 5.0, a_goal ) == 0) ||
- (goal->GetPose().Distance2D( cached_goal_pose ) > 0.5) )
+ (goal->GetPose().Distance( cached_goal_pose ) > 0.5) )
{
//printf( "%s replanning from (%.2f,%.2f) to %s at (%.2f,%.2f) in Work()\n",
// pos->Token(),
View
@@ -3,23 +3,24 @@ using namespace Stg;
unsigned int total = 0;
-// inspect the laser data and decide what to do
int Delivery( Model* mod, void* dummy )
{
- (void)dummy;
-
- total++;
-
- printf( "Delivery: %.2f %d %.2f %.2f\n",
- mod->GetWorld()->SimTimeNow() / 1e6,
- //mod->GetFlagCount(),
- total,
- // dynamic_cast<WorldGui*>(mod->GetWorld())->EnergyString().c_str() );
-
+ // satisfy the compiler
+ (void)dummy;
+
+ total++;
+
+ /**
+ printf( "Delivery: %.2f %d %.2f %.2f\n",
+ mod->GetWorld()->SimTimeNow() / 1e6,
+ //mod->GetFlagCount(),
+ total,
+// dynamic_cast<WorldGui*>(mod->GetWorld())->EnergyString().c_str() );
+
Stg::PowerPack::global_input / 1e3,
Stg::PowerPack::global_dissipated / 1e3 );
-
-
+ */
+
return 0; // run again
}
@@ -28,9 +29,8 @@ int Delivery( Model* mod, void* dummy )
// Stage calls this when the model starts up
extern "C" int Init( Model* mod )
{
- // mod->AddCallback( Model::CB_UPDATE, (model_callback_t)Update, NULL );
-
- mod->AddCallback( Model::CB_FLAGINCR, (model_callback_t)Delivery, NULL );
+ // attach callback to be called whenever a flag is added to the sink model
+ mod->AddCallback( Model::CB_FLAGINCR, (model_callback_t)Delivery, NULL );
mod->Subscribe();
return 0; //ok
}
View
@@ -20,7 +20,7 @@ Block::Block( BlockGroup* group,
rendered_cells()
{
assert( group );
- canonicalize_winding(this->pts);
+ //canonicalize_winding(this->pts);
}
/** A from-file constructor */
@@ -38,7 +38,6 @@ Block::Block( BlockGroup* group,
assert(entity);
Load( wf, entity );
- canonicalize_winding(this->pts);
}
Block::~Block()
Oops, something went wrong.

0 comments on commit 1e01c9d

Please sign in to comment.