[Opal-commits] opal/src/ODE ODESimulator.cpp,1.103,1.104
Status: Inactive
Brought to you by:
tylerstreeter
|
From: tylerstreeter <tyl...@us...> - 2005-06-24 16:40:57
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27140/src/ODE Modified Files: ODESimulator.cpp Log Message: Added a compile-time flag OPAL_USE_DOUBLE which determines whether OPAL's reals are floats or doubles. Also added a run-time check when a physics engine-specific Simulator (e.g. ODESimulator) is created to make sure OPAL's reals are the same size as the physics engine's reals. Index: ODESimulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.cpp,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** ODESimulator.cpp 19 Jun 2005 17:09:13 -0000 1.103 --- ODESimulator.cpp 24 Jun 2005 16:40:49 -0000 1.104 *************** *** 33,36 **** --- 33,45 ---- OPAL_EXPORT_FUNCTION opal::Simulator* OPAL_CALL createSimulator() { + // Check to make to ODE's reals are the same size as OPAL's reals. + if (sizeof(real) != sizeof(dReal)) + { + OPAL_LOGGER("warning") << "The size of data types (OPAL) real " + << "and (ODE) dReal do not match. Make sure these " + << "libraries are built using the same floating point " + << "precision (float or double)." << std::endl; + } + return new opal::ODESimulator(); } |