[Opal-commits] opal/src BlueprintManager.cpp,1.36,1.37 RaycastSensorData.h,1.4,1.5 ShapeData.h,1.7,1
Status: Inactive
Brought to you by:
tylerstreeter
|
From: tylerstreeter <tyl...@us...> - 2005-03-25 02:44:30
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28529/src Modified Files: BlueprintManager.cpp RaycastSensorData.h ShapeData.h Simulator.cpp Simulator.h Log Message: made the RaycastSensor and VolumeSensor use contact groups Index: RaycastSensorData.h =================================================================== RCS file: /cvsroot/opal/opal/src/RaycastSensorData.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RaycastSensorData.h 23 Mar 2005 20:24:47 -0000 1.4 --- RaycastSensorData.h 25 Mar 2005 02:44:19 -0000 1.5 *************** *** 79,83 **** /// the ray collides with. If this exceeds 31, bad things /// might happen since there are only 32 groups. ! unsigned long int contactGroup; protected: --- 79,83 ---- /// the ray collides with. If this exceeds 31, bad things /// might happen since there are only 32 groups. ! unsigned int contactGroup; protected: Index: Simulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** Simulator.cpp 23 Mar 2005 07:54:34 -0000 1.51 --- Simulator.cpp 25 Mar 2005 02:44:19 -0000 1.52 *************** *** 711,714 **** --- 711,733 ---- } + bool Simulator::groupsMakeContacts(unsigned int group0, + unsigned int group1) + { + // We only need to check for "one side" of the contact groups + // here because the groups are always setup both ways (i.e. + // the interaction between object 0's contact group and + // object 1's contact group is always symmetric). + + unsigned long int group1Bit = 1 << group1; + if (internal_getContactGroupFlags(group0) & group1Bit) + { + return true; + } + else + { + return false; + } + } + unsigned long int Simulator::internal_getContactGroupFlags( unsigned int groupNum)const Index: BlueprintManager.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/BlueprintManager.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** BlueprintManager.cpp 23 Mar 2005 20:24:34 -0000 1.36 --- BlueprintManager.cpp 25 Mar 2005 02:44:19 -0000 1.37 *************** *** 1340,1344 **** { data->contactGroup = ! (unsigned long int)getAttributeReal( paramNodePtr, "value"); } --- 1340,1344 ---- { data->contactGroup = ! (unsigned int)getAttributeReal( paramNodePtr, "value"); } *************** *** 1468,1472 **** { data->contactGroup = ! (unsigned long int)getAttributeReal( contactGroupNodePtr, "value"); } --- 1468,1472 ---- { data->contactGroup = ! (unsigned int)getAttributeReal( contactGroupNodePtr, "value"); } Index: ShapeData.h =================================================================== RCS file: /cvsroot/opal/opal/src/ShapeData.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ShapeData.h 11 Mar 2005 05:31:56 -0000 1.7 --- ShapeData.h 25 Mar 2005 02:44:19 -0000 1.8 *************** *** 77,81 **** /// The Shape's contact group. If this exceeds 31, bad things /// might happen since there are only 32 groups. ! unsigned long int contactGroup; protected: --- 77,81 ---- /// The Shape's contact group. If this exceeds 31, bad things /// might happen since there are only 32 groups. ! unsigned int contactGroup; protected: Index: Simulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.h,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** Simulator.h 23 Mar 2005 20:24:47 -0000 1.90 --- Simulator.h 25 Mar 2005 02:44:20 -0000 1.91 *************** *** 157,160 **** --- 157,165 ---- bool makeContacts); + /// Returns true if the two contact groups are setup to generate + /// contacts when they collide. + virtual bool OPAL_CALL groupsMakeContacts(unsigned int group0, + unsigned int group1); + // SOLIDS *************** *** 245,249 **** virtual const RaycastResult& OPAL_CALL internal_fireRay( const Rayr& r, real length, const Solid* attachedSolid, ! unsigned long int rayContactGroup) = 0; /// Helper function used for volume queries. --- 250,254 ---- virtual const RaycastResult& OPAL_CALL internal_fireRay( const Rayr& r, real length, const Solid* attachedSolid, ! unsigned int rayContactGroup) = 0; /// Helper function used for volume queries. |