opal-commits Mailing List for Open Physics Abstraction Layer (Page 19)
Status: Inactive
Brought to you by:
tylerstreeter
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
(162) |
Mar
(134) |
Apr
(113) |
May
(13) |
Jun
(60) |
Jul
(18) |
Aug
(25) |
Sep
|
Oct
(2) |
Nov
(35) |
Dec
(76) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(3) |
Apr
(8) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(1) |
Mar
(12) |
Apr
(16) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
|
Dec
(3) |
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(15) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: tylerstreeter <tyl...@us...> - 2005-03-25 04:19:09
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17426 Modified Files: todo.txt Log Message: fixed stupid bug Index: todo.txt =================================================================== RCS file: /cvsroot/opal/opal/todo.txt,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** todo.txt 25 Mar 2005 02:44:21 -0000 1.60 --- todo.txt 25 Mar 2005 04:18:59 -0000 1.61 *************** *** 3,14 **** * incline/orientation sensor: measures current orientation relative to an initial orientation; returns 3 reals * add license notice to samples' source files - * make trimeshes work - For Version 0.4.0 ================= * search and replace existing assert() calls - fatal errors print a message and assert --- 3,17 ---- * incline/orientation sensor: measures current orientation relative to an initial orientation; returns 3 reals + - add example to sensors tutorial * add license notice to samples' source files For Version 0.4.0 ================= + * make trimeshes work + - test basic functionality + - add helper functions to make it easier to use + * search and replace existing assert() calls - fatal errors print a message and assert |
|
From: tylerstreeter <tyl...@us...> - 2005-03-25 04:19:09
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17426/src Modified Files: Joint.cpp Log Message: fixed stupid bug Index: Joint.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Joint.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Joint.cpp 23 Mar 2005 04:04:30 -0000 1.28 --- Joint.cpp 25 Mar 2005 04:18:59 -0000 1.29 *************** *** 69,73 **** void Joint::setContactsEnabled(bool e) { ! mData.contactsEnabled; } --- 69,73 ---- void Joint::setContactsEnabled(bool e) { ! mData.contactsEnabled = e; } |
|
From: tylerstreeter <tyl...@us...> - 2005-03-25 02:44:31
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28529/src/ODE Modified Files: ODESimulator.cpp ODESimulator.h Log Message: made the RaycastSensor and VolumeSensor use contact groups Index: ODESimulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.h,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** ODESimulator.h 23 Mar 2005 20:24:54 -0000 1.67 --- ODESimulator.h 25 Mar 2005 02:44:21 -0000 1.68 *************** *** 99,103 **** virtual const RaycastResult& OPAL_CALL internal_fireRay( const Rayr& r, real length, const Solid* attachedSolid, ! unsigned long int rayContactGroup); /// Helper function used for ray casting. --- 99,106 ---- virtual const RaycastResult& OPAL_CALL internal_fireRay( const Rayr& r, real length, const Solid* attachedSolid, ! unsigned int rayContactGroup); ! ! virtual const VolumeQueryResult& OPAL_CALL internal_queryVolume( ! const Solid* volume, const Solid* attachedSolid); /// Helper function used for ray casting. *************** *** 108,116 **** virtual void OPAL_CALL internal_addCollidedSolid(Solid* solid); ! virtual const VolumeQueryResult& OPAL_CALL internal_queryVolume( ! const Solid* volume, const Solid* attachedSolid); protected: - /// The ODE world ID used by this Simulator. dWorldID mWorldID; --- 111,118 ---- virtual void OPAL_CALL internal_addCollidedSolid(Solid* solid); ! /// Helper function used for ray casting. ! virtual unsigned int OPAL_CALL internal_getRayContactGroup(); protected: /// The ODE world ID used by this Simulator. dWorldID mWorldID; *************** *** 120,124 **** /// The ODE joint constraint group. ! dJointGroupID mContactGroupID; /// The type of constraint solver to use. --- 122,126 ---- /// The ODE joint constraint group. ! dJointGroupID mContactJointGroupID; /// The type of constraint solver to use. *************** *** 140,143 **** --- 142,149 ---- /// query doesn't collide with the attached Solid. const Solid* mSensorSolid; + + /// A temporary variable that lets rays to use contact groups. This + /// allows them to limit which Shapes they collide with. + unsigned int mRayContactGroup; private: }; Index: ODESimulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.cpp,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** ODESimulator.cpp 23 Mar 2005 20:24:48 -0000 1.93 --- ODESimulator.cpp 25 Mar 2005 02:44:20 -0000 1.94 *************** *** 54,58 **** // Create the ODE contact joint group. ! mContactGroupID = dJointGroupCreate(0); // Set the ODE global CFM value that will be used by all Joints --- 54,58 ---- // Create the ODE contact joint group. ! mContactJointGroupID = dJointGroupCreate(0); // Set the ODE global CFM value that will be used by all Joints *************** *** 78,81 **** --- 78,82 ---- // "mRaycastResult" is initialized in its own constructor. mSensorSolid = NULL; + mRayContactGroup = defaults::shape::contactGroup; } *************** *** 112,116 **** dSpaceID rootSpaceID = mRootSpaceID; dWorldID worldID = mWorldID; ! dJointGroupID contactGroupID = mContactGroupID; delete this; --- 113,117 ---- dSpaceID rootSpaceID = mRootSpaceID; dWorldID worldID = mWorldID; ! dJointGroupID contactJointGroupID = mContactJointGroupID; delete this; *************** *** 121,125 **** dSpaceDestroy(rootSpaceID); dWorldDestroy(worldID); ! dJointGroupDestroy(contactGroupID); dCloseODE(); } --- 122,126 ---- dSpaceDestroy(rootSpaceID); dWorldDestroy(worldID); ! dJointGroupDestroy(contactJointGroupID); dCloseODE(); } *************** *** 267,271 **** //Remove all joints from the contact group. ! dJointGroupEmpty(mContactGroupID); } --- 268,272 ---- //Remove all joints from the contact group. ! dJointGroupEmpty(mContactJointGroupID); } *************** *** 321,327 **** --- 322,334 ---- // because sometimes you might want to wake up a sleeping // Solid with a static Solid. + // 8. The two Solids' contact groups do not generate + // contacts when they collide AND neither Solid has a + // CollisionEventHandler. + // Get the geoms' ODE body IDs. dBodyID o0BodyID = dGeomGetBody(o0); dBodyID o1BodyID = dGeomGetBody(o1); + + // Check if both Solids are dynamic (i.e. have ODE bodies). bool bothHaveBodies = true; if (0 == o0BodyID || 0 == o1BodyID) *************** *** 330,333 **** --- 337,342 ---- } + // If the two Solids are connected by a common Joint, get + // a pointer to that Joint. Joint* commonJoint = NULL; if (bothHaveBodies && dAreConnectedExcluding(o0BodyID, *************** *** 339,342 **** --- 348,379 ---- } + // Get pointers to the geoms' GeomData structures. + GeomData* geomData0 = (GeomData*)dGeomGetData(o0); + GeomData* geomData1 = ((GeomData*)dGeomGetData(o1)); + + // Get pointers to the geoms' ShapeData structures. + const ShapeData* shape0 = geomData0->shape; + const ShapeData* shape1 = geomData1->shape; + + // Get a pointer to the ODESimulator. + ODESimulator* sim = (ODESimulator*)data; + + // Check if the two Solids' contact groups generate contacts + // when they collide. + bool makeContacts = sim->groupsMakeContacts( + shape0->contactGroup, shape1->contactGroup); + + // Get pointers to the geoms' Solids. + Solid* solid0 = geomData0->solid; + Solid* solid1 = geomData1->solid; + + // Get pointers to the two Solids' CollisionEventHandlers. + // These will be NULL if the Solids don't use + // CollisionEventHandlers. + CollisionEventHandler* handler0 = + solid0->getCollisionEventHandler(); + CollisionEventHandler* handler1 = + solid1->getCollisionEventHandler(); + if (//(0 == o0BodyID && 0 == o1BodyID) //case 1 //|| (o0BodyID == o1BodyID) //case 2 *************** *** 349,352 **** --- 386,390 ---- //|| (0 == o0BodyID && !dBodyIsEnabled(o1BodyID)) //case 6 //|| (0 == o1BodyID && !dBodyIsEnabled(o0BodyID)) //case 7 + || (!makeContacts && !(handler0 || handler1)) ) { *************** *** 354,359 **** } ! // Now actually test for collision between the two geoms. ! ODESimulator* sim = (ODESimulator*)data; dWorldID theWorldID = sim->internal_getWorldID(); dJointGroupID theJointGroupID = --- 392,397 ---- } ! // Now actually test for collision between the two geoms. ! // This is one of the more expensive operations. dWorldID theWorldID = sim->internal_getWorldID(); dJointGroupID theJointGroupID = *************** *** 371,403 **** } - dContact tempContact; - //bool generateContacts0 = true; // Default to true. - //bool generateContacts1 = true; // Default to true. - GeomData* geomData0 = (GeomData*)dGeomGetData(o0); - GeomData* geomData1 = ((GeomData*)dGeomGetData(o1)); - const ShapeData* shape0 = geomData0->shape; - const ShapeData* shape1 = geomData1->shape; - Solid* solid0 = geomData0->solid; - Solid* solid1 = geomData1->solid; - - // We only need to check for "one side" of the contact group - // 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). - bool makeContacts = false; - unsigned long int group1Bit = 1 << shape1->contactGroup; - if (sim->internal_getContactGroupFlags(shape0->contactGroup) - & group1Bit) - { - makeContacts = true; - } - // If at least one of the Solids has a CollisionEventHandler, // send it a CollisionEvent. - CollisionEventHandler* handler0 = - solid0->getCollisionEventHandler(); - CollisionEventHandler* handler1 = - solid1->getCollisionEventHandler(); - if (handler0 || handler1) { --- 409,414 ---- *************** *** 486,489 **** --- 497,501 ---- const Material* m1 = &(shape1->material); + dContact tempContact; tempContact.surface.mode = dContactBounce | dContactSoftERP;// | dContactSoftCFM; *************** *** 710,715 **** } - // Note: o0 should always be the main object (the geom to check against - // everything else). void internal_volumeCollisionCallback(void* data, dGeomID o0, dGeomID o1) --- 722,725 ---- *************** *** 725,735 **** // Colliding two geoms. ! dBodyID o0BodyID = dGeomGetBody(o0); ! dBodyID o1BodyID = dGeomGetBody(o1); ! bool bothHaveBodies = true; ! if (0 == o0BodyID || 0 == o1BodyID) ! { ! bothHaveBodies = false; ! } // don't do collision detection for the following case: --- 735,745 ---- // Colliding two geoms. ! //dBodyID o0BodyID = dGeomGetBody(o0); ! //dBodyID o1BodyID = dGeomGetBody(o1); ! //bool bothHaveBodies = true; ! //if (0 == o0BodyID || 0 == o1BodyID) ! //{ ! // bothHaveBodies = false; ! //} // don't do collision detection for the following case: *************** *** 743,747 **** //} ! //now actually test for collision between the two geoms dContactGeom contactArray[1]; int numContacts = dCollide(o0, o1, 1, contactArray, --- 753,778 ---- //} ! // Get a pointer to the ODESimulator. ! ODESimulator* sim = (ODESimulator*)data; ! ! // Get pointers to the two geoms' GeomData structure. ! GeomData* geomData0 = ((GeomData*)dGeomGetData(o0)); ! GeomData* geomData1 = ((GeomData*)dGeomGetData(o1)); ! ! // Get pointers to the geoms' ShapeData structures. ! const ShapeData* shape0 = geomData0->shape; ! const ShapeData* shape1 = geomData1->shape; ! ! // Check if the two Solids' contact groups generate contacts ! // when they collide. ! bool makeContacts = sim->groupsMakeContacts( ! shape0->contactGroup, shape1->contactGroup); ! if (!makeContacts) ! { ! return; ! } ! ! // Now actually test for collision between the two geoms. ! // This is one of the more expensive operations. dContactGeom contactArray[1]; int numContacts = dCollide(o0, o1, 1, contactArray, *************** *** 754,767 **** else { ! //these two geoms must be intersecting ! ODESimulator* sim = (ODESimulator*)data; ! // TODO: not sure if we can know that o1 is the volume ! // object, so we'll ! // just call this twice for now ! GeomData* geomData0 = ((GeomData*)dGeomGetData(o0)); ! GeomData* geomData1 = ((GeomData*)dGeomGetData(o1)); Solid* solid0 = geomData0->solid; Solid* solid1 = geomData1->solid; sim->internal_addCollidedSolid(solid0); sim->internal_addCollidedSolid(solid1); --- 785,799 ---- else { ! // These two geoms must be intersecting. ! // Get pointers to the geoms' Solids. Solid* solid0 = geomData0->solid; Solid* solid1 = geomData1->solid; + + // Not sure at this point if we can know that o1 is the + // volume object, so we'll just call this twice. It + // will automatically keep from adding the same Solid + // multiple times by using its collision count. Later, + // the volume Solid will be removed from this list. sim->internal_addCollidedSolid(solid0); sim->internal_addCollidedSolid(solid1); *************** *** 770,774 **** } - // Note: o1 is the ray geom. void internal_raycastCollisionCallback(void* data, dGeomID o0, dGeomID o1) --- 802,805 ---- *************** *** 784,788 **** // Colliding two geoms. ! // Now actually test for collision between the two geoms. dContactGeom contactArray[1]; int numContacts = dCollide(o0, o1, 1, contactArray, --- 815,848 ---- // Colliding two geoms. ! // Get a pointer to the ODESimulator. ! ODESimulator* sim = (ODESimulator*)data; ! ! // Get pointers to the two geoms' GeomData structure. ! GeomData* geomData0 = ((GeomData*)dGeomGetData(o0)); ! GeomData* geomData1 = ((GeomData*)dGeomGetData(o1)); ! ! // Only one of these (the one NOT belonging to the ray geom) ! // will be non-NULL. ! unsigned int geomContactGroup = defaults::shape::contactGroup; ! if (geomData0) ! { ! geomContactGroup = geomData0->shape->contactGroup; ! } ! else ! { ! geomContactGroup = geomData1->shape->contactGroup; ! } ! ! // Check if the two Solids' contact groups generate contacts ! // when they collide. ! bool makeContacts = sim->groupsMakeContacts( ! geomContactGroup, sim->internal_getRayContactGroup()); ! if (!makeContacts) ! { ! return; ! } ! ! // Now actually test for collision between the two geoms. ! // This is one of the more expensive operations. dContactGeom contactArray[1]; int numContacts = dCollide(o0, o1, 1, contactArray, *************** *** 795,812 **** else { ! // These two geoms must be intersecting. ! ODESimulator* sim = (ODESimulator*)data; - GeomData* geomData0 = ((GeomData*)dGeomGetData(o0)); if(geomData0) { - Point3r intersection(contactArray[0].pos[0], - contactArray[0].pos[1], contactArray[0].pos[2]); - Vec3r normal(contactArray[0].normal[0], - contactArray[0].normal[1], - contactArray[0].normal[2]); sim->internal_setRaycastResult(geomData0->solid, intersection, normal, contactArray[0].depth); } } } --- 855,878 ---- else { ! // These two geoms must be intersecting. Again, only ! // one will be part of a Solid we want to store; the ! // other is the ray. ! ! Point3r intersection(contactArray[0].pos[0], ! contactArray[0].pos[1], contactArray[0].pos[2]); ! Vec3r normal(contactArray[0].normal[0], ! contactArray[0].normal[1], ! contactArray[0].normal[2]); if(geomData0) { sim->internal_setRaycastResult(geomData0->solid, intersection, normal, contactArray[0].depth); } + else + { + sim->internal_setRaycastResult(geomData1->solid, + intersection, normal, contactArray[0].depth); + } } } *************** *** 853,856 **** --- 919,927 ---- } + unsigned int ODESimulator::internal_getRayContactGroup() + { + return mRayContactGroup; + } + //helper function for collision callback //void createOneSidedContact(dJointID contactJoint, dBodyID movingObject, *************** *** 875,879 **** const RaycastResult& ODESimulator::internal_fireRay(const Rayr& r, real length, const Solid* attachedSolid, ! unsigned long int rayContactGroup) { Point3r origin = r.getOrigin(); --- 946,950 ---- const RaycastResult& ODESimulator::internal_fireRay(const Rayr& r, real length, const Solid* attachedSolid, ! unsigned int rayContactGroup) { Point3r origin = r.getOrigin(); *************** *** 885,894 **** mRaycastResult.distance = 0; mSensorSolid = attachedSolid; ! // TODO: use rayContactGroup to limit collision check ! dGeomID rayGeomID = dCreateRay(mRootSpaceID, length); dGeomRaySet(rayGeomID, origin[0], origin[1], origin[2], dir[0], dir[1], dir[2]); // Check for collisions. This will fill mRaycastResult with valid --- 956,968 ---- mRaycastResult.distance = 0; mSensorSolid = attachedSolid; + mRayContactGroup = rayContactGroup; ! // Create an ODE ray geom. Make sure its user data pointer is ! // NULL because this is used in the collision callback to ! // distinguish the ray from other geoms. dGeomID rayGeomID = dCreateRay(mRootSpaceID, length); dGeomRaySet(rayGeomID, origin[0], origin[1], origin[2], dir[0], dir[1], dir[2]); + dGeomSetData(rayGeomID, NULL); // Check for collisions. This will fill mRaycastResult with valid *************** *** 911,916 **** ((ODESolid*)volume)->internal_getGeomDataList(); - // TODO: use the volume's contact group to limit collision check - // Check for collisions with each of the volume Solid's geoms. // This will fill up mVolumeQueryResult with those Solids that --- 985,988 ---- *************** *** 1028,1032 **** dJointGroupID ODESimulator::internal_getJointGroupID()const { ! return mContactGroupID; } } --- 1100,1104 ---- dJointGroupID ODESimulator::internal_getJointGroupID()const { ! return mContactJointGroupID; } } |
|
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. |
|
From: tylerstreeter <tyl...@us...> - 2005-03-25 02:44:30
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28529 Modified Files: todo.txt Log Message: made the RaycastSensor and VolumeSensor use contact groups Index: todo.txt =================================================================== RCS file: /cvsroot/opal/opal/todo.txt,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** todo.txt 23 Mar 2005 20:24:31 -0000 1.59 --- todo.txt 25 Mar 2005 02:44:21 -0000 1.60 *************** *** 4,12 **** * incline/orientation sensor: measures current orientation relative to an initial orientation; returns 3 reals - * ray and volume sensors should use contact groups to limit collision checks - - both use contact groups - - ray has explicit group # which should be passed to the simulator raycast function - - volume solid just uses its own group # - * add license notice to samples' source files --- 4,7 ---- |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 20:26:42
|
Update of /cvsroot/opal/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23816 Modified Files: documentation.html todo.txt tutorial2.html tutorial4.html tutorial5.html Log Message: finished the Sensors tutorial Index: documentation.html =================================================================== RCS file: /cvsroot/opal/web/documentation.html,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** documentation.html 23 Mar 2005 07:55:39 -0000 1.10 --- documentation.html 23 Mar 2005 20:26:12 -0000 1.11 *************** *** 25,43 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>99</o:Revision> ! <o:TotalTime>107</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-13T20:35:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>323</o:Words> ! <o:Characters>1844</o:Characters> <o:Company>none</o:Company> <o:Lines>15</o:Lines> <o:Paragraphs>4</o:Paragraphs> ! <o:CharactersWithSpaces>2163</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> --- 25,46 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>102</o:Revision> ! <o:TotalTime>111</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-23T20:21:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>327</o:Words> ! <o:Characters>1865</o:Characters> <o:Company>none</o:Company> <o:Lines>15</o:Lines> <o:Paragraphs>4</o:Paragraphs> ! <o:CharactersWithSpaces>2188</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> + <w:Zoom>90</w:Zoom> + <w:SpellingState>Clean</w:SpellingState> + <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> *************** *** 71,74 **** --- 74,80 ---- text-decoration:underline; text-underline:single;} + span.SpellE + {mso-style-name:""; + mso-spl-e:yes;} @page Section1 {size:8.5in 11.0in; *************** *** 98,102 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="56322"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 104,108 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="57346"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 177,186 **** color:black'>Documentation<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If ! you are using OPAL for the first time, it is recommended that you read ! through the documentation in the following order: 1) overview, 2) tutorials, ! 3) API reference.<span style='mso-spacerun:yes'> </span>The overview and ! tutorials do not cover everything; they exist to help you learn to use OPAL quickly.<span ! style='mso-spacerun:yes'> </span>Consult the API reference for more details.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; --- 183,193 ---- color:black'>Documentation<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If you ! are using OPAL for the first time, it is recommended that you read through ! the documentation in the following order: 1) overview, 2) tutorials, 3) API ! reference.<span style='mso-spacerun:yes'> </span>The overview and tutorials ! do not cover everything; they exist to help you learn to use OPAL ! quickly.<span style='mso-spacerun:yes'> </span>Consult the API reference for ! more details.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; *************** *** 216,225 **** <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; color:black'><a href="tutorial7.html">Tutorial 7</a></span><span ! style='font-family:"Book Antiqua";color:black'>: Event Handlers, Collision ! Groups, and Trigger Volumes<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial8.html">Tutorial 8</a></span><span ! style='font-family:"Book Antiqua";color:black'>: OPAL XML Loading and Saving<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; --- 223,235 ---- <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; color:black'><a href="tutorial7.html">Tutorial 7</a></span><span ! style='font-family:"Book Antiqua";color:black'>: Event Handlers<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial7.html">Tutorial 8</a></span><span ! style='font-family:"Book Antiqua";color:black'>: Collision Groups<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial8.html">Tutorial 9</a></span><span ! style='font-family:"Book Antiqua";color:black'>: Blueprints and OPAL XML Files<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; *************** *** 229,235 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="files/ragdoll.xml">Ragdoll OPAL XML</a></span><span ! style='font-family:"Book Antiqua";color:black'>: file containing a ragdoll ! blueprint.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; --- 239,245 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="files/ragdoll.xml"><span class=SpellE>Ragdoll</span> ! OPAL XML</a></span><span style='font-family:"Book Antiqua";color:black'>: ! file containing a <span class=SpellE>ragdoll</span> Blueprint.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; Index: tutorial5.html =================================================================== RCS file: /cvsroot/opal/web/tutorial5.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tutorial5.html 23 Mar 2005 07:55:39 -0000 1.2 --- tutorial5.html 23 Mar 2005 20:26:23 -0000 1.3 *************** *** 25,43 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>145</o:Revision> ! <o:TotalTime>269</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-14T02:20:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>269</o:Words> ! <o:Characters>1535</o:Characters> <o:Company>none</o:Company> ! <o:Lines>12</o:Lines> ! <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1801</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> --- 25,44 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>167</o:Revision> ! <o:TotalTime>357</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-23T20:15:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>539</o:Words> ! <o:Characters>3078</o:Characters> <o:Company>none</o:Company> ! <o:Lines>25</o:Lines> ! <o:Paragraphs>7</o:Paragraphs> ! <o:CharactersWithSpaces>3610</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> + <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> *************** *** 80,83 **** --- 81,87 ---- text-decoration:underline; text-underline:single;} + span.SpellE + {mso-style-name:""; + mso-spl-e:yes;} @page Section1 {size:8.5in 11.0in; *************** *** 107,111 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="59394"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 111,115 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="61442"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 140,152 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>A ! Sensor acquires information from a simulation.<span ! style='mso-spacerun:yes'> </span>There are several types of Sensors, ! including Acceleration Sensors, Raycast Sensors, Velocity Sensors, and Volume ! Sensors.<span style='mso-spacerun:yes'> </span>This tutorial will show how ! to setup each type.<span style='mso-spacerun:yes'> </span>It will also give ! examples of how each type could be used.<span style='mso-spacerun:yes'> ! </span>Keep in mind that a Sensor can either be attached to a Solid or just ! positioned somewhere in the environment.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Lets --- 144,156 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Sensors ! acquire information from a simulation.<span style='mso-spacerun:yes'> ! </span>There are several types of Sensors, including Acceleration Sensors, <span ! class=SpellE>Raycast</span> Sensors, and Volume Sensors.<span ! style='mso-spacerun:yes'> </span>This tutorial will show how to setup each ! type.<span style='mso-spacerun:yes'> </span>It will also give examples of ! how each type could be used.<span style='mso-spacerun:yes'> </span>Keep in ! mind that a Sensor can either be attached to a Solid or just positioned ! somewhere in the environment.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Lets *************** *** 164,171 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Simulator* ! sim = opal::createSimulator();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Solid* ! solid = sim->createSolid();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 168,178 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Simulator</span></span><span style='font-family:Courier; ! color:black'>* <span class=SpellE>sim</span> = <span class=SpellE>opal::createSimulator</span>();<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Solid</span></span><span style='font-family:Courier; ! color:black'>* solid = <span class=SpellE>sim</span>-><span ! class=SpellE>createSolid</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 177,182 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The ! first Sensor we will make here is an Acceleration Sensor:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left --- 184,192 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span + style='font-size:16.0pt;font-family:"Book Antiqua";color:black'>Acceleration + Sensor<o:p></o:p></span></b></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The ! first Sensor we will use here is an Acceleration Sensor:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left *************** *** 190,205 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::AccelerationSensorData ! data;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.solid ! = solid;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.strength ! = 10.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.exponent ! = 2.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::AttractorMotor* ! attractor = sim->createAttractorMotor();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>attractor->init(data);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 200,228 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::AccelerationSensorData</span></span><span ! style='font-family:Courier;color:black'> data;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>data.solid</span></span><span style='font-family:Courier; ! color:black'> = solid;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>data.transform.translate</span></span><span style='font-family: ! Courier;color:black'>(4, 0, -1);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::AccelerationSensor</span></span><span style='font-family: ! Courier;color:black'>* <span class=SpellE>accelSensor</span> = <span ! class=SpellE>sim</span>-><span class=SpellE>createAccelerationSensor</span>();<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>accelSensor</span></span><span style='font-family:Courier; ! color:black'>->init(data);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>...<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Vec3r ! <span class=SpellE>accel</span> = <span class=SpellE>accelSensor</span>-></span><span ! class=SpellE><span style='font-size:10.0pt;font-family:"Courier New"; ! color:windowtext'>getGlobalLinearAccel</span></span><span style='font-size: ! 10.0pt;font-family:"Courier New";color:windowtext'>();</span><span ! style='font-family:Courier;color:black'><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 216,226 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> - <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This - Attractor Motor will constantly apply forces to the two Solids to make them - gravitate toward one another.<span style='mso-spacerun:yes'> </span>This - makes it easy to simulate planetary gravitation or magnetic attraction.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Next, ! lets make a Geared Motor:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left --- 239,254 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The ! Sensor is automatically attached to the Solid if its Solid pointer is ! set.<span style='mso-spacerun:yes'> </span>It calculates the linear and ! angular acceleration of the attached Solid at the point of the Sensor (which ! can be offset from the Solid by using the Sensors transform).<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span ! style='font-size:16.0pt;font-family:"Book Antiqua";color:black'>Raycast ! Sensor<o:p></o:p></span></b></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The ! next Sensor is the <span class=SpellE>Raycast</span> Sensor:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left *************** *** 234,251 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::GearedMotorData ! data;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.joint ! = joint;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.jointAxisNum ! = 0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.maxTorque ! = 10.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.maxVelocity ! = 2000.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal:: ! GearedMotor* engine = sim->createGearedMotor();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>engine->init(data);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>engine->setThrottle(0.5);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 262,304 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::RaycastSensorData</span></span><span style='font-family: ! Courier;color:black'> data;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>data.solid</span></span><span style='font-family:Courier; ! color:black'> = solid;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>data.ray.setOrigin</span></span><span style='font-family:Courier; ! color:black'>(opal::Point3r(0, 0, 0));<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>data.ray.setDir</span></span><span style='font-family:Courier; ! color:black'>(opal::Vec3r(0, 0, -1));<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>data.contactGroup</span></span><span style='font-family:Courier; ! color:black'> = 2;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::RaycastSensor</span></span><span style='font-family: ! Courier;color:black'>* <span class=SpellE>raySensor</span> = <span ! class=SpellE>sim</span>-><span class=SpellE>createRaycastSensor</span>();<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>raySensor</span></span><span style='font-family:Courier; ! color:black'>->init(data);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>...<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::RaycastResult</span></span><span style='font-family: ! Courier;color:black'> result = <span class=SpellE>raySensor</span>-></span><span ! class=SpellE><span style='font-family:Courier;mso-bidi-font-family:"Courier New"; ! color:windowtext'>fireRay</span></span><span style='font-family:Courier; ! mso-bidi-font-family:"Courier New";color:windowtext'>();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'>opal::Point3r <span class=SpellE>hitPoint</span> ! = <span class=SpellE>result.intersection</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! mso-bidi-font-family:"Courier New";color:windowtext'>opal::Solid</span></span><span ! style='font-family:Courier;mso-bidi-font-family:"Courier New";color:windowtext'>* ! <span class=SpellE>hitSolid</span> = <span class=SpellE>result.solid</span>;</span><span ! style='font-family:Courier;color:black'><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 263,273 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The Geared ! Motors throttle should now be updated as desired.<span ! style='mso-spacerun:yes'> </span>The Motor will have more torque available ! when its angular velocity is low.<span style='mso-spacerun:yes'> </span>As ! it approaches its max velocity, it will apply less and less torque.<span ! style='mso-spacerun:yes'> </span>This Motor is great for simulating ! automobile engines.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 316,457 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:"Book Antiqua"; ! color:black'>Raycast</span></span><span style='font-family:"Book Antiqua"; ! color:black'> Sensors must be fired manually they do not update anything ! every time step.<span style='mso-spacerun:yes'> </span>When they are fired, ! they cast a ray into the environment and return data describing the closest point ! of intersection (if any) from the rays origin.<span ! style='mso-spacerun:yes'> </span>The <span class=SpellE>Raycast</span> ! Sensor uses a contact group to limit which objects it collides with.<span ! style='mso-spacerun:yes'> </span>(See other tutorials for more information ! on contact groups.)<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><span ! style='mso-spacerun:yes'> </span><o:p></o:p></span></p> ! <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span ! style='font-size:16.0pt;font-family:"Book Antiqua";color:black'>Volume Sensor<o:p></o:p></span></b></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The Volume ! Sensor is similar to the <span class=SpellE>Raycast</span> Sensor:<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left ! style='background:silver;border-collapse:collapse;border:none;mso-border-alt: ! solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: ! 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: ! page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> ! <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> ! <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; ! mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; ! height:22.95pt'> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::VolumeSensorData</span></span><span style='font-family: ! Courier;color:black'> data;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>data.contactGroup</span></span><span style='font-family:Courier; ! color:black'> = 5;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal:: <span ! class=SpellE>VolumeSensor</span>* <span class=SpellE>volSensor</span> = <span ! class=SpellE>sim</span>-><span class=SpellE>createVolumeSensor</span>();<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>volSensor</span></span><span style='font-family:Courier; ! color:black'>->init(data);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>// Define ! a volume Solid.<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Solid</span></span><span style='font-family:Courier; ! color:black'>* volume = <span class=SpellE>sim</span>-><span ! class=SpellE>createSolid</span>();<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::SphereShapeData</span></span><span style='font-family: ! Courier;color:black'> <span class=SpellE>sphereData</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>sphereData.radius</span></span><span style='font-family:Courier; ! color:black'> = 5;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>volume-><span ! class=SpellE>addShape</span>(<span class=SpellE>sphereData</span>);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>...<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::VolumeQueryResult</span></span><span style='font-family: ! Courier;color:black'> result = <span class=SpellE>volSensor</span>-></span><span ! class=SpellE><span style='font-family:Courier;mso-bidi-font-family:"Courier New"; ! color:windowtext'>queryVolume</span></span><span style='font-family:Courier; ! mso-bidi-font-family:"Courier New";color:windowtext'>(volume);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'>for (<span class=SpellE>int</span> <span ! class=SpellE>i</span>=0; <span class=SpellE>i</span><<span class=SpellE>result.getNumSolids</span>(); ! ++<span class=SpellE>i</span>)<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'>{<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'><span style='mso-spacerun:yes'> </span><span ! class=SpellE>opal::Solid</span>* s = <span class=SpellE>result.getSolid</span>(<span ! class=SpellE>i</span>);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'><span style='mso-spacerun:yes'> </span><span ! class=SpellE>opal::Force</span> f;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'><span style='mso-spacerun:yes'> </span><span ! class=SpellE>f.type</span> = <span class=SpellE>opal::GLOBAL_FORCE</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'><span style='mso-spacerun:yes'> </span><span ! class=SpellE>f.duration</span> = (<span class=SpellE>opal::real</span>)0.05;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'><span style='mso-spacerun:yes'> </span><span ! class=SpellE>f.vec</span> = s-><span class=SpellE>getPosition</span>() ! volume-><span class=SpellE>getPosition</span>();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'><span style='mso-spacerun:yes'> </span><span ! class=SpellE>f.vec</span> *= 100;<span style='mso-spacerun:yes'> </span><o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'><span style='mso-spacerun:yes'> ! </span>s-><span class=SpellE>addForce</span>(f);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;mso-bidi-font-family: ! "Courier New";color:windowtext'>}<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! </td> ! </tr> ! </table> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Volume ! Sensors take a volume Solid and query the environment for Solids that ! collide with the volume Solid.<span style='mso-spacerun:yes'> </span>The ! resulting data structure contains a list of pointers to those Solids.<span ! style='mso-spacerun:yes'> </span>Like <span class=SpellE>Raycast</span> ! Sensors, they can utilize contact groups to limit the set of Solids that are ! collided with the volume Solid; simply set the contact group of the volume ! Solid.<span style='mso-spacerun:yes'> </span>They also are not updated every ! time step; they must be queried manually.<span style='mso-spacerun:yes'> ! </span>The example above shows how to simulate an explosion: it finds all the ! Solids within a 5 unit radius from the volumes center and applies an outward ! force on each object scaled linearly by its distance from the center.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> Index: tutorial2.html =================================================================== RCS file: /cvsroot/opal/web/tutorial2.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tutorial2.html 4 Mar 2005 03:45:32 -0000 1.3 --- tutorial2.html 23 Mar 2005 20:26:23 -0000 1.4 *************** *** 25,44 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>124</o:Revision> ! <o:TotalTime>211</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-04T01:29:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>420</o:Words> ! <o:Characters>2394</o:Characters> <o:Company>none</o:Company> ! <o:Lines>19</o:Lines> <o:Paragraphs>5</o:Paragraphs> ! <o:CharactersWithSpaces>2809</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> ! <w:Zoom>90</w:Zoom> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> --- 25,44 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>126</o:Revision> ! <o:TotalTime>212</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-23T19:19:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>424</o:Words> ! <o:Characters>2418</o:Characters> <o:Company>none</o:Company> ! <o:Lines>20</o:Lines> <o:Paragraphs>5</o:Paragraphs> ! <o:CharactersWithSpaces>2837</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> ! <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> *************** *** 81,84 **** --- 81,90 ---- text-decoration:underline; text-underline:single;} + span.SpellE + {mso-style-name:""; + mso-spl-e:yes;} + span.GramE + {mso-style-name:""; + mso-gram-e:yes;} @page Section1 {size:8.5in 11.0in; *************** *** 108,112 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="56322"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 114,118 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="58370"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 141,144 **** --- 147,152 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span + style='font-size:16.0pt;font-family:"Book Antiqua";color:black'>Solids<o:p></o:p></span></b></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>A Solid is analogous to a physical object in the real world. It can be *************** *** 146,151 **** mass, and is physically simulated). The available Shapes are: boxes, spheres, capsule, planes, rays, and triangular meshes.<span ! style='mso-spacerun:yes'> </span>A Solid contains no moving parts. Complex ! objects with moving parts can be built from multiple Solids with Joints.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Create --- 154,160 ---- mass, and is physically simulated). The available Shapes are: boxes, spheres, capsule, planes, rays, and triangular meshes.<span ! style='mso-spacerun:yes'> </span>A Solid contains no moving parts. ! Complex objects with moving parts can be built from multiple Solids with ! Joints.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Create *************** *** 162,169 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Simulator* ! sim = opal::createSimulator();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Solid* ! solid = sim->createSolid();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 171,181 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Simulator</span></span><span style='font-family:Courier; ! color:black'>* <span class=SpellE>sim</span> = <span class=SpellE>opal::createSimulator</span>();<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Solid</span></span><span style='font-family:Courier; ! color:black'>* solid = <span class=SpellE>sim</span>-><span ! class=SpellE>createSolid</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 189,203 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->setLinearDamping(0.2);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Matrix44r transform;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>transform.translate(1.0, ! 0.0, 5.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>transform.rotate(45.0, ! 0.0, 1.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->setTransform(transform);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->setStatic(true);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 201,220 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>setLinearDamping</span>(0.2);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Matrix44r transform;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>transform.translate</span></span><span style='font-family: ! Courier;color:black'>(1.0, 0.0, 5.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>transform.rotate</span></span><span style='font-family:Courier; ! color:black'>(45.0, 0.0, 1.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>setTransform</span>(transform);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>setStatic</span>(true);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 219,227 **** but still takes part in collision detection.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>An ! important part of creating a Solid is giving it Shapes.<span ! style='mso-spacerun:yes'> </span>A Solid can contain any number of ! Shapes.<span style='mso-spacerun:yes'> </span>To add box and sphere Shapes ! to the Solid, do the following:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left --- 236,241 ---- but still takes part in collision detection.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>You ! can apply forces and torques to a Solid like this:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left *************** *** 236,251 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::BoxShapeData ! boxData;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.dimensions.dimensions.set(1.0, ! 1.0, 2.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->addShape(boxData);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::SphereShapeData ! sphereData;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>sphereData.radius ! = 2.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>sphereData.offset.translate(4.0, ! 0.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->addShape(sphereData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 250,267 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Force</span></span><span style='font-family:Courier; ! color:black'> f;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>f.type</span></span><span style='font-family:Courier; ! color:black'> = <span class=SpellE>opal::GLOBAL_FORCE</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>f.vec</span></span><span style='font-family:Courier; ! color:black'> = opal::Vec3r(20.0, 20.0, 40.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>f.duration</span></span><span style='font-family:Courier; ! color:black'> = 0.1;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>addForce</span>(f);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 260,275 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Notice ! how the spheres offset was changed.<span style='mso-spacerun:yes'> ! </span>The offset positions the Shape relative to the Solids transform.<span ! style='mso-spacerun:yes'> </span>Shapes are not offset at all by ! default.<span style='mso-spacerun:yes'> </span>Here, we have moved the ! Sphere away from the Solids origin.<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Each ! Shape can have different Material properties.<span style='mso-spacerun:yes'> ! </span>Now for a demonstration of using a custom Material:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left --- 276,284 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This + force will be applied to the Solid until its duration expires.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>When ! you are done with a Solid, tell the Simulator to destroy it:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left *************** *** 284,300 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::BoxShapeData ! boxData;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.dimensions.dimensions.set(1.0, ! 1.0, 2.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.material.hardness ! = 0.2;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.material.bounciness ! = 0.6;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.material.friction ! = 1.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.material.density ! = 0.4;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->addShape(boxData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 293,299 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>sim</span></span><span style='font-family:Courier;color:black'>-><span ! class=SpellE>destroySolid</span>(solid);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 305,321 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Note ! that Material density affects a Solids mass (calculated from each Shapes ! density and volume).<span style='mso-spacerun:yes'> </span>The rest of the ! Material properties are described in the API reference.<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>You ! can apply forces and torques to a Solid like this:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left --- 304,318 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If + other <span class=GramE>things depends</span> on this Solid, like Joints, + Motors, or Sensors, they will automatically be disabled.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span ! style='font-size:16.0pt;font-family:"Book Antiqua";color:black'>Shapes<o:p></o:p></span></b></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>An ! important part of creating a Solid is giving it Shapes.<span ! style='mso-spacerun:yes'> </span>A Solid can contain any number of Shapes.<span ! style='mso-spacerun:yes'> </span>To add box and sphere Shapes to the Solid, ! do the following:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left *************** *** 330,342 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Force ! f;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>f.type = ! opal::GLOBAL_FORCE;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>f.vec = ! opal::Vec3r(20.0, 20.0, 40.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>f.duration ! = 0.1;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->addForce(f);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 327,349 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::BoxShapeData</span></span><span style='font-family:Courier; ! color:black'> <span class=SpellE>boxData</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>boxData.dimensions.dimensions.set</span></span><span ! style='font-family:Courier;color:black'>(1.0, 1.0, 2.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>addShape</span>(<span class=SpellE>boxData</span>);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::SphereShapeData</span></span><span style='font-family: ! Courier;color:black'> <span class=SpellE>sphereData</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>sphereData.radius</span></span><span style='font-family:Courier; ! color:black'> = 2.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>sphereData.offset.translate</span></span><span ! style='font-family:Courier;color:black'>(4.0, 0.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>addShape</span>(<span class=SpellE>sphereData</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 351,359 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> - <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This - force will be applied to the Solid until its duration expires.<o:p></o:p></span></p> <p class=MsoNormal><span style='... [truncated message content] |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 20:26:39
|
Update of /cvsroot/opal/web/files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23816/files Modified Files: example.xml Log Message: finished the Sensors tutorial Index: example.xml =================================================================== RCS file: /cvsroot/opal/web/files/example.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** example.xml 23 Mar 2005 07:55:39 -0000 1.7 --- example.xml 23 Mar 2005 20:26:24 -0000 1.8 *************** *** 16,19 **** --- 16,20 ---- </Offset> <Shape type="box"> + <ContactGroup value="2"/> <Dimensions x="0.4" y="0.4" z="2.0"/> <Material hardness="0.5" friction="0.5" bounciness="0.5" density="0.5"/> *************** *** 201,204 **** --- 202,206 ---- <Type value="raycast"/> <References solid="object1"/> + <ContactGroup value="3"/> <Offset> <Transform type="translate" x="1.0" y="2.0" z="5.0"/> |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 20:25:56
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22833/src Modified Files: AccelerationSensor.cpp AccelerationSensor.h BlueprintManager.cpp RaycastSensor.cpp RaycastSensorData.h SensorData.h Simulator.h Log Message: a bunch of minor updates Index: AccelerationSensor.h =================================================================== RCS file: /cvsroot/opal/opal/src/AccelerationSensor.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AccelerationSensor.h 23 Mar 2005 07:54:33 -0000 1.3 --- AccelerationSensor.h 23 Mar 2005 20:24:33 -0000 1.4 *************** *** 99,113 **** Simulator* mSim; ! /// Stored copy of the current global linear acceleration. ! Vec3r mGlobalLinearAccel; ! /// Stored copy of the current global angular acceleration. ! Vec3r mGlobalAngularAccel; ! /// Stored copy of the current local linear acceleration. ! Vec3r mLocalLinearAccel; ! /// Stored copy of the current local angular acceleration. ! Vec3r mLocalAngularAccel; /// Stored copy of the previous step's velocity data; used for --- 99,117 ---- Simulator* mSim; ! /// Stored copy of the current step's velocity data; used for ! /// acceleration calculations. ! Vec3r mCurrentGlobalLinearVel; ! /// Stored copy of the current step's velocity data; used for ! /// acceleration calculations. ! Vec3r mCurrentGlobalAngularVel; ! /// Stored copy of the current step's velocity data; used for ! /// acceleration calculations. ! Vec3r mCurrentLocalLinearVel; ! /// Stored copy of the current step's velocity data; used for ! /// acceleration calculations. ! Vec3r mCurrentLocalAngularVel; /// Stored copy of the previous step's velocity data; used for Index: AccelerationSensor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/AccelerationSensor.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AccelerationSensor.cpp 23 Mar 2005 07:54:33 -0000 1.3 --- AccelerationSensor.cpp 23 Mar 2005 20:24:32 -0000 1.4 *************** *** 36,43 **** mSim = s; ! // "mGlobalLinearAccel" is initialized in its own constructor. ! // "mGlobalAngularAccel" is initialized in its own constructor. ! // "mLocalLinearAccel" is initialized in its own constructor. ! // "mLocalAngularAccel" is initialized in its own constructor. // "mPrevGlobalLinearVel" is initialized in its own constructor. --- 36,43 ---- mSim = s; ! // "mCurrentGlobalLinearVel" is initialized in its own constructor. ! // "mCurrentGlobalAngularVel" is initialized in its own constructor. ! // "mCurrentLocalLinearVel" is initialized in its own constructor. ! // "mCurrentLocalAngularVel" is initialized in its own constructor. // "mPrevGlobalLinearVel" is initialized in its own constructor. *************** *** 69,73 **** } ! return mGlobalLinearAccel; } --- 69,74 ---- } ! return (mCurrentGlobalLinearVel - mPrevGlobalLinearVel) / ! mSim->getStepSize(); } *************** *** 79,83 **** } ! return mGlobalAngularAccel; } --- 80,85 ---- } ! return (mCurrentGlobalAngularVel - mPrevGlobalAngularVel) / ! mSim->getStepSize(); } *************** *** 89,93 **** } ! return mLocalLinearAccel; } --- 91,96 ---- } ! return (mCurrentLocalLinearVel - mPrevLocalLinearVel) / ! mSim->getStepSize(); } *************** *** 99,103 **** } ! return mLocalAngularAccel; } --- 102,107 ---- } ! return (mCurrentLocalAngularVel - mPrevLocalAngularVel) / ! mSim->getStepSize(); } *************** *** 146,175 **** if (mData.enabled) { ! real dt = mSim->getStepSize(); ! ! Vec3r currentGlobalLinearVel = mData.solid->getGlobalLinearVelAtLocalPos( mData.transform.getPosition()); ! Vec3r currentGlobalAngularVel = mData.solid->getGlobalAngularVel(); ! Vec3r currentLocalLinearVel = mData.solid->getLocalLinearVelAtLocalPos( mData.transform.getPosition()); ! Vec3r currentLocalAngularVel = mData.solid->getLocalAngularVel(); ! mGlobalLinearAccel = (currentGlobalLinearVel - ! mPrevGlobalLinearVel) / dt; ! mGlobalAngularAccel = (currentGlobalAngularVel - ! mPrevGlobalAngularVel) / dt; ! mLocalLinearAccel = (currentLocalLinearVel - ! mPrevLocalLinearVel) / dt; ! mLocalAngularAccel = (currentLocalAngularVel - ! mPrevLocalAngularVel) / dt; ! ! mPrevGlobalLinearVel = currentGlobalLinearVel; ! mPrevGlobalAngularVel = currentGlobalAngularVel; ! mPrevLocalLinearVel = currentLocalLinearVel; ! mPrevLocalAngularVel = currentLocalAngularVel; } } --- 150,168 ---- if (mData.enabled) { ! mCurrentGlobalLinearVel = mData.solid->getGlobalLinearVelAtLocalPos( mData.transform.getPosition()); ! mCurrentGlobalAngularVel = mData.solid->getGlobalAngularVel(); ! mCurrentLocalLinearVel = mData.solid->getLocalLinearVelAtLocalPos( mData.transform.getPosition()); ! mCurrentLocalAngularVel = mData.solid->getLocalAngularVel(); ! mPrevGlobalLinearVel = mCurrentGlobalLinearVel; ! mPrevGlobalAngularVel = mCurrentGlobalAngularVel; ! mPrevLocalLinearVel = mCurrentLocalLinearVel; ! mPrevLocalAngularVel = mCurrentLocalAngularVel; } } Index: BlueprintManager.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/BlueprintManager.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** BlueprintManager.cpp 23 Mar 2005 07:54:33 -0000 1.35 --- BlueprintManager.cpp 23 Mar 2005 20:24:34 -0000 1.36 *************** *** 1333,1336 **** --- 1333,1347 ---- data->ray.setDir(dir); } + + // Load ContactGroup element if it exists. + paramNodePtr = + const_cast<TiXmlNode*>(nodePtr)->FirstChild("ContactGroup"); + if (NULL != paramNodePtr) + { + data->contactGroup = + (unsigned long int)getAttributeReal( + paramNodePtr, "value"); + } + #endif return data; *************** *** 1428,1432 **** } ! // Load Offset element. TiXmlNode* offsetNodePtr = const_cast<TiXmlNode*> (nodePtr)->FirstChild("Offset"); --- 1439,1443 ---- } ! // Load Offset element if it exists. TiXmlNode* offsetNodePtr = const_cast<TiXmlNode*> (nodePtr)->FirstChild("Offset"); *************** *** 1436,1440 **** } ! // Load Material element. TiXmlNode* materialNodePtr = const_cast<TiXmlNode*> (nodePtr)->FirstChild("Material"); --- 1447,1451 ---- } ! // Load Material element if it exists. TiXmlNode* materialNodePtr = const_cast<TiXmlNode*> (nodePtr)->FirstChild("Material"); *************** *** 1451,1454 **** --- 1462,1475 ---- } + // Load ContactGroup element if it exists. + TiXmlNode* contactGroupNodePtr = + const_cast<TiXmlNode*>(nodePtr)->FirstChild("ContactGroup"); + if (NULL != contactGroupNodePtr) + { + data->contactGroup = + (unsigned long int)getAttributeReal( + contactGroupNodePtr, "value"); + } + #endif return data; Index: SensorData.h =================================================================== RCS file: /cvsroot/opal/opal/src/SensorData.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SensorData.h 23 Mar 2005 07:54:34 -0000 1.8 --- SensorData.h 23 Mar 2005 20:24:47 -0000 1.9 *************** *** 69,73 **** } ! /// True if the Motor is enabled. bool enabled; --- 69,73 ---- } ! /// True if the Sensor is enabled. bool enabled; Index: RaycastSensorData.h =================================================================== RCS file: /cvsroot/opal/opal/src/RaycastSensorData.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RaycastSensorData.h 13 Mar 2005 23:07:10 -0000 1.3 --- RaycastSensorData.h 23 Mar 2005 20:24:47 -0000 1.4 *************** *** 43,46 **** --- 43,47 ---- mType = RAYCAST_SENSOR; // "ray" is initialized in its own constructor. + contactGroup = defaults::shape::contactGroup; } *************** *** 75,78 **** --- 76,84 ---- Rayr ray; + /// The ray's contact group. This can be used to limit which objects + /// the ray collides with. If this exceeds 31, bad things + /// might happen since there are only 32 groups. + unsigned long int contactGroup; + protected: Index: RaycastSensor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/RaycastSensor.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RaycastSensor.cpp 23 Mar 2005 04:04:30 -0000 1.7 --- RaycastSensor.cpp 23 Mar 2005 20:24:36 -0000 1.8 *************** *** 75,79 **** // that Solid. ! return mSim->internal_fireRay(ray, length, mData.solid); } --- 75,80 ---- // that Solid. ! return mSim->internal_fireRay(ray, length, mData.solid, ! mData.contactGroup); } Index: Simulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.h,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** Simulator.h 23 Mar 2005 07:54:34 -0000 1.89 --- Simulator.h 23 Mar 2005 20:24:47 -0000 1.90 *************** *** 241,247 **** /// Helper function used for ray casting. Immediately fires a ray ! /// into the scene and returns intersections results. virtual const RaycastResult& OPAL_CALL internal_fireRay( ! const Rayr& r, real length, const Solid* attachedSolid) = 0; /// Helper function used for volume queries. --- 241,249 ---- /// Helper function used for ray casting. Immediately fires a ray ! /// into the scene and returns intersections results. Uses the ! /// ray's contact group parameter to limit collision checks. 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. |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 20:25:26
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22833 Modified Files: changelog.txt todo.txt Log Message: a bunch of minor updates Index: changelog.txt =================================================================== RCS file: /cvsroot/opal/opal/changelog.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** changelog.txt 23 Mar 2005 07:54:33 -0000 1.12 --- changelog.txt 23 Mar 2005 20:24:30 -0000 1.13 *************** *** 3,7 **** ------------------------------------------ * New additional object creation system: all objects can be created from/saved to a data object ! * EventHandler was changed to a base class for CollisionEventHandler and JointBreakEventHandler * Collision events now get queued up during collision detection and handled at the end of each time step * Added AccelerationSensor, RaycastSensor, & VolumeSensor --- 3,8 ---- ------------------------------------------ * New additional object creation system: all objects can be created from/saved to a data object ! * EventHandler was changed to a base class ! * Added CollisionEventHandler, JointBreakEventHandler, and PostStepEventHandler * Collision events now get queued up during collision detection and handled at the end of each time step * Added AccelerationSensor, RaycastSensor, & VolumeSensor Index: todo.txt =================================================================== RCS file: /cvsroot/opal/opal/todo.txt,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** todo.txt 23 Mar 2005 07:54:33 -0000 1.58 --- todo.txt 23 Mar 2005 20:24:31 -0000 1.59 *************** *** 2,10 **** ================= - * make accel sensor only update data upon request; update() just stores the previous vel data - * incline/orientation sensor: measures current orientation relative to an initial orientation; returns 3 reals ! * ray and volume sensors should use contact groups? ray needs a group parameter; volume sensor just uses the volume solid's group * add license notice to samples' source files --- 2,11 ---- ================= * incline/orientation sensor: measures current orientation relative to an initial orientation; returns 3 reals ! * ray and volume sensors should use contact groups to limit collision checks ! - both use contact groups ! - ray has explicit group # which should be passed to the simulator raycast function ! - volume solid just uses its own group # * add license notice to samples' source files *************** *** 23,29 **** - one solution: just use a servo in desired vel mode, set desired vel to 0 - * BeginStepEventHandler - - called at the start of a time step - * dynamic number of contact joints? - depends on types of objects --- 24,27 ---- |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 20:25:12
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22833/src/ODE Modified Files: ODESimulator.cpp ODESimulator.h Log Message: a bunch of minor updates Index: ODESimulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.h,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** ODESimulator.h 23 Mar 2005 07:54:34 -0000 1.66 --- ODESimulator.h 23 Mar 2005 20:24:54 -0000 1.67 *************** *** 98,102 **** virtual const RaycastResult& OPAL_CALL internal_fireRay( ! const Rayr& r, real length, const Solid* attachedSolid); /// Helper function used for ray casting. --- 98,103 ---- virtual const RaycastResult& OPAL_CALL internal_fireRay( ! const Rayr& r, real length, const Solid* attachedSolid, ! unsigned long int rayContactGroup); /// Helper function used for ray casting. Index: ODESimulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.cpp,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** ODESimulator.cpp 21 Mar 2005 04:29:05 -0000 1.92 --- ODESimulator.cpp 23 Mar 2005 20:24:48 -0000 1.93 *************** *** 874,878 **** const RaycastResult& ODESimulator::internal_fireRay(const Rayr& r, ! real length, const Solid* attachedSolid) { Point3r origin = r.getOrigin(); --- 874,879 ---- const RaycastResult& ODESimulator::internal_fireRay(const Rayr& r, ! real length, const Solid* attachedSolid, ! unsigned long int rayContactGroup) { Point3r origin = r.getOrigin(); *************** *** 885,888 **** --- 886,891 ---- mSensorSolid = attachedSolid; + // TODO: use rayContactGroup to limit collision check + dGeomID rayGeomID = dCreateRay(mRootSpaceID, length); dGeomRaySet(rayGeomID, origin[0], origin[1], origin[2], dir[0], *************** *** 908,911 **** --- 911,916 ---- ((ODESolid*)volume)->internal_getGeomDataList(); + // TODO: use the volume's contact group to limit collision check + // Check for collisions with each of the volume Solid's geoms. // This will fill up mVolumeQueryResult with those Solids that |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 07:55:49
|
Update of /cvsroot/opal/web/files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30049/files Modified Files: example.xml ragdoll.xml Log Message: a bunch of little things Index: example.xml =================================================================== RCS file: /cvsroot/opal/web/files/example.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** example.xml 8 Mar 2005 22:37:37 -0000 1.6 --- example.xml 23 Mar 2005 07:55:39 -0000 1.7 *************** *** 116,119 **** --- 116,120 ---- <Type value="attractor"/> <References solid0="object1" solid1="object2"/> + <Enabled value="true"/> <Strength value="1.0"/> <Exponent value="1.0"/> *************** *** 152,155 **** --- 153,157 ---- <References solid="object1"/> <Mode value="linearAndAngular"/> + <AttachOffset x="1.0" y="0.0" z="-4.0"/> <DesiredPos x="10.0" y="-15.0" z="20.0"/> <DesiredForward x="0.0" y="0.0" z="-1.0"/> *************** *** 188,190 **** --- 190,215 ---- <ForcePos x="1.0" y="0.0" z="0.0"/> </Motor> + <Sensor> + <Name value="accelerometer1"/> + <Type value="acceleration"/> + <Offset> + <Transform type="translate" x="0.0" y="2.0" z="0.0"/> + </Offset> + </Sensor> + <Sensor> + <Name value="raySensor1"/> + <Type value="raycast"/> + <References solid="object1"/> + <Offset> + <Transform type="translate" x="1.0" y="2.0" z="5.0"/> + </Offset> + <Ray originx="0.0" originy="0.0" originz="0.0" dirx="0.0" diry="0.0" dirz="-1.0"/> + </Sensor> + <Sensor> + <Name value="volumeSensor1"/> + <Type value="volume"/> + <Offset> + <Transform type="translate" x="10.0" y="-10.0" z="-15.0"/> + </Offset> + </Sensor> </OpalBlueprint> Index: ragdoll.xml =================================================================== RCS file: /cvsroot/opal/web/files/ragdoll.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ragdoll.xml 1 Mar 2005 05:06:35 -0000 1.1 --- ragdoll.xml 23 Mar 2005 07:55:39 -0000 1.2 *************** *** 37,40 **** --- 37,42 ---- <Name value="left shoulder"/> <Type value="universal"/> + <BreakMode value="threshold"/> + <BreakThresh value="0.5"/> <References solid0="upper left arm" solid1="upper torso"/> <Anchor x="0.16" y="0.9" z="0.0"/> *************** *** 112,115 **** --- 114,119 ---- <Name value="right shoulder"/> <Type value="universal"/> + <BreakMode value="threshold"/> + <BreakThresh value="0.5"/> <References solid0="upper right arm" solid1="upper torso"/> <Anchor x="-0.16" y="0.9" z="0.0"/> *************** *** 239,242 **** --- 243,248 ---- <Name value="left hip"/> <Type value="universal"/> + <BreakMode value="threshold"/> + <BreakThresh value="0.5"/> <References solid0="upper left leg" solid1="pelvis"/> <Anchor x="0.08" y="0.58" z="0.0"/> *************** *** 269,272 **** --- 275,280 ---- <Name value="right hip"/> <Type value="universal"/> + <BreakMode value="threshold"/> + <BreakThresh value="0.5"/> <References solid0="upper right leg" solid1="pelvis"/> <Anchor x="-0.08" y="0.58" z="0.0"/> |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 07:55:48
|
Update of /cvsroot/opal/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30049 Modified Files: documentation.html index.html overview.html todo.txt tutorial4.html tutorial5.html Log Message: a bunch of little things Index: overview.html =================================================================== RCS file: /cvsroot/opal/web/overview.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** overview.html 8 Mar 2005 22:37:37 -0000 1.1 --- overview.html 23 Mar 2005 07:55:39 -0000 1.2 *************** *** 25,39 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>99</o:Revision> ! <o:TotalTime>165</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-08T22:33:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>416</o:Words> ! <o:Characters>2372</o:Characters> <o:Company>none</o:Company> <o:Lines>19</o:Lines> <o:Paragraphs>5</o:Paragraphs> ! <o:CharactersWithSpaces>2783</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> --- 25,39 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>101</o:Revision> ! <o:TotalTime>166</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-14T02:03:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>410</o:Words> ! <o:Characters>2341</o:Characters> <o:Company>none</o:Company> <o:Lines>19</o:Lines> <o:Paragraphs>5</o:Paragraphs> ! <o:CharactersWithSpaces>2746</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> *************** *** 89,132 **** /* List Definitions */ @list l0 - {mso-list-id:250621957; - mso-list-template-ids:-759426884;} - @list l0:level1 - {mso-level-number-format:bullet; - mso-level-text:o; - mso-level-tab-stop:.5in; - mso-level-number-position:left; - text-indent:-.25in; - mso-ansi-font-size:10.0pt; - font-family:"Courier New"; - mso-bidi-font-family:"Times New Roman";} - @list l1 - {mso-list-id:331566560; - mso-list-template-ids:-1562768502;} - @list l1:level1 - {mso-level-number-format:bullet; - mso-level-text:o; - mso-level-tab-stop:.5in; - mso-level-number-position:left; - text-indent:-.25in; - mso-ansi-font-size:10.0pt; - font-family:"Courier New"; - mso-bidi-font-family:"Times New Roman";} - @list l2 - {mso-list-id:478962415; - mso-list-template-ids:1417844744;} - @list l2:level1 - {mso-level-number-format:bullet; - mso-level-text:o; - mso-level-tab-stop:.5in; - mso-level-number-position:left; - text-indent:-.25in; - mso-ansi-font-size:10.0pt; - font-family:"Courier New"; - mso-bidi-font-family:"Times New Roman";} - @list l3 {mso-list-id:482813319; mso-list-type:hybrid; mso-list-template-ids:-413384936 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l3:level1 {mso-level-number-format:bullet; mso-level-text:o; --- 89,96 ---- /* List Definitions */ @list l0 {mso-list-id:482813319; mso-list-type:hybrid; mso-list-template-ids:-413384936 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l0:level1 {mso-level-number-format:bullet; mso-level-text:o; *************** *** 135,174 **** text-indent:-.25in; font-family:"Courier New";} ! @list l3:level2 {mso-level-tab-stop:1.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level3 {mso-level-tab-stop:1.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l4 ! {mso-list-id:935554082; ! mso-list-template-ids:1353771306;} ! @list l4:level1 {mso-level-number-format:bullet; mso-level-text:o; --- 99,138 ---- text-indent:-.25in; font-family:"Courier New";} ! @list l0:level2 {mso-level-tab-stop:1.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l0:level3 {mso-level-tab-stop:1.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l0:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l0:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l0:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l0:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l0:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l0:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l1 ! {mso-list-id:656420500; ! mso-list-template-ids:845460874;} ! @list l1:level1 {mso-level-number-format:bullet; mso-level-text:o; *************** *** 179,186 **** font-family:"Courier New"; mso-bidi-font-family:"Times New Roman";} ! @list l5 ! {mso-list-id:977732788; ! mso-list-template-ids:1142328856;} ! @list l5:level1 {mso-level-number-format:bullet; mso-level-text:o; --- 143,150 ---- font-family:"Courier New"; mso-bidi-font-family:"Times New Roman";} ! @list l2 ! {mso-list-id:715738970; ! mso-list-template-ids:-156204528;} ! @list l2:level1 {mso-level-number-format:bullet; mso-level-text:o; *************** *** 191,199 **** font-family:"Courier New"; mso-bidi-font-family:"Times New Roman";} ! @list l6 {mso-list-id:1377509408; mso-list-type:hybrid; mso-list-template-ids:986361314 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l6:level1 {mso-level-number-format:bullet; mso-level-text:o; --- 155,175 ---- font-family:"Courier New"; mso-bidi-font-family:"Times New Roman";} ! @list l3 ! {mso-list-id:983702192; ! mso-list-template-ids:-170239138;} ! @list l3:level1 ! {mso-level-number-format:bullet; ! mso-level-text:o; ! mso-level-tab-stop:.5in; ! mso-level-number-position:left; ! text-indent:-.25in; ! mso-ansi-font-size:10.0pt; ! font-family:"Courier New"; ! mso-bidi-font-family:"Times New Roman";} ! @list l4 {mso-list-id:1377509408; mso-list-type:hybrid; mso-list-template-ids:986361314 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l4:level1 {mso-level-number-format:bullet; mso-level-text:o; *************** *** 202,240 **** text-indent:-.25in; font-family:"Courier New";} ! @list l6:level2 {mso-level-tab-stop:1.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level3 {mso-level-tab-stop:1.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} @list l7 ! {mso-list-id:1543900918; ! mso-list-template-ids:1052961724;} @list l7:level1 {mso-level-number-format:bullet; --- 178,240 ---- text-indent:-.25in; font-family:"Courier New";} ! @list l4:level2 {mso-level-tab-stop:1.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l4:level3 {mso-level-tab-stop:1.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l4:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l4:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l4:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l4:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l4:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l4:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} + @list l5 + {mso-list-id:1513841182; + mso-list-template-ids:-1329964620;} + @list l5:level1 + {mso-level-number-format:bullet; + mso-level-text:o; + mso-level-tab-stop:.5in; + mso-level-number-position:left; + text-indent:-.25in; + mso-ansi-font-size:10.0pt; + font-family:"Courier New"; + mso-bidi-font-family:"Times New Roman";} + @list l6 + {mso-list-id:1595700106; + mso-list-template-ids:-1490765852;} + @list l6:level1 + {mso-level-number-format:bullet; + mso-level-text:o; + mso-level-tab-stop:.5in; + mso-level-number-position:left; + text-indent:-.25in; + mso-ansi-font-size:10.0pt; + font-family:"Courier New"; + mso-bidi-font-family:"Times New Roman";} @list l7 ! {mso-list-id:1639534727; ! mso-list-template-ids:-15305864;} @list l7:level1 {mso-level-number-format:bullet; *************** *** 247,252 **** mso-bidi-font-family:"Times New Roman";} @list l8 ! {mso-list-id:1660957522; ! mso-list-template-ids:524451748;} @list l8:level1 {mso-level-number-format:bullet; --- 247,252 ---- mso-bidi-font-family:"Times New Roman";} @list l8 ! {mso-list-id:1709839771; ! mso-list-template-ids:1166598308;} @list l8:level1 {mso-level-number-format:bullet; *************** *** 259,264 **** mso-bidi-font-family:"Times New Roman";} @list l9 ! {mso-list-id:2121534931; ! mso-list-template-ids:-289104414;} @list l9:level1 {mso-level-number-format:bullet; --- 259,264 ---- mso-bidi-font-family:"Times New Roman";} @list l9 ! {mso-list-id:1751123910; ! mso-list-template-ids:-308625084;} @list l9:level1 {mso-level-number-format:bullet; *************** *** 293,297 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="48130"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 293,297 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="49154"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 328,335 **** style='font-size:20.0pt;font-family:"Book Antiqua";color:black'>Introduction<o:p></o:p></span></b></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This is ! a short, simple overview of <span class=SpellE>OPALs</span> components.<span ! style='mso-spacerun:yes'> </span>It is meant to give you a general ! understanding of how the different objects work together.<span style='mso-spacerun:yes'> </span>It will first cover the most important OPAL objects, <span class=GramE>then</span> describe a few others that arent as --- 328,335 ---- style='font-size:20.0pt;font-family:"Book Antiqua";color:black'>Introduction<o:p></o:p></span></b></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This ! is a short, simple overview of <span class=SpellE>OPALs</span> ! components.<span style='mso-spacerun:yes'> </span>It is meant to give you a ! general understanding of how the different objects work together.<span style='mso-spacerun:yes'> </span>It will first cover the most important OPAL objects, <span class=GramE>then</span> describe a few others that arent as *************** *** 346,350 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l6 level1 lfo3;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Simulators</span></b><span --- 346,350 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l4 level1 lfo3;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Simulators</span></b><span *************** *** 356,373 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l6 level1 lfo3;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Solids</span></b><span style='font-family:"Book Antiqua"'>: A Solid is analogous to a physical object in the real world.<span style='mso-spacerun:yes'> </span>It can ! be static (just a shape, not physically simulated) or dynamic (has a shape, ! mass, and is physically simulated).<span style='mso-spacerun:yes'> ! </span>It contains no moving parts.<span style='mso-spacerun:yes'> ! </span>Complex objects with moving parts can be built from multiple ! Solids with Joints.<o:p></o:p></span></li> </ul> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l6 level1 lfo3;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Joints</span></b><span --- 356,373 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l4 level1 lfo3;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Solids</span></b><span style='font-family:"Book Antiqua"'>: A Solid is analogous to a physical object in the real world.<span style='mso-spacerun:yes'> </span>It can ! be static (just a shape, not physically simulated) or dynamic (has a ! shape, mass, and is physically simulated).<span ! style='mso-spacerun:yes'> </span>It contains no moving parts.<span ! style='mso-spacerun:yes'> </span>Complex objects with moving parts can ! be built from multiple Solids with Joints.<o:p></o:p></span></li> </ul> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l4 level1 lfo3;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Joints</span></b><span *************** *** 379,383 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l6 level1 lfo3;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Motors</span></b><span --- 379,383 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l4 level1 lfo3;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Motors</span></b><span *************** *** 389,400 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l6 level1 lfo3;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Sensors</span></b><span style='font-family:"Book Antiqua"'>: Sensors acquire data from a ! simulation.<span style='mso-spacerun:yes'> </span>There are several types ! of Sensors.<span style='mso-spacerun:yes'> </span>Some can be attached ! to Solids, some can be set to a static position in the environment, and ! some can work either way.<o:p></o:p></span></li> </ul> <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: --- 389,400 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l4 level1 lfo3;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Sensors</span></b><span style='font-family:"Book Antiqua"'>: Sensors acquire data from a ! simulation.<span style='mso-spacerun:yes'> </span>There are several ! types of Sensors.<span style='mso-spacerun:yes'> </span>They can be ! attached to Solids or just positioned <span class=SpellE>staticly</span> ! within an environment.<o:p></o:p></span></li> </ul> <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: *************** *** 406,410 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l3 level1 lfo10;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Shapes</span></b><span --- 406,410 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l0 level1 lfo10;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Shapes</span></b><span *************** *** 418,422 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l3 level1 lfo10;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua";mso-bidi-font-family: --- 418,422 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l0 level1 lfo10;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua";mso-bidi-font-family: *************** *** 430,434 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l3 level1 lfo10;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Data objects and --- 430,434 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <ul style='margin-top:0in' type=circle> ! <li class=MsoNormal style='color:black;mso-list:l0 level1 lfo10;tab-stops: list .5in'><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua"'>Data objects and *************** *** 437,442 **** object in detail.<span style='mso-spacerun:yes'> </span>These data structures can be built from scratch and used to generate several ! identical objects.<span style='mso-spacerun:yes'> </span>They can be ! retrieved from an existing object and used to make clones.<span style='mso-spacerun:yes'> </span>They can also be used to construct OPAL Blueprints.<span style='mso-spacerun:yes'> </span>Blueprints are --- 437,442 ---- object in detail.<span style='mso-spacerun:yes'> </span>These data structures can be built from scratch and used to generate several ! identical objects.<span style='mso-spacerun:yes'> </span>They can be retrieved ! from an existing object and used to make clones.<span style='mso-spacerun:yes'> </span>They can also be used to construct OPAL Blueprints.<span style='mso-spacerun:yes'> </span>Blueprints are Index: tutorial5.html =================================================================== RCS file: /cvsroot/opal/web/tutorial5.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tutorial5.html 4 Mar 2005 03:45:32 -0000 1.1 --- tutorial5.html 23 Mar 2005 07:55:39 -0000 1.2 *************** *** 25,44 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>138</o:Revision> ! <o:TotalTime>257</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-04T03:44:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>38</o:Words> ! <o:Characters>223</o:Characters> <o:Company>none</o:Company> ! <o:Lines>1</o:Lines> ! <o:Paragraphs>1</o:Paragraphs> ! <o:CharactersWithSpaces>260</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> - <w:Zoom>90</w:Zoom> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> --- 25,43 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>145</o:Revision> ! <o:TotalTime>269</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-14T02:20:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>269</o:Words> ! <o:Characters>1535</o:Characters> <o:Company>none</o:Company> ! <o:Lines>12</o:Lines> ! <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1801</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> *************** *** 49,52 **** --- 48,59 ---- /* Font Definitions */ @font-face + {font-family:Courier; + panose-1:2 7 4 9 2 2 5 2 4 4; + mso-font-charset:0; + mso-generic-font-family:modern; + mso-font-format:other; + mso-font-pitch:fixed; + mso-font-signature:3 0 0 0 1 0;} + @font-face {font-family:"Book Antiqua"; panose-1:2 4 6 2 5 3 5 3 3 4; *************** *** 100,104 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="57346"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 107,111 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="59394"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 133,138 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Sensors ! are not yet implemented <o:p></o:p></span></p> </td> </tr> --- 140,274 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>A ! Sensor acquires information from a simulation.<span ! style='mso-spacerun:yes'> </span>There are several types of Sensors, ! including Acceleration Sensors, Raycast Sensors, Velocity Sensors, and Volume ! Sensors.<span style='mso-spacerun:yes'> </span>This tutorial will show how ! to setup each type.<span style='mso-spacerun:yes'> </span>It will also give ! examples of how each type could be used.<span style='mso-spacerun:yes'> ! </span>Keep in mind that a Sensor can either be attached to a Solid or just ! positioned somewhere in the environment.<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Lets ! first create all the objects well need (and assume they will be initialized ! elsewhere):<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left ! style='background:silver;border-collapse:collapse;border:none;mso-border-alt: ! solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: ! 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: ! page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> ! <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> ! <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; ! mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; ! height:22.95pt'> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Simulator* ! sim = opal::createSimulator();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Solid* ! solid = sim->createSolid();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! </td> ! </tr> ! </table> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The ! first Sensor we will make here is an Acceleration Sensor:<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left ! style='background:silver;border-collapse:collapse;border:none;mso-border-alt: ! solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: ! 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: ! page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> ! <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> ! <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; ! mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; ! height:22.95pt'> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::AccelerationSensorData ! data;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.solid ! = solid;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.strength ! = 10.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.exponent ! = 2.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::AttractorMotor* ! attractor = sim->createAttractorMotor();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>attractor->init(data);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! </td> ! </tr> ! </table> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This ! Attractor Motor will constantly apply forces to the two Solids to make them ! gravitate toward one another.<span style='mso-spacerun:yes'> </span>This ! makes it easy to simulate planetary gravitation or magnetic attraction.<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Next, ! lets make a Geared Motor:<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left ! style='background:silver;border-collapse:collapse;border:none;mso-border-alt: ! solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: ! 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: ! page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> ! <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> ! <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; ! mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; ! height:22.95pt'> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::GearedMotorData ! data;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.joint ! = joint;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.jointAxisNum ! = 0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.maxTorque ! = 10.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>data.maxVelocity ! = 2000.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal:: ! GearedMotor* engine = sim->createGearedMotor();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>engine->init(data);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>engine->setThrottle(0.5);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! </td> ! </tr> ! </table> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The Geared ! Motors throttle should now be updated as desired.<span ! style='mso-spacerun:yes'> </span>The Motor will have more torque available ! when its angular velocity is low.<span style='mso-spacerun:yes'> </span>As ! it approaches its max velocity, it will apply less and less torque.<span ! style='mso-spacerun:yes'> </span>This Motor is great for simulating ! automobile engines.<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> Index: index.html =================================================================== RCS file: /cvsroot/opal/web/index.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.html 8 Mar 2005 16:20:50 -0000 1.5 --- index.html 23 Mar 2005 07:55:39 -0000 1.6 *************** *** 25,39 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>94</o:Revision> ! <o:TotalTime>185</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-05T21:23:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>353</o:Words> ! <o:Characters>2014</o:Characters> <o:Company>none</o:Company> ! <o:Lines>16</o:Lines> ! <o:Paragraphs>4</o:Paragraphs> ! <o:CharactersWithSpaces>2363</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> --- 25,39 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>98</o:Revision> ! <o:TotalTime>189</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-23T07:18:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>377</o:Words> ! <o:Characters>2155</o:Characters> <o:Company>none</o:Company> ! <o:Lines>17</o:Lines> ! <o:Paragraphs>5</o:Paragraphs> ! <o:CharactersWithSpaces>2527</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> *************** *** 81,86 **** /* List Definitions */ @list l0 ! {mso-list-id:115409783; ! mso-list-template-ids:551446078;} @list l0:level1 {mso-level-number-format:bullet; --- 81,86 ---- /* List Definitions */ @list l0 ! {mso-list-id:171844398; ! mso-list-template-ids:-869517624;} @list l0:level1 {mso-level-number-format:bullet; *************** *** 92,97 **** font-family:Symbol;} @list l1 ! {mso-list-id:291595687; ! mso-list-template-ids:152726192;} @list l1:level1 {mso-level-number-format:bullet; --- 92,97 ---- font-family:Symbol;} @list l1 ! {mso-list-id:436142960; ! mso-list-template-ids:859236786;} @list l1:level1 {mso-level-number-format:bullet; *************** *** 146,153 **** text-indent:-.25in;} @list l3 {mso-list-id:1390494904; mso-list-type:hybrid; mso-list-template-ids:-143351670 67698689 67698689 67698691 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l3:level1 {mso-level-number-format:bullet; mso-level-text:\F0B7; --- 146,197 ---- text-indent:-.25in;} @list l3 + {mso-list-id:577516275; + mso-list-template-ids:-1370983320;} + @list l3:level1 + {mso-level-number-format:bullet; + mso-level-text:\F0B7; + mso-level-tab-stop:.5in; + mso-level-number-position:left; + text-indent:-.25in; + mso-ansi-font-size:10.0pt; + font-family:Symbol;} + @list l4 + {mso-list-id:580214128; + mso-list-template-ids:-1706784210;} + @list l4:level1 + {mso-level-number-format:bullet; + mso-level-text:\F0B7; + mso-level-tab-stop:.5in; + mso-level-number-position:left; + text-indent:-.25in; + mso-ansi-font-size:10.0pt; + font-family:Symbol;} + @list l5 + {mso-list-id:746732468; + mso-list-template-ids:1762963106;} + @list l5:level1 + {mso-level-number-format:bullet; + mso-level-text:\F0B7; + mso-level-tab-stop:.5in; + mso-level-number-position:left; + text-indent:-.25in; + mso-ansi-font-size:10.0pt; + font-family:Symbol;} + @list l6 + {mso-list-id:1383825032; + mso-list-template-ids:82584310;} + @list l6:level1 + {mso-level-number-format:bullet; + mso-level-text:\F0B7; + mso-level-tab-stop:.5in; + mso-level-number-position:left; + text-indent:-.25in; + mso-ansi-font-size:10.0pt; + font-family:Symbol;} + @list l7 {mso-list-id:1390494904; mso-list-type:hybrid; mso-list-template-ids:-143351670 67698689 67698689 67698691 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l7:level1 {mso-level-number-format:bullet; mso-level-text:\F0B7; *************** *** 156,160 **** text-indent:-.25in; font-family:Symbol;} ! @list l3:level2 {mso-level-number-format:bullet; mso-level-text:\F0B7; --- 200,204 ---- text-indent:-.25in; font-family:Symbol;} ! @list l7:level2 {mso-level-number-format:bullet; mso-level-text:\F0B7; *************** *** 164,168 **** text-indent:-.25in; font-family:Symbol;} ! @list l3:level3 {mso-level-number-format:bullet; mso-level-text:o; --- 208,212 ---- text-indent:-.25in; font-family:Symbol;} ! @list l7:level3 {mso-level-number-format:bullet; mso-level-text:o; *************** *** 171,214 **** text-indent:-.25in; font-family:"Courier New";} ! @list l3:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l3:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l4 ! {mso-list-id:1435324032; ! mso-list-template-ids:2048665346;} ! @list l4:level1 ! {mso-level-number-format:bullet; ! mso-level-text:\F0B7; ! mso-level-tab-stop:.5in; ! mso-level-number-position:left; ! text-indent:-.25in; ! mso-ansi-font-size:10.0pt; ! font-family:Symbol;} ! @list l5 {mso-list-id:1754929923; mso-list-type:hybrid; mso-list-template-ids:339369474 67698689 67698689 67698691 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l5:level1 {mso-level-number-format:bullet; mso-level-text:\F0B7; --- 215,247 ---- text-indent:-.25in; font-family:"Courier New";} ! @list l7:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l8 {mso-list-id:1754929923; mso-list-type:hybrid; mso-list-template-ids:339369474 67698689 67698689 67698691 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l8:level1 {mso-level-number-format:bullet; mso-level-text:\F0B7; *************** *** 217,221 **** text-indent:-.25in; font-family:Symbol;} ! @list l5:level2 {mso-level-number-format:bullet; mso-level-text:\F0B7; --- 250,254 ---- text-indent:-.25in; font-family:Symbol;} ! @list l8:level2 {mso-level-number-format:bullet; mso-level-text:\F0B7; *************** *** 225,229 **** text-indent:-.25in; font-family:Symbol;} ! @list l5:level3 {mso-level-number-format:bullet; mso-level-text:o; --- 258,262 ---- text-indent:-.25in; font-family:Symbol;} ! @list l8:level3 {mso-level-number-format:bullet; mso-level-text:o; *************** *** 232,264 **** text-indent:-.25in; font-family:"Courier New";} ! @list l5:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l5:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l5:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l5:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l5:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l5:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6 {mso-list-id:1756780587; mso-list-type:hybrid; mso-list-template-ids:1949436616 67698689 67698689 67698691 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l6:level1 {mso-level-number-format:bullet; mso-level-text:\F0B7; --- 265,297 ---- text-indent:-.25in; font-family:"Courier New";} ! @list l8:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l8:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l8:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l8:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l8:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l8:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l9 {mso-list-id:1756780587; mso-list-type:hybrid; mso-list-template-ids:1949436616 67698689 67698689 67698691 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l9:level1 {mso-level-number-format:bullet; mso-level-text:\F0B7; *************** *** 267,271 **** text-indent:-.25in; font-family:Symbol;} ! @list l6:level2 {mso-level-number-format:bullet; mso-level-text:\F0B7; --- 300,304 ---- text-indent:-.25in; font-family:Symbol;} ! @list l9:level2 {mso-level-number-format:bullet; mso-level-text:\F0B7; *************** *** 275,279 **** text-indent:-.25in; font-family:Symbol;} ! @list l6:level3 {mso-level-number-format:bullet; mso-level-text:o; --- 308,312 ---- text-indent:-.25in; font-family:Symbol;} ! @list l9:level3 {mso-level-number-format:bullet; mso-level-text:o; *************** *** 282,314 **** text-indent:-.25in; font-family:"Courier New";} ! @list l6:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l6:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7 {mso-list-id:1774857287; mso-list-type:hybrid; mso-list-template-ids:-937668496 67698689 67698689 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l7:level1 {mso-level-number-format:bullet; mso-level-text:\F0B7; --- 315,347 ---- text-indent:-.25in; font-family:"Courier New";} ! @list l9:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l9:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l9:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l9:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l9:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l9:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l10 {mso-list-id:1774857287; mso-list-type:hybrid; mso-list-template-ids:-937668496 67698689 67698689 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} ! @list l10:level1 {mso-level-number-format:bullet; mso-level-text:\F0B7; *************** *** 317,321 **** text-indent:-.25in; font-family:Symbol;} ! @list l7:level2 {mso-level-number-format:bullet; mso-level-text:\F0B7; --- 350,354 ---- text-indent:-.25in; font-family:Symbol;} ! @list l10:level2 {mso-level-number-format:bullet; mso-level-text:\F0B7; *************** *** 325,371 **** text-indent:-.25in; font-family:Symbol;} ! @list l7:level3 {mso-level-tab-stop:1.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l7:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l8 ! {mso-list-id:1782603386; ! mso-list-template-ids:-2078486872;} ! @list l8:level1 ! {mso-level-number-format:bullet; ! mso-level-text:\F0B7; ! mso-level-tab-stop:.5in; ! mso-level-number-position:left; ! text-indent:-.25in; ! mso-ansi-font-size:10.0pt; ! font-family:Symbol;} ! @list l9 ! {mso-list-id:1798143110; ! mso-list-template-ids:-325428240;} ! @list l9:level1 {mso-level-number-format:bullet; mso-level-text:\F0B7; --- 358,393 ---- text-indent:-.25in; font-family:Symbol;} ! @list l10:level3 {mso-level-tab-stop:1.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l10:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l10:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l10:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l10:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l10:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} ! @list l10:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ! @list l11 ! {mso-list-id:1867909557; ! mso-list-template-ids:1077425990;} ! @list l11:level1 {mso-level-number-format:bullet; mso-level-text:\F0B7; *************** *** 398,402 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="45058"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 420,424 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="47106"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 498,528 **** Features<o:p></o:p></span></b></p> <ul style='margin-top:0in' type=disc> ! <li class=MsoNormal style='color:black;mso-list:l7 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Open Source<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l7 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Cross-platform<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l7 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Tested on Linux, Irix, Windows, and Mac OS X<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l7 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>XML file loading<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l7 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Breakable joints<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l7 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Linear and angular motion damping<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l7 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Per-shape material settings<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l7 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Collision detection primitive shapes<o:p></o:p></span></li> </ul> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l6 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> --- 520,553 ---- Features<o:p></o:p></span></b></p> <ul style='margin-top:0in' type=disc> ! <li class=MsoNormal style='color:black;mso-list:l10 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Open Source<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l10 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Cross-platform<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l10 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Tested on Linux, Irix, Windows, and Mac OS X<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l10 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>XML file loading<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l10 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Breakable joints<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l10 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Linear and angular motion damping<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l10 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Per-shape material settings<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l10 level1 lfo6;tab-stops: ! list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: ! Arial'>Contact groups (define which objects can interact physically)<o:p></o:p></span></li> ! <li class=MsoNormal style='color:black;mso-list:l10 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Collision detection primitive shapes<o:p></o:p></span></li> </ul> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l9 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> *************** *** 530,534 **** mso-bidi-font-family:Arial;color:black'>Boxes<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l6 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> --- 555,559 ---- mso-bidi-font-family:Arial;color:black'>Boxes<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l9 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> *************** *** 536,540 **** mso-bidi-font-family:Arial;color:black'>Spheres<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l6 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> --- 561,565 ---- mso-bidi-font-family:Arial;color:black'>Spheres<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l9 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> *************** *** 542,546 **** mso-bidi-font-family:Arial;color:black'>Capsules (i.e. capped cylinders)<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l6 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> --- 567,571 ---- mso-bidi-font-family:Arial;color:black'>Capsules (i.e. capped cylinders)<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l9 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> *************** *** 548,557 **** mso-bidi-font-family:Arial;color:black'>Planes<o:p></o:p></span></p> <ul style='margin-top:0in' type=disc> ! <li class=MsoNormal style='color:black;mso-list:l7 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Joints<o:p></o:p></span></li> </ul> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l5 level3 lfo11;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> --- 573,582 ---- mso-bidi-font-family:Arial;color:black'>Planes<o:p></o:p></span></p> <ul style='margin-top:0in' type=disc> ! <li class=MsoNormal style='color:black;mso-list:l10 level1 lfo6;tab-stops: list .5in'><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial'>Joints<o:p></o:p></span></li> </ul> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l8 level3 lfo11;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> *************** *** 560,564 **** of freedom)<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l5 level3 lfo11;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> --- 585,589 ---- of freedom)<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l8 level3 lfo11;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> *************** *** 567,571 **** degrees of freedom)<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l5 level3 lfo11;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'... [truncated message content] |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 07:55:03
|
Update of /cvsroot/opal/opal/vc7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29501/vc7 Modified Files: opal-ode.vcproj Log Message: finished AccelerationSensor; remove VelocitySensor because the existing Solid velocity functions render it useless Index: opal-ode.vcproj =================================================================== RCS file: /cvsroot/opal/opal/vc7/opal-ode.vcproj,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** opal-ode.vcproj 21 Mar 2005 04:29:06 -0000 1.20 --- opal-ode.vcproj 23 Mar 2005 07:54:35 -0000 1.21 *************** *** 170,176 **** </File> <File - RelativePath="..\src\VelocitySensor.cpp"> - </File> - <File RelativePath="..\src\VolumeSensor.cpp"> </File> --- 170,173 ---- *************** *** 306,315 **** </File> <File - RelativePath="..\src\VelocitySensor.h"> - </File> - <File - RelativePath="..\src\VelocitySensorData.h"> - </File> - <File RelativePath="..\src\VolumeSensor.h"> </File> --- 303,306 ---- |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 07:54:59
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29501 Modified Files: changelog.txt todo.txt Log Message: finished AccelerationSensor; remove VelocitySensor because the existing Solid velocity functions render it useless Index: changelog.txt =================================================================== RCS file: /cvsroot/opal/opal/changelog.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** changelog.txt 12 Mar 2005 01:21:07 -0000 1.11 --- changelog.txt 23 Mar 2005 07:54:33 -0000 1.12 *************** *** 5,9 **** * EventHandler was changed to a base class for CollisionEventHandler and JointBreakEventHandler * Collision events now get queued up during collision detection and handled at the end of each time step ! * Added RaycastSensor, VolumeSensor * Overhauled XML loading system; now all Solid, Shape, Joint, Motor, and Sensor data can be loaded from OPAL XML files * Joints have a parameter to allow contacts between connected Solids or not --- 5,9 ---- * EventHandler was changed to a base class for CollisionEventHandler and JointBreakEventHandler * Collision events now get queued up during collision detection and handled at the end of each time step ! * Added AccelerationSensor, RaycastSensor, & VolumeSensor * Overhauled XML loading system; now all Solid, Shape, Joint, Motor, and Sensor data can be loaded from OPAL XML files * Joints have a parameter to allow contacts between connected Solids or not Index: todo.txt =================================================================== RCS file: /cvsroot/opal/opal/todo.txt,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** todo.txt 23 Mar 2005 04:52:37 -0000 1.57 --- todo.txt 23 Mar 2005 07:54:33 -0000 1.58 *************** *** 2,30 **** ================= ! * add license notice to samples' source files ! * additional sensors ! - incline/orientation relative to an initial orientation * ray and volume sensors should use contact groups? ray needs a group parameter; volume sensor just uses the volume solid's group ! * finish implementing accel and vel sensors ! ! * accel and vel sensors: ! - parse from xml ! - add to xml example ! - add to instantiateBlueprint ! - add to Blueprint finalize function ! - add to Blueprint addSensor function ! ! * implement sensors ! - RaycastSensor (i.e. "PSD (position sensitive detector)" or "rangefinder"): measures distance from sensor to first intersection (attach to a solid [be sure to ignore collisions with the attached solid] or nothing) ! - not updated regularly; must be updated manually by user ! - VolumeSensor (i.e. "proximity sensor?"): similar to RaycastSensor, but for a volume; finds all Solids colliding with a given (attached) Solid ! - not updated regularly; must be updated manually by user ! - should this be combined with trigger solids? probably not: ProximitySensors are one-time, triggers are always updated (triggers are actually just solids with a ContactSensor and don't generate contact joints) ! - VelocitySensor: linear vel (i.e. "velocimeter") and/or angular vel ("gyroscope") sensor ! - AccelerationSensor (i.e. "accelerometer"): linear and/or angular acceleration sensor ! - InclineSensor (i.e. "inclinometer"): measures angle between initial and current orientation * make trimeshes work --- 2,12 ---- ================= ! * make accel sensor only update data upon request; update() just stores the previous vel data ! * incline/orientation sensor: measures current orientation relative to an initial orientation; returns 3 reals * ray and volume sensors should use contact groups? ray needs a group parameter; volume sensor just uses the volume solid's group ! * add license notice to samples' source files * make trimeshes work *************** *** 155,157 **** - doesn't need to be updated every step (maybe once per second) ! --- 137,146 ---- - doesn't need to be updated every step (maybe once per second) ! Miscellaneous Notes ! =================== ! * Things to do for new Motors and Sensors: ! - parse from xml ! - add to xml example ! - add to instantiateBlueprint ! - add to Blueprint finalize function ! - add to Blueprint addSensor/addMotor function \ No newline at end of file |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 07:54:44
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29501/src/ODE Modified Files: ODESimulator.h ODESolid.cpp ODESolid.h Log Message: finished AccelerationSensor; remove VelocitySensor because the existing Solid velocity functions render it useless Index: ODESimulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.h,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** ODESimulator.h 14 Mar 2005 05:18:26 -0000 1.65 --- ODESimulator.h 23 Mar 2005 07:54:34 -0000 1.66 *************** *** 34,38 **** #include "../AccelerationSensor.h" #include "../RaycastSensor.h" - #include "../VelocitySensor.h" #include "../VolumeSensor.h" #include "ODESolid.h" --- 34,37 ---- Index: ODESolid.h =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESolid.h,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** ODESolid.h 10 Mar 2005 21:11:05 -0000 1.65 --- ODESolid.h 23 Mar 2005 07:54:35 -0000 1.66 *************** *** 93,96 **** --- 93,99 ---- virtual Vec3r OPAL_CALL getLocalLinearVel()const; + virtual Vec3r OPAL_CALL getLocalLinearVelAtLocalPos( + const Point3r& p)const; + virtual void OPAL_CALL setLocalAngularVel(const Vec3r& vel); *************** *** 101,104 **** --- 104,110 ---- virtual Vec3r OPAL_CALL getGlobalLinearVel()const; + virtual Vec3r OPAL_CALL getGlobalLinearVelAtLocalPos( + const Point3r& p)const; + virtual void OPAL_CALL setGlobalAngularVel(const Vec3r& vel); Index: ODESolid.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESolid.cpp,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** ODESolid.cpp 21 Mar 2005 03:53:57 -0000 1.77 --- ODESolid.cpp 23 Mar 2005 07:54:34 -0000 1.78 *************** *** 652,655 **** --- 652,657 ---- { const dReal* vel = dBodyGetLinearVel(mBodyID); + + // Convert the vector from global to local coordinates. dVector3 localVel; dBodyVectorFromWorld(mBodyID, vel[0], vel[1], vel[2], localVel); *************** *** 662,665 **** --- 664,686 ---- } + Vec3r ODESolid::getLocalLinearVelAtLocalPos(const Point3r& p)const + { + if (!mData.isStatic) + { + // First find the global velocity at the given point. + dVector3 result; + dBodyGetRelPointVel(mBodyID, p[0], p[1], p[2], result); + + // Now convert the velocity from global to local coordinates. + dBodyVectorFromWorld(mBodyID, result[0], result[1], result[2], + result); + return Vec3r(result[0], result[1], result[2]); + } + else + { + return Vec3r(0,0,0); + } + } + void ODESolid::setLocalAngularVel(const Vec3r& vel) { *************** *** 679,682 **** --- 700,705 ---- { const dReal* vel = dBodyGetAngularVel(mBodyID); + + // Convert the vector from global to local coordinates. dVector3 localVel; dBodyVectorFromWorld(mBodyID, vel[0], vel[1], vel[2], localVel); *************** *** 711,714 **** --- 734,752 ---- } + Vec3r ODESolid::getGlobalLinearVelAtLocalPos(const Point3r& p)const + { + if (!mData.isStatic) + { + // First find the global velocity at the given point. + dVector3 result; + dBodyGetRelPointVel(mBodyID, p[0], p[1], p[2], result); + return Vec3r(result[0], result[1], result[2]); + } + else + { + return Vec3r(0,0,0); + } + } + void ODESolid::setGlobalAngularVel(const Vec3r& vel) { |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 07:54:43
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29501/src Modified Files: AccelerationSensor.cpp AccelerationSensor.h Blueprint.cpp BlueprintManager.cpp BlueprintManager.h SConscript SensorData.h Simulator.cpp Simulator.h Solid.cpp Solid.h opal.h Removed Files: VelocitySensor.cpp VelocitySensor.h VelocitySensorData.h Log Message: finished AccelerationSensor; remove VelocitySensor because the existing Solid velocity functions render it useless Index: Blueprint.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Blueprint.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Blueprint.cpp 13 Mar 2005 23:07:09 -0000 1.18 --- Blueprint.cpp 23 Mar 2005 07:54:33 -0000 1.19 *************** *** 36,39 **** --- 36,40 ---- #include "ThrusterMotorData.h" #include "SensorData.h" + #include "AccelerationSensorData.h" #include "RaycastSensorData.h" #include "VolumeSensorData.h" *************** *** 348,358 **** switch(data->getType()) { ! //case ACCELERATION_SENSOR: ! //{ ! // newData = ! // new AccelerationSensorData( ! // *((AccelerationSensorData*)data)); ! // break; ! //} case RAYCAST_SENSOR: { --- 349,359 ---- switch(data->getType()) { ! case ACCELERATION_SENSOR: ! { ! newData = ! new AccelerationSensorData( ! *((AccelerationSensorData*)data)); ! break; ! } case RAYCAST_SENSOR: { *************** *** 361,369 **** break; } - //case VELOCITY_SENSOR: - //{ - // newData = - // new VelocitySensorData(*((VelocitySensorData*)data)); - //} case VOLUME_SENSOR: { --- 362,365 ---- Index: AccelerationSensor.h =================================================================== RCS file: /cvsroot/opal/opal/src/AccelerationSensor.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AccelerationSensor.h 23 Mar 2005 04:04:30 -0000 1.2 --- AccelerationSensor.h 23 Mar 2005 07:54:33 -0000 1.3 *************** *** 35,38 **** --- 35,40 ---- namespace opal { + class Simulator; + /// A Sensor that monitors the linear and angular acceleration of a /// Solid. Using its transform, it can be set to a desired offset from *************** *** 42,46 **** { public: ! AccelerationSensor(); virtual ~AccelerationSensor(); --- 44,48 ---- { public: ! AccelerationSensor(Simulator* s); virtual ~AccelerationSensor(); *************** *** 55,69 **** virtual const AccelerationSensorData& OPAL_CALL getData()const; ! /// Returns the Sensor's global linear acceleration. ! virtual real OPAL_CALL getGlobalLinearAccel()const; ! /// Returns the Sensor's global angular acceleration. ! virtual real OPAL_CALL getGlobalAngularAccel()const; ! /// Returns the Sensor's local linear acceleration. ! virtual real OPAL_CALL getLocalLinearAccel()const; ! /// Returns the Sensor's local angular acceleration. ! virtual real OPAL_CALL getLocalAngularAccel()const; virtual void OPAL_CALL setEnabled(bool e); --- 57,75 ---- virtual const AccelerationSensorData& OPAL_CALL getData()const; ! /// Returns the Sensor's global linear acceleration. If the Sensor ! /// is not attached to a Solid, this returns (0, 0, 0). ! virtual Vec3r OPAL_CALL getGlobalLinearAccel()const; ! /// Returns the Sensor's global angular acceleration. If the Sensor ! /// is not attached to a Solid, this returns (0, 0, 0). ! virtual Vec3r OPAL_CALL getGlobalAngularAccel()const; ! /// Returns the Sensor's local linear acceleration. If the Sensor ! /// is not attached to a Solid, this returns (0, 0, 0). ! virtual Vec3r OPAL_CALL getLocalLinearAccel()const; ! /// Returns the Sensor's local angular acceleration. If the Sensor ! /// is not attached to a Solid, this returns (0, 0, 0). ! virtual Vec3r OPAL_CALL getLocalAngularAccel()const; virtual void OPAL_CALL setEnabled(bool e); *************** *** 89,92 **** --- 95,130 ---- AccelerationSensorData mData; + /// Pointer to the Simulator containing this Sensor. This is used + /// to get an accurate dt value on every update. + Simulator* mSim; + + /// Stored copy of the current global linear acceleration. + Vec3r mGlobalLinearAccel; + + /// Stored copy of the current global angular acceleration. + Vec3r mGlobalAngularAccel; + + /// Stored copy of the current local linear acceleration. + Vec3r mLocalLinearAccel; + + /// Stored copy of the current local angular acceleration. + Vec3r mLocalAngularAccel; + + /// Stored copy of the previous step's velocity data; used for + /// acceleration calculations. + Vec3r mPrevGlobalLinearVel; + + /// Stored copy of the previous step's velocity data; used for + /// acceleration calculations. + Vec3r mPrevGlobalAngularVel; + + /// Stored copy of the previous step's velocity data; used for + /// acceleration calculations. + Vec3r mPrevLocalLinearVel; + + /// Stored copy of the previous step's velocity data; used for + /// acceleration calculations. + Vec3r mPrevLocalAngularVel; + private: }; Index: opal.h =================================================================== RCS file: /cvsroot/opal/opal/src/opal.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** opal.h 21 Mar 2005 04:29:05 -0000 1.24 --- opal.h 23 Mar 2005 07:54:34 -0000 1.25 *************** *** 58,63 **** #include "RaycastSensor.h" #include "RaycastSensorData.h" - #include "VelocitySensor.h" - #include "VelocitySensorData.h" #include "VolumeSensor.h" #include "VolumeSensorData.h" --- 58,61 ---- Index: SensorData.h =================================================================== RCS file: /cvsroot/opal/opal/src/SensorData.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SensorData.h 13 Mar 2005 23:07:10 -0000 1.7 --- SensorData.h 23 Mar 2005 07:54:34 -0000 1.8 *************** *** 86,90 **** std::string internal_solidName; ! /// If the Sensor is attached to a Solid, this matrix is the global /// offset from that Solid's transform. Otherwise, it is just the /// Sensor's global transform. --- 86,90 ---- std::string internal_solidName; ! /// If the Sensor is attached to a Solid, this transform is the global /// offset from that Solid's transform. Otherwise, it is just the /// Sensor's global transform. Index: Solid.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Solid.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Solid.cpp 21 Mar 2005 17:52:22 -0000 1.29 --- Solid.cpp 23 Mar 2005 07:54:34 -0000 1.30 *************** *** 67,92 **** } - //void Solid::internal_updateAcceleration(real dt) - //{ - // Vec3r currentGlobalLinearVel = getGlobalLinearVel(); - // Vec3r currentGlobalAngularVel = getGlobalAngularVel(); - // mGlobalLinearAccel = (currentGlobalLinearVel - - // mPrevGlobalLinearVel) / dt; - // mGlobalAngularAccel = (currentGlobalAngularVel - - // mPrevGlobalAngularVel) / dt; - // mPrevGlobalLinearVel = currentGlobalLinearVel; - // mPrevGlobalAngularVel = currentGlobalAngularVel; - //} - - //Vec3r Solid::getGlobalLinearAccel()const - //{ - // return mGlobalLinearAccel; - //} - - //Vec3r Solid::getGlobalAngularAccel()const - //{ - // return mGlobalAngularAccel; - //} - bool Solid::isStatic()const { --- 67,70 ---- --- VelocitySensor.cpp DELETED --- Index: Simulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** Simulator.cpp 23 Mar 2005 04:04:30 -0000 1.50 --- Simulator.cpp 23 Mar 2005 07:54:34 -0000 1.51 *************** *** 38,42 **** #include "SpringMotor.h" #include "RaycastSensor.h" - #include "VelocitySensor.h" #include "AccelerationSensor.h" #include "VolumeSensor.h" --- 38,41 ---- *************** *** 555,570 **** switch(sensorData->getType()) { ! //case ACCELERATION_SENSOR: ! //{ ! // // Make a local copy of the Sensor's data. ! // AccelerationSensorData data = ! // *(AccelerationSensorData*)sensorData; ! // data.solid = solidPtr; ! // data.transform = transform; ! // s = createAccelerationSensor(); ! // ((AccelerationSensor*)s)->init(data); ! // break; ! //} case RAYCAST_SENSOR: { --- 554,569 ---- switch(sensorData->getType()) { ! case ACCELERATION_SENSOR: ! { ! // Make a local copy of the Sensor's data. ! AccelerationSensorData data = ! *(AccelerationSensorData*)sensorData; ! data.solid = solidPtr; ! data.transform = transform; ! s = createAccelerationSensor(); ! ((AccelerationSensor*)s)->init(data); ! break; ! } case RAYCAST_SENSOR: { *************** *** 578,592 **** break; } - //case VELOCITY_SENSOR: - //{ - // // Make a local copy of the Sensor's data. - // VelocitySensorData data = *(VelocitySensorData*)sensorData; - // data.solid = solidPtr; - // data.transform = transform; - - // s = createVelocitySensor(); - // ((VelocitySensor*)s)->init(data); - // break; - //} case VOLUME_SENSOR: { --- 577,580 ---- *************** *** 826,829 **** --- 814,824 ---- } + AccelerationSensor* Simulator::createAccelerationSensor() + { + AccelerationSensor* newSensor = new AccelerationSensor(this); + addSensor(newSensor); + return newSensor; + } + RaycastSensor* Simulator::createRaycastSensor() { Index: Simulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.h,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** Simulator.h 21 Mar 2005 04:29:05 -0000 1.88 --- Simulator.h 23 Mar 2005 07:54:34 -0000 1.89 *************** *** 44,47 **** --- 44,48 ---- class SpringMotor; class ThrusterMotor; + class AccelerationSensor; class RaycastSensor; class VolumeSensor; *************** *** 213,216 **** --- 214,220 ---- // SENSORS + /// Creates and returns a pointer to an AccelerationSensor. + virtual AccelerationSensor* OPAL_CALL createAccelerationSensor(); + /// Creates and returns a pointer to a RaycastSensor. virtual RaycastSensor* OPAL_CALL createRaycastSensor(); --- VelocitySensor.h DELETED --- Index: BlueprintManager.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/BlueprintManager.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** BlueprintManager.cpp 23 Mar 2005 04:52:26 -0000 1.34 --- BlueprintManager.cpp 23 Mar 2005 07:54:33 -0000 1.35 *************** *** 38,41 **** --- 38,42 ---- #include "SpringMotorData.h" #include "SensorData.h" + #include "AccelerationSensorData.h" #include "RaycastSensorData.h" #include "VolumeSensorData.h" *************** *** 1212,1228 **** // Load data for the specific type of Sensor. ! //if ("acceleration" == type) ! //{ ! // data = loadAccelerationSensor(nodePtr, bp, filename); ! //} ! //else if ("raycast" == type) ! if ("raycast" == type) { data = loadRaycastSensor(nodePtr, bp, filename); } - //else if ("velocity" == type) - //{ - // data = loadVelocitySensor(nodePtr, bp, filename); - //} else if ("volume" == type) { --- 1213,1224 ---- // Load data for the specific type of Sensor. ! if ("acceleration" == type) ! { ! data = loadAccelerationSensor(nodePtr, bp, filename); ! } ! else if ("raycast" == type) { data = loadRaycastSensor(nodePtr, bp, filename); } else if ("volume" == type) { *************** *** 1295,1298 **** --- 1291,1308 ---- } + AccelerationSensorData* BlueprintManager::loadAccelerationSensor( + const TiXmlNode* nodePtr, const Blueprint& bp, + const std::string& filename) + { + // This data structure automatically gets initialized to + // default values in its constructor. + AccelerationSensorData* data = new AccelerationSensorData(); + + #ifdef OPAL_USE_XML + // Nothing special to load for AccelerationSensors. + #endif + return data; + } + RaycastSensorData* BlueprintManager::loadRaycastSensor( const TiXmlNode* nodePtr, const Blueprint& bp, Index: Solid.h =================================================================== RCS file: /cvsroot/opal/opal/src/Solid.h,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** Solid.h 21 Mar 2005 04:29:05 -0000 1.84 --- Solid.h 23 Mar 2005 07:54:34 -0000 1.85 *************** *** 157,160 **** --- 157,165 ---- virtual Vec3r OPAL_CALL getLocalLinearVel()const = 0; + /// Given an offset point relative to the Solid's local origin, + /// returns the linear velocity of the point in local coordinates. + virtual Vec3r OPAL_CALL getLocalLinearVelAtLocalPos( + const Point3r& p)const = 0; + /// Sets the Solid's angular velocity in local coordinates. virtual void OPAL_CALL setLocalAngularVel(const Vec3r& vel) = 0; *************** *** 169,172 **** --- 174,182 ---- virtual Vec3r OPAL_CALL getGlobalLinearVel()const = 0; + /// Given an offset point relative to the Solid's local origin, + /// returns the linear velocity of the point in global coordinates. + virtual Vec3r OPAL_CALL getGlobalLinearVelAtLocalPos( + const Point3r& p)const = 0; + /// Sets the Solid's angular velocity in global coordinates. virtual void OPAL_CALL setGlobalAngularVel(const Vec3r& vel) = 0; *************** *** 206,211 **** virtual void OPAL_CALL internal_updateEngineTransform() = 0; - //virtual void OPAL_CALL internal_updateAcceleration(real dt); - /// Loops over the Solid's list of Forces and applies them. virtual void OPAL_CALL internal_applyForces(real stepSize); --- 216,219 ---- --- VelocitySensorData.h DELETED --- Index: BlueprintManager.h =================================================================== RCS file: /cvsroot/opal/opal/src/BlueprintManager.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** BlueprintManager.h 13 Mar 2005 23:07:10 -0000 1.18 --- BlueprintManager.h 23 Mar 2005 07:54:34 -0000 1.19 *************** *** 42,45 **** --- 42,46 ---- class SpringMotorData; class ThrusterMotorData; + class AccelerationSensorData; class RaycastSensorData; class VolumeSensorData; *************** *** 131,134 **** --- 132,143 ---- const Blueprint& bp, const std::string& filename); + /// Helper function for parsing AccelerationSensor XML elements. + /// Allocates and returns a pointer to a new + /// AccelerationSensorData object. Returns NULL if the element + /// could not be loaded. + AccelerationSensorData* loadAccelerationSensor( + const TiXmlNode* nodePtr, const Blueprint& bp, + const std::string& filename); + /// Helper function for parsing RaycastSensor XML elements. /// Allocates and returns a pointer to a new RaycastSensorData Index: AccelerationSensor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/AccelerationSensor.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AccelerationSensor.cpp 23 Mar 2005 04:04:30 -0000 1.2 --- AccelerationSensor.cpp 23 Mar 2005 07:54:33 -0000 1.3 *************** *** 31,37 **** namespace opal { ! AccelerationSensor::AccelerationSensor() { // "mData" is initialized in its own constructor. } --- 31,48 ---- namespace opal { ! AccelerationSensor::AccelerationSensor(Simulator* s) { // "mData" is initialized in its own constructor. + mSim = s; + + // "mGlobalLinearAccel" is initialized in its own constructor. + // "mGlobalAngularAccel" is initialized in its own constructor. + // "mLocalLinearAccel" is initialized in its own constructor. + // "mLocalAngularAccel" is initialized in its own constructor. + + // "mPrevGlobalLinearVel" is initialized in its own constructor. + // "mPrevGlobalAngularVel" is initialized in its own constructor. + // "mPrevLocalLinearVel" is initialized in its own constructor. + // "mPrevLocalAngularVel" is initialized in its own constructor. } *************** *** 51,112 **** } ! real AccelerationSensor::getGlobalLinearAccel()const { if (!mData.solid) { ! return 0; } ! // TODO: use the Sensor's transform to find its actual position ! // in global coordinates. ! ! // TODO: get the acceleration of the Solid at the Sensor's position. ! ! return 0; // temporary } ! real AccelerationSensor::getGlobalAngularAccel()const { if (!mData.solid) { ! return 0; } ! // TODO: use the Sensor's transform to find its actual position ! // in global coordinates. ! ! // TODO: get the acceleration of the Solid at the Sensor's position. ! ! return 0; // temporary } ! real AccelerationSensor::getLocalLinearAccel()const { if (!mData.solid) { ! return 0; } ! // TODO: use the Sensor's transform to find its actual position ! // relative to the Solid. ! ! // TODO: get the acceleration of the Solid at the Sensor's position. ! ! return 0; // temporary } ! real AccelerationSensor::getLocalAngularAccel()const { if (!mData.solid) { ! return 0; } ! // TODO: use the Sensor's transform to find its actual position ! // relative to the Solid. ! ! // TODO: get the acceleration of the Solid at the Sensor's position. ! ! return 0; // temporary } --- 62,103 ---- } ! Vec3r AccelerationSensor::getGlobalLinearAccel()const { if (!mData.solid) { ! return Vec3r(); } ! return mGlobalLinearAccel; } ! Vec3r AccelerationSensor::getGlobalAngularAccel()const { if (!mData.solid) { ! return Vec3r(); } ! return mGlobalAngularAccel; } ! Vec3r AccelerationSensor::getLocalLinearAccel()const { if (!mData.solid) { ! return Vec3r(); } ! return mLocalLinearAccel; } ! Vec3r AccelerationSensor::getLocalAngularAccel()const { if (!mData.solid) { ! return Vec3r(); } ! return mLocalAngularAccel; } *************** *** 155,159 **** if (mData.enabled) { ! // TODO: update acceleration calculations } } --- 146,175 ---- if (mData.enabled) { ! real dt = mSim->getStepSize(); ! ! Vec3r currentGlobalLinearVel = ! mData.solid->getGlobalLinearVelAtLocalPos( ! mData.transform.getPosition()); ! Vec3r currentGlobalAngularVel = ! mData.solid->getGlobalAngularVel(); ! Vec3r currentLocalLinearVel = ! mData.solid->getLocalLinearVelAtLocalPos( ! mData.transform.getPosition()); ! Vec3r currentLocalAngularVel = ! mData.solid->getLocalAngularVel(); ! ! mGlobalLinearAccel = (currentGlobalLinearVel - ! mPrevGlobalLinearVel) / dt; ! mGlobalAngularAccel = (currentGlobalAngularVel - ! mPrevGlobalAngularVel) / dt; ! mLocalLinearAccel = (currentLocalLinearVel - ! mPrevLocalLinearVel) / dt; ! mLocalAngularAccel = (currentLocalAngularVel - ! mPrevLocalAngularVel) / dt; ! ! mPrevGlobalLinearVel = currentGlobalLinearVel; ! mPrevGlobalAngularVel = currentGlobalAngularVel; ! mPrevLocalLinearVel = currentLocalLinearVel; ! mPrevLocalAngularVel = currentLocalAngularVel; } } Index: SConscript =================================================================== RCS file: /cvsroot/opal/opal/src/SConscript,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** SConscript 21 Mar 2005 04:29:05 -0000 1.17 --- SConscript 23 Mar 2005 07:54:34 -0000 1.18 *************** *** 52,57 **** ThrusterMotorData.h Vec3r.h - VelocitySensor.h - VelocitySensorData.h VolumeSensor.h VolumeSensorData.h --- 52,55 ---- *************** *** 78,82 **** SpringMotor.cpp ThrusterMotor.cpp - VelocitySensor.cpp VolumeSensor.cpp """) --- 76,79 ---- |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 04:53:02
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21909/src Modified Files: BlueprintManager.cpp SpringMotor.cpp SpringMotor.h SpringMotorData.h Log Message: added an 'attachOffset' point option to the spring motor which allows the spring to be attached to a solid at a point offset from the solid's center Index: SpringMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/SpringMotor.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SpringMotor.cpp 23 Mar 2005 04:04:31 -0000 1.10 --- SpringMotor.cpp 23 Mar 2005 04:52:36 -0000 1.11 *************** *** 41,51 **** } - //void SpringMotor::init(Mode m, Solid* s) - //{ - // Motor::init(); - // mSolid = s; - // mMode = m; - //} - void SpringMotor::init(const SpringMotorData& data) { --- 41,44 ---- *************** *** 102,106 **** Force f; f.singleStep = true; ! f.type = GLOBAL_FORCE; f.vec = mData.linearKs * error - mData.linearKd * mData.solid->getGlobalLinearVel(); --- 95,100 ---- Force f; f.singleStep = true; ! f.type = GLOBAL_FORCE_AT_LOCAL_POS; ! f.pos = mData.attachOffset; f.vec = mData.linearKs * error - mData.linearKd * mData.solid->getGlobalLinearVel(); *************** *** 176,179 **** --- 170,183 ---- } + void SpringMotor::setAttachOffset(const Point3r& offset) + { + mData.attachOffset = offset; + } + + const Point3r& SpringMotor::getAttachOffset()const + { + return mData.attachOffset; + } + void SpringMotor::setDesiredTransform(const Matrix44r& transform) { Index: SpringMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/SpringMotor.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SpringMotor.h 23 Mar 2005 04:04:31 -0000 1.12 --- SpringMotor.h 23 Mar 2005 04:52:36 -0000 1.13 *************** *** 69,72 **** --- 69,79 ---- virtual void OPAL_CALL setEnabled(bool e); + /// Sets the spring's attach point on the Solid. This is a local + // offset point from the Solid's position. + virtual void OPAL_CALL setAttachOffset(const Point3r& offset); + + /// Returns the spring's attach point on the Solid. + virtual const Point3r& OPAL_CALL getAttachOffset()const; + /// Sets the desired position and orientation. virtual void OPAL_CALL setDesiredTransform(const Matrix44r& transform); Index: BlueprintManager.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/BlueprintManager.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** BlueprintManager.cpp 14 Mar 2005 22:36:31 -0000 1.33 --- BlueprintManager.cpp 23 Mar 2005 04:52:26 -0000 1.34 *************** *** 982,985 **** --- 982,995 ---- } + // Load AttachOffset element if it exists. + paramNodePtr = + const_cast<TiXmlNode*>(nodePtr)->FirstChild("AttachOffset"); + if (NULL != paramNodePtr) + { + data->attachOffset[0] = getAttributeReal(paramNodePtr, "x"); + data->attachOffset[1] = getAttributeReal(paramNodePtr, "y"); + data->attachOffset[2] = getAttributeReal(paramNodePtr, "z"); + } + // Load DesiredPos element if it exists. paramNodePtr = Index: SpringMotorData.h =================================================================== RCS file: /cvsroot/opal/opal/src/SpringMotorData.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SpringMotorData.h 11 Mar 2005 05:31:56 -0000 1.4 --- SpringMotorData.h 23 Mar 2005 04:52:36 -0000 1.5 *************** *** 60,63 **** --- 60,64 ---- internal_solidName = ""; mode = LINEAR_MODE; + // "attachOffset" is initialized in its own constructor. // "desiredPos" is initialized in its own constructor. desiredForward = defaults::motor::spring::desiredForward; *************** *** 91,94 **** --- 92,96 ---- internal_solidName = data.internal_solidName; mode = data.mode; + attachOffset = data.attachOffset; desiredPos = data.desiredPos; desiredForward = data.desiredForward; *************** *** 113,116 **** --- 115,123 ---- SpringMotorMode mode; + /// Local offset (relative to the Solid's position) that defines + /// where the SpringMotor attaches to the Solid. This is only + /// used in linear mode. + Point3r attachOffset; + /// The Motor's desired position. This is only used if the /// appropriate mode is set. |
|
From: tylerstreeter <tyl...@us...> - 2005-03-23 04:53:02
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21909 Modified Files: todo.txt Log Message: added an 'attachOffset' point option to the spring motor which allows the spring to be attached to a solid at a point offset from the solid's center Index: todo.txt =================================================================== RCS file: /cvsroot/opal/opal/todo.txt,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** todo.txt 21 Mar 2005 04:29:06 -0000 1.56 --- todo.txt 23 Mar 2005 04:52:37 -0000 1.57 *************** *** 4,10 **** * add license notice to samples' source files - * spring motor - - add an option to apply the force at a place other than the solid's center of mass; this will allow the 'picking' demo to attach a spring motor exactly where the user clicks on an object - * additional sensors - incline/orientation relative to an initial orientation --- 4,7 ---- |
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25874/src Modified Files: AccelerationSensor.cpp AccelerationSensor.h AttractorMotor.cpp AttractorMotor.h GearedMotor.cpp GearedMotor.h Joint.cpp Joint.h Motor.cpp Motor.h RaycastSensor.cpp RaycastSensor.h Sensor.cpp Sensor.h ServoMotor.cpp ServoMotor.h Simulator.cpp SpringMotor.cpp SpringMotor.h ThrusterMotor.cpp ThrusterMotor.h VelocitySensor.cpp VelocitySensor.h VolumeSensor.cpp VolumeSensor.h Log Message: renamed overloaded internal_dependsOn functions to avoid gcc and mipspro compiler warnings Index: Sensor.h =================================================================== RCS file: /cvsroot/opal/opal/src/Sensor.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Sensor.h 14 Mar 2005 01:20:53 -0000 1.9 --- Sensor.h 23 Mar 2005 04:04:30 -0000 1.10 *************** *** 83,87 **** /// Returns true if this Sensor depends on the given Solid. ! virtual bool OPAL_CALL internal_dependsOn(Solid* solid); protected: --- 83,87 ---- /// Returns true if this Sensor depends on the given Solid. ! virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s); protected: Index: AccelerationSensor.h =================================================================== RCS file: /cvsroot/opal/opal/src/AccelerationSensor.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AccelerationSensor.h 14 Mar 2005 05:18:27 -0000 1.1 --- AccelerationSensor.h 23 Mar 2005 04:04:30 -0000 1.2 *************** *** 83,87 **** virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOn(Solid* solid); protected: --- 83,87 ---- virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s); protected: Index: Motor.h =================================================================== RCS file: /cvsroot/opal/opal/src/Motor.h,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Motor.h 9 Mar 2005 02:09:49 -0000 1.37 --- Motor.h 23 Mar 2005 04:04:30 -0000 1.38 *************** *** 82,89 **** /// Returns true if this Motor depends on the given Solid. ! virtual bool OPAL_CALL internal_dependsOn(Solid* solid); /// Returns true if this Motor depends on the given Joint. ! virtual bool OPAL_CALL internal_dependsOn(Joint* joint); /// Sets whether this is a custom Motor. Used internally to --- 82,89 ---- /// Returns true if this Motor depends on the given Solid. ! virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s); /// Returns true if this Motor depends on the given Joint. ! virtual bool OPAL_CALL internal_dependsOnJoint(Joint* j); /// Sets whether this is a custom Motor. Used internally to Index: Sensor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Sensor.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Sensor.cpp 9 Mar 2005 02:09:49 -0000 1.5 --- Sensor.cpp 23 Mar 2005 04:04:30 -0000 1.6 *************** *** 55,59 **** } ! bool Sensor::internal_dependsOn(Solid* solid) { return false; --- 55,59 ---- } ! bool Sensor::internal_dependsOnSolid(Solid* s) { return false; Index: RaycastSensor.h =================================================================== RCS file: /cvsroot/opal/opal/src/RaycastSensor.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RaycastSensor.h 14 Mar 2005 05:18:27 -0000 1.5 --- RaycastSensor.h 23 Mar 2005 04:04:30 -0000 1.6 *************** *** 137,141 **** virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOn(Solid* solid); protected: --- 137,141 ---- virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s); protected: Index: SpringMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/SpringMotor.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SpringMotor.h 9 Mar 2005 02:09:50 -0000 1.11 --- SpringMotor.h 23 Mar 2005 04:04:31 -0000 1.12 *************** *** 105,109 **** virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOn(Solid* solid); protected: --- 105,109 ---- virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s); protected: Index: ThrusterMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/ThrusterMotor.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ThrusterMotor.h 9 Mar 2005 02:09:50 -0000 1.12 --- ThrusterMotor.h 23 Mar 2005 04:04:31 -0000 1.13 *************** *** 77,81 **** virtual const Force& OPAL_CALL getForce()const; ! virtual bool OPAL_CALL internal_dependsOn(Solid* solid); virtual void OPAL_CALL internal_update(); --- 77,81 ---- virtual const Force& OPAL_CALL getForce()const; ! virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s); virtual void OPAL_CALL internal_update(); Index: Motor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Motor.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Motor.cpp 9 Mar 2005 02:09:49 -0000 1.16 --- Motor.cpp 23 Mar 2005 04:04:30 -0000 1.17 *************** *** 56,65 **** } ! bool Motor::internal_dependsOn(Solid* solid) { return false; } ! bool Motor::internal_dependsOn(Joint* joint) { return false; --- 56,65 ---- } ! bool Motor::internal_dependsOnSolid(Solid* s) { return false; } ! bool Motor::internal_dependsOnJoint(Joint* j) { return false; Index: AccelerationSensor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/AccelerationSensor.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AccelerationSensor.cpp 14 Mar 2005 05:18:27 -0000 1.1 --- AccelerationSensor.cpp 23 Mar 2005 04:04:30 -0000 1.2 *************** *** 159,165 **** } ! bool AccelerationSensor::internal_dependsOn(Solid* solid) { ! if (solid == mData.solid) { return true; --- 159,165 ---- } ! bool AccelerationSensor::internal_dependsOnSolid(Solid* s) { ! if (s == mData.solid) { return true; Index: GearedMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/GearedMotor.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GearedMotor.cpp 9 Mar 2005 02:09:49 -0000 1.10 --- GearedMotor.cpp 23 Mar 2005 04:04:30 -0000 1.11 *************** *** 143,149 **** } ! bool GearedMotor::internal_dependsOn(Joint* joint) { ! if (joint == mData.joint) { return true; --- 143,149 ---- } ! bool GearedMotor::internal_dependsOnJoint(Joint* j) { ! if (j == mData.joint) { return true; Index: ServoMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/ServoMotor.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** ServoMotor.h 9 Mar 2005 02:09:49 -0000 1.24 --- ServoMotor.h 23 Mar 2005 04:04:30 -0000 1.25 *************** *** 105,109 **** virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOn(Joint* joint); protected: --- 105,109 ---- virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOnJoint(Joint* j); protected: Index: AttractorMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/AttractorMotor.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** AttractorMotor.h 9 Mar 2005 02:09:49 -0000 1.27 --- AttractorMotor.h 23 Mar 2005 04:04:30 -0000 1.28 *************** *** 84,88 **** virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOn(Solid* solid); protected: --- 84,88 ---- virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s); protected: Index: ThrusterMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ThrusterMotor.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ThrusterMotor.cpp 9 Mar 2005 02:09:50 -0000 1.10 --- ThrusterMotor.cpp 23 Mar 2005 04:04:31 -0000 1.11 *************** *** 110,116 **** } ! bool ThrusterMotor::internal_dependsOn(Solid* solid) { ! if (solid == mData.solid) { return true; --- 110,116 ---- } ! bool ThrusterMotor::internal_dependsOnSolid(Solid* s) { ! if (s == mData.solid) { return true; Index: VelocitySensor.h =================================================================== RCS file: /cvsroot/opal/opal/src/VelocitySensor.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VelocitySensor.h 14 Mar 2005 05:18:27 -0000 1.1 --- VelocitySensor.h 23 Mar 2005 04:04:31 -0000 1.2 *************** *** 85,89 **** virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOn(Solid* solid); protected: --- 85,89 ---- virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s); protected: Index: VelocitySensor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/VelocitySensor.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VelocitySensor.cpp 14 Mar 2005 05:18:27 -0000 1.1 --- VelocitySensor.cpp 23 Mar 2005 04:04:31 -0000 1.2 *************** *** 159,165 **** } ! bool VelocitySensor::internal_dependsOn(Solid* solid) { ! if (solid == mData.solid) { return true; --- 159,165 ---- } ! bool VelocitySensor::internal_dependsOnSolid(Solid* s) { ! if (s == mData.solid) { return true; Index: Simulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Simulator.cpp 21 Mar 2005 16:31:22 -0000 1.49 --- Simulator.cpp 23 Mar 2005 04:04:30 -0000 1.50 *************** *** 894,898 **** for (iter = mMotorList.begin(); iter != mMotorList.end(); ++iter) { ! if ((*iter)->internal_dependsOn(s)) { (*iter)->setEnabled(false); --- 894,898 ---- for (iter = mMotorList.begin(); iter != mMotorList.end(); ++iter) { ! if ((*iter)->internal_dependsOnSolid(s)) { (*iter)->setEnabled(false); *************** *** 904,908 **** for (iter2 = mJointList.begin(); iter2 != mJointList.end(); ++iter2) { ! if ((*iter2)->internal_dependsOn(s)) { (*iter2)->setEnabled(false); --- 904,908 ---- for (iter2 = mJointList.begin(); iter2 != mJointList.end(); ++iter2) { ! if ((*iter2)->internal_dependsOnSolid(s)) { (*iter2)->setEnabled(false); *************** *** 914,918 **** for (iter3 = mSensorList.begin(); iter3 != mSensorList.end(); ++iter3) { ! if ((*iter3)->internal_dependsOn(s)) { (*iter3)->setEnabled(false); --- 914,918 ---- for (iter3 = mSensorList.begin(); iter3 != mSensorList.end(); ++iter3) { ! if ((*iter3)->internal_dependsOnSolid(s)) { (*iter3)->setEnabled(false); *************** *** 949,953 **** for (iter = mMotorList.begin(); iter != mMotorList.end(); ++iter) { ! if ((*iter)->internal_dependsOn(j)) { (*iter)->setEnabled(false); --- 949,953 ---- for (iter = mMotorList.begin(); iter != mMotorList.end(); ++iter) { ! if ((*iter)->internal_dependsOnJoint(j)) { (*iter)->setEnabled(false); Index: VolumeSensor.h =================================================================== RCS file: /cvsroot/opal/opal/src/VolumeSensor.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** VolumeSensor.h 21 Mar 2005 03:53:57 -0000 1.4 --- VolumeSensor.h 23 Mar 2005 04:04:31 -0000 1.5 *************** *** 152,156 **** virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOn(Solid* solid); protected: --- 152,156 ---- virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s); protected: Index: RaycastSensor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/RaycastSensor.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RaycastSensor.cpp 14 Mar 2005 01:20:53 -0000 1.6 --- RaycastSensor.cpp 23 Mar 2005 04:04:30 -0000 1.7 *************** *** 136,142 **** } ! bool RaycastSensor::internal_dependsOn(Solid* solid) { ! if (solid == mData.solid) { return true; --- 136,142 ---- } ! bool RaycastSensor::internal_dependsOnSolid(Solid* s) { ! if (s == mData.solid) { return true; Index: Joint.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Joint.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Joint.cpp 21 Mar 2005 04:29:05 -0000 1.27 --- Joint.cpp 23 Mar 2005 04:04:30 -0000 1.28 *************** *** 318,324 **** } ! bool Joint::internal_dependsOn(Solid* solid) { ! if (solid == mData.solid0 || solid == mData.solid1) { return true; --- 318,324 ---- } ! bool Joint::internal_dependsOnSolid(Solid* s) { ! if (s == mData.solid0 || s == mData.solid1) { return true; Index: VolumeSensor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/VolumeSensor.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** VolumeSensor.cpp 14 Mar 2005 01:20:53 -0000 1.3 --- VolumeSensor.cpp 23 Mar 2005 04:04:31 -0000 1.4 *************** *** 137,143 **** } ! bool VolumeSensor::internal_dependsOn(Solid* solid) { ! if (solid == mData.solid) { return true; --- 137,143 ---- } ! bool VolumeSensor::internal_dependsOnSolid(Solid* s) { ! if (s == mData.solid) { return true; Index: SpringMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/SpringMotor.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SpringMotor.cpp 9 Mar 2005 02:09:50 -0000 1.9 --- SpringMotor.cpp 23 Mar 2005 04:04:31 -0000 1.10 *************** *** 266,272 **** } ! bool SpringMotor::internal_dependsOn(Solid* solid) { ! if (solid == mData.solid) { return true; --- 266,272 ---- } ! bool SpringMotor::internal_dependsOnSolid(Solid* s) { ! if (s == mData.solid) { return true; Index: Joint.h =================================================================== RCS file: /cvsroot/opal/opal/src/Joint.h,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** Joint.h 21 Mar 2005 04:29:05 -0000 1.65 --- Joint.h 23 Mar 2005 04:04:30 -0000 1.66 *************** *** 223,227 **** /// Returns true if this Joint depends on the given Solid. ! virtual bool OPAL_CALL internal_dependsOn(Solid* solid); protected: --- 223,227 ---- /// Returns true if this Joint depends on the given Solid. ! virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s); protected: Index: AttractorMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/AttractorMotor.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** AttractorMotor.cpp 9 Mar 2005 02:09:49 -0000 1.20 --- AttractorMotor.cpp 23 Mar 2005 04:04:30 -0000 1.21 *************** *** 164,170 **** } ! bool AttractorMotor::internal_dependsOn(Solid* solid) { ! if (solid == mData.solid0 || solid == mData.solid1) { return true; --- 164,170 ---- } ! bool AttractorMotor::internal_dependsOnSolid(Solid* s) { ! if (s == mData.solid0 || s == mData.solid1) { return true; Index: GearedMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/GearedMotor.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GearedMotor.h 9 Mar 2005 02:09:49 -0000 1.10 --- GearedMotor.h 23 Mar 2005 04:04:30 -0000 1.11 *************** *** 96,100 **** virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOn(Joint* joint); protected: --- 96,100 ---- virtual void OPAL_CALL internal_update(); ! virtual bool OPAL_CALL internal_dependsOnJoint(Joint* j); protected: Index: ServoMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ServoMotor.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ServoMotor.cpp 9 Mar 2005 02:09:49 -0000 1.14 --- ServoMotor.cpp 23 Mar 2005 04:04:30 -0000 1.15 *************** *** 231,237 **** } ! bool ServoMotor::internal_dependsOn(Joint* joint) { ! if (joint == mData.joint) { return true; --- 231,237 ---- } ! bool ServoMotor::internal_dependsOnJoint(Joint* j) { ! if (j == mData.joint) { return true; |
|
From: tylerstreeter <tyl...@us...> - 2005-03-21 17:52:33
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16641/src Modified Files: Solid.cpp Log Message: fixed bug in solid force list - forces weren't getting deleted properly Index: Solid.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Solid.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Solid.cpp 21 Mar 2005 04:29:05 -0000 1.28 --- Solid.cpp 21 Mar 2005 17:52:22 -0000 1.29 *************** *** 332,340 **** { // Delete this force. ! ! // Swap the element to be deleted with the last element. ! std::swap((*forceIter), mForceList.back()); ! ! // Delete the last element. mForceList.pop_back(); } --- 332,336 ---- { // Delete this force. ! (*forceIter) = mForceList.back(); mForceList.pop_back(); } |
|
From: tylerstreeter <tyl...@us...> - 2005-03-21 16:31:35
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11216/src Modified Files: Simulator.cpp Log Message: fixed bug - the Simulator's PostStepEventHandler is now called at the right time Index: Simulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** Simulator.cpp 21 Mar 2005 04:29:05 -0000 1.48 --- Simulator.cpp 21 Mar 2005 16:31:22 -0000 1.49 *************** *** 221,230 **** internal_handlePendingCollisionEvents(); } ! // Fire an event to the PostStepEventHandler, if one exists. ! if (mPostStepEventHandler) ! { ! mPostStepEventHandler->handlePostStepEvent(); ! } } --- 221,230 ---- internal_handlePendingCollisionEvents(); } + } ! // Fire an event to the PostStepEventHandler, if one exists. ! if (mPostStepEventHandler) ! { ! mPostStepEventHandler->handlePostStepEvent(); } |
|
From: tylerstreeter <tyl...@us...> - 2005-03-21 05:52:19
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31862/src Modified Files: CollisionEventHandler.h JointBreakEventHandler.h PostStepEventHandler.h Log Message: exported symbols from the event handler classes for the win32 dll interface Index: PostStepEventHandler.h =================================================================== RCS file: /cvsroot/opal/opal/src/PostStepEventHandler.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PostStepEventHandler.h 21 Mar 2005 04:29:05 -0000 1.1 --- PostStepEventHandler.h 21 Mar 2005 05:52:09 -0000 1.2 *************** *** 38,49 **** { public: ! PostStepEventHandler(); ! virtual ~PostStepEventHandler(); /// Called once for each pending CollisionEvent. This is always /// called at the end of a time step, so CollisionEvents always /// get handled right away. ! virtual void OPAL_CALL handlePostStepEvent() = 0; protected: --- 38,51 ---- { public: ! OPAL_DECL PostStepEventHandler() ! {} ! OPAL_DECL virtual ~PostStepEventHandler() ! {} /// Called once for each pending CollisionEvent. This is always /// called at the end of a time step, so CollisionEvents always /// get handled right away. ! OPAL_DECL virtual void OPAL_CALL handlePostStepEvent() = 0; protected: Index: CollisionEventHandler.h =================================================================== RCS file: /cvsroot/opal/opal/src/CollisionEventHandler.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CollisionEventHandler.h 8 Mar 2005 16:10:23 -0000 1.1 --- CollisionEventHandler.h 21 Mar 2005 05:52:09 -0000 1.2 *************** *** 72,93 **** { public: ! CollisionEventHandler(); ! virtual ~CollisionEventHandler(); /// Called once for each pending CollisionEvent. This is always /// called at the end of a time step, so CollisionEvents always /// get handled right away. ! virtual void OPAL_CALL handleCollisionEvent( const CollisionEvent& e) = 0; /// Adds a CollisionEvent to this handler's internal list. These /// will get handled at the end of the current time step. ! virtual void OPAL_CALL internal_pushCollisionEvent( const CollisionEvent& e); /// Loops through the pending CollisionEvents, calling the event /// handling function (which is always user-defined) for each. ! virtual void OPAL_CALL internal_handlePendingCollisionEvents(); protected: --- 72,94 ---- { public: ! OPAL_DECL CollisionEventHandler(); ! OPAL_DECL virtual ~CollisionEventHandler(); /// Called once for each pending CollisionEvent. This is always /// called at the end of a time step, so CollisionEvents always /// get handled right away. ! OPAL_DECL virtual void OPAL_CALL handleCollisionEvent( const CollisionEvent& e) = 0; /// Adds a CollisionEvent to this handler's internal list. These /// will get handled at the end of the current time step. ! OPAL_DECL virtual void OPAL_CALL internal_pushCollisionEvent( const CollisionEvent& e); /// Loops through the pending CollisionEvents, calling the event /// handling function (which is always user-defined) for each. ! OPAL_DECL virtual void OPAL_CALL ! internal_handlePendingCollisionEvents(); protected: Index: JointBreakEventHandler.h =================================================================== RCS file: /cvsroot/opal/opal/src/JointBreakEventHandler.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JointBreakEventHandler.h 8 Mar 2005 16:10:24 -0000 1.1 --- JointBreakEventHandler.h 21 Mar 2005 05:52:09 -0000 1.2 *************** *** 40,52 **** { public: ! JointBreakEventHandler() {} ! virtual ~JointBreakEventHandler() {} /// Called when a Joint breaks from being damaged. The Joint will /// automatically become disabled before this is called. ! virtual void OPAL_CALL handleJointBreakEvent(Joint* joint) = 0; protected: --- 40,53 ---- { public: ! OPAL_DECL JointBreakEventHandler() {} ! OPAL_DECL virtual ~JointBreakEventHandler() {} /// Called when a Joint breaks from being damaged. The Joint will /// automatically become disabled before this is called. ! OPAL_DECL virtual void OPAL_CALL handleJointBreakEvent( ! Joint* joint) = 0; protected: |
|
From: tylerstreeter <tyl...@us...> - 2005-03-21 04:29:15
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15060/src Modified Files: Joint.cpp Joint.h SConscript Simulator.cpp Simulator.h Solid.cpp Solid.h opal.h Added Files: PostStepEventHandler.h Log Message: added a PostStepEventHandler that gets notified at the end of every simulation step Index: Joint.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Joint.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Joint.cpp 8 Mar 2005 22:05:03 -0000 1.26 --- Joint.cpp 21 Mar 2005 04:29:05 -0000 1.27 *************** *** 34,38 **** { // "mData" is initialized in its own constructor. ! mJointBreakEventHandler = NULL; setUserData(NULL); mInitCalled = false; --- 34,38 ---- { // "mData" is initialized in its own constructor. ! setJointBreakEventHandler(NULL); setUserData(NULL); mInitCalled = false; *************** *** 101,109 **** //} ! void Joint::setEventHandler(JointBreakEventHandler* eventHandler) { mJointBreakEventHandler = eventHandler; } void Joint::setLimitsEnabled(int axisNum, bool e) { --- 101,115 ---- //} ! void Joint::setJointBreakEventHandler( ! JointBreakEventHandler* eventHandler) { mJointBreakEventHandler = eventHandler; } + JointBreakEventHandler* Joint::getJointBreakEventHandler()const + { + return mJointBreakEventHandler; + } + void Joint::setLimitsEnabled(int axisNum, bool e) { Index: Solid.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Solid.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Solid.cpp 14 Mar 2005 01:20:53 -0000 1.27 --- Solid.cpp 21 Mar 2005 04:29:05 -0000 1.28 *************** *** 33,37 **** { // "mData" is initialized in its own constructor. ! setEventHandler(NULL); setUserData(NULL); } --- 33,37 ---- { // "mData" is initialized in its own constructor. ! setCollisionEventHandler(NULL); setUserData(NULL); } *************** *** 346,355 **** } ! void Solid::setEventHandler(CollisionEventHandler* eventHandler) { mCollisionEventHandler = eventHandler; } ! CollisionEventHandler* Solid::getEventHandler()const { return mCollisionEventHandler; --- 346,355 ---- } ! void Solid::setCollisionEventHandler(CollisionEventHandler* eventHandler) { mCollisionEventHandler = eventHandler; } ! CollisionEventHandler* Solid::getCollisionEventHandler()const { return mCollisionEventHandler; Index: opal.h =================================================================== RCS file: /cvsroot/opal/opal/src/opal.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** opal.h 14 Mar 2005 05:18:27 -0000 1.23 --- opal.h 21 Mar 2005 04:29:05 -0000 1.24 *************** *** 65,68 **** --- 65,69 ---- #include "JointBreakEventHandler.h" #include "CollisionEventHandler.h" + #include "PostStepEventHandler.h" #include "Blueprint.h" #include "BlueprintInstance.h" Index: Solid.h =================================================================== RCS file: /cvsroot/opal/opal/src/Solid.h,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** Solid.h 14 Mar 2005 01:20:53 -0000 1.83 --- Solid.h 21 Mar 2005 04:29:05 -0000 1.84 *************** *** 179,188 **** virtual void OPAL_CALL translateMass(const Vec3r& offset) = 0; ! /// Sets the Solid's event handler. ! virtual void OPAL_CALL setEventHandler( CollisionEventHandler* eventHandler); ! /// Returns the Solid's event handler. ! virtual CollisionEventHandler* OPAL_CALL getEventHandler()const; //// Quickly spinning solids should be set as fast rotating solids to --- 179,190 ---- virtual void OPAL_CALL translateMass(const Vec3r& offset) = 0; ! /// Sets the Solid's collision event handler. ! virtual void OPAL_CALL setCollisionEventHandler( CollisionEventHandler* eventHandler); ! /// Returns the Solid's collision event handler. If this returns ! /// NULL, the Solid is not using one. ! virtual CollisionEventHandler* OPAL_CALL ! getCollisionEventHandler()const; //// Quickly spinning solids should be set as fast rotating solids to *************** *** 223,227 **** SolidData mData; ! /// Pointer to this Solid's event handler. CollisionEventHandler* mCollisionEventHandler; --- 225,229 ---- SolidData mData; ! /// Pointer to this Solid's collision event handler. CollisionEventHandler* mCollisionEventHandler; --- NEW FILE: PostStepEventHandler.h --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ #ifndef OPAL_POST_STEP_EVENT_HANDLER_H #define OPAL_POST_STEP_EVENT_HANDLER_H #include "Defines.h" #include "EventHandler.h" namespace opal { /// A listener that gets notified when a simulation step has finished. class PostStepEventHandler : public EventHandler { public: PostStepEventHandler(); virtual ~PostStepEventHandler(); /// Called once for each pending CollisionEvent. This is always /// called at the end of a time step, so CollisionEvents always /// get handled right away. virtual void OPAL_CALL handlePostStepEvent() = 0; protected: private: }; } #endif Index: Joint.h =================================================================== RCS file: /cvsroot/opal/opal/src/Joint.h,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** Joint.h 8 Mar 2005 22:05:03 -0000 1.64 --- Joint.h 21 Mar 2005 04:29:05 -0000 1.65 *************** *** 94,101 **** virtual void OPAL_CALL repairAccumDamage(); ! /// Sets the Joint's event handler. ! virtual void OPAL_CALL setEventHandler( JointBreakEventHandler* eventHandler); /// Enables or disables the given Joint axis' limits. virtual void OPAL_CALL setLimitsEnabled(int axisNum, bool e); --- 94,106 ---- virtual void OPAL_CALL repairAccumDamage(); ! /// Sets the Joint's break event handler. ! virtual void OPAL_CALL setJointBreakEventHandler( JointBreakEventHandler* eventHandler); + /// Returns the Joint's break event handler. If this returns + /// NULL, the Joint is not using one. + virtual JointBreakEventHandler* OPAL_CALL + getJointBreakEventHandler()const; + /// Enables or disables the given Joint axis' limits. virtual void OPAL_CALL setLimitsEnabled(int axisNum, bool e); *************** *** 243,247 **** JointData mData; ! /// A pointer to the Joint's event handler. JointBreakEventHandler* mJointBreakEventHandler; --- 248,252 ---- JointData mData; ! /// A pointer to the Joint's break event handler. JointBreakEventHandler* mJointBreakEventHandler; Index: Simulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** Simulator.cpp 14 Mar 2005 05:18:27 -0000 1.47 --- Simulator.cpp 21 Mar 2005 04:29:05 -0000 1.48 *************** *** 41,44 **** --- 41,45 ---- #include "AccelerationSensor.h" #include "VolumeSensor.h" + #include "PostStepEventHandler.h" namespace opal *************** *** 51,54 **** --- 52,56 ---- setMaxAngularVel(defaults::maxAngularVel); setUserData(NULL); + setPostStepEventHandler(NULL); int i=0; *************** *** 116,122 **** while (mTimeBuffer >= mStepSize) { - // TODO: Call some user-defined function here; maybe have - // a BeginStepEventHandler - // Update Sensors. std::vector<Sensor*>::iterator sensorIter; --- 118,121 ---- *************** *** 217,225 **** // Update the Solid's CollisionEventHandler if applicable. ! if (solid->getEventHandler()) { ! solid->getEventHandler()-> internal_handlePendingCollisionEvents(); } } --- 216,230 ---- // Update the Solid's CollisionEventHandler if applicable. ! if (solid->getCollisionEventHandler()) { ! solid->getCollisionEventHandler()-> internal_handlePendingCollisionEvents(); } + + // Fire an event to the PostStepEventHandler, if one exists. + if (mPostStepEventHandler) + { + mPostStepEventHandler->handlePostStepEvent(); + } } *************** *** 240,243 **** --- 245,264 ---- } + real Simulator::getStepSize() + { + return mStepSize; + } + + void Simulator::setPostStepEventHandler( + PostStepEventHandler* eventHandler) + { + mPostStepEventHandler = eventHandler; + } + + PostStepEventHandler* Simulator::getPostStepEventHandler()const + { + return mPostStepEventHandler; + } + void Simulator::instantiateBlueprint( BlueprintInstance& instance, const Blueprint& bp, Index: SConscript =================================================================== RCS file: /cvsroot/opal/opal/src/SConscript,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** SConscript 14 Mar 2005 22:36:31 -0000 1.16 --- SConscript 21 Mar 2005 04:29:05 -0000 1.17 *************** *** 31,34 **** --- 31,35 ---- Point3r.h Portability.h + PostStepEventHandler.h Quaternion.h RaycastSensor.h Index: Simulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.h,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** Simulator.h 14 Mar 2005 01:20:53 -0000 1.87 --- Simulator.h 21 Mar 2005 04:29:05 -0000 1.88 *************** *** 47,50 **** --- 47,51 ---- class VolumeSensor; class BlueprintInstance; + class PostStepEventHandler; struct RaycastResult; struct VolumeQueryResult; *************** *** 75,78 **** --- 76,91 ---- virtual void OPAL_CALL setStepSize(real stepSize); + /// Returns the constant step size used in the simulation. + virtual real OPAL_CALL getStepSize(); + + /// Sets the Simulator's post-step event handler. + virtual void OPAL_CALL setPostStepEventHandler( + PostStepEventHandler* eventHandler); + + /// Returns the Simulator's post-step event handler. If this + /// returns NULL, the Simulator is not using one. + virtual PostStepEventHandler* OPAL_CALL + getPostStepEventHandler()const; + /// Creates instances of all objects in a Blueprint and fills the /// given BlueprintInstance with pointers of the named objects. The *************** *** 325,328 **** --- 338,344 ---- unsigned long int mContactGroupFlags[32]; + /// Pointer to the Simulator's post-step event handler. + PostStepEventHandler* mPostStepEventHandler; + private: }; |
|
From: tylerstreeter <tyl...@us...> - 2005-03-21 04:29:15
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15060 Modified Files: todo.txt Log Message: added a PostStepEventHandler that gets notified at the end of every simulation step Index: todo.txt =================================================================== RCS file: /cvsroot/opal/opal/todo.txt,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** todo.txt 14 Mar 2005 05:18:28 -0000 1.55 --- todo.txt 21 Mar 2005 04:29:06 -0000 1.56 *************** *** 2,8 **** --- 2,15 ---- ================= + * add license notice to samples' source files + + * spring motor + - add an option to apply the force at a place other than the solid's center of mass; this will allow the 'picking' demo to attach a spring motor exactly where the user clicks on an object + * additional sensors - incline/orientation relative to an initial orientation + * ray and volume sensors should use contact groups? ray needs a group parameter; volume sensor just uses the volume solid's group + * finish implementing accel and vel sensors |
|
From: tylerstreeter <tyl...@us...> - 2005-03-21 04:29:14
|
Update of /cvsroot/opal/opal/vc7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15060/vc7 Modified Files: opal-ode.vcproj Log Message: added a PostStepEventHandler that gets notified at the end of every simulation step Index: opal-ode.vcproj =================================================================== RCS file: /cvsroot/opal/opal/vc7/opal-ode.vcproj,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** opal-ode.vcproj 14 Mar 2005 05:18:28 -0000 1.19 --- opal-ode.vcproj 21 Mar 2005 04:29:06 -0000 1.20 *************** *** 252,255 **** --- 252,258 ---- </File> <File + RelativePath="..\src\PostStepEventHandler.h"> + </File> + <File RelativePath="..\src\RaycastSensor.h"> </File> |