[Opal-commits] opal/src RaycastSensor.cpp,1.1,1.2 RaycastSensor.h,1.1,1.2 Simulator.h,1.82,1.83
Status: Inactive
Brought to you by:
tylerstreeter
|
From: Andres R. <ar...@us...> - 2005-03-10 21:13:11
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3842/src Modified Files: RaycastSensor.cpp RaycastSensor.h Simulator.h Log Message: added a raycast that takes ray length separately for optimization Index: RaycastSensor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/RaycastSensor.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RaycastSensor.cpp 9 Mar 2005 02:09:50 -0000 1.1 --- RaycastSensor.cpp 10 Mar 2005 21:13:00 -0000 1.2 *************** *** 58,61 **** --- 58,66 ---- } + const RaycastResult& RaycastSensor::fireRay(real length) + { + return mSim->internal_fireRay(mData.ray, length); + } + void RaycastSensor::setEnabled(bool e) { Index: RaycastSensor.h =================================================================== RCS file: /cvsroot/opal/opal/src/RaycastSensor.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RaycastSensor.h 9 Mar 2005 02:09:50 -0000 1.1 --- RaycastSensor.h 10 Mar 2005 21:13:00 -0000 1.2 *************** *** 68,72 **** /// every time step because that would be a waste of time in most /// cases; it must be "fired" manually. ! class RaycastSensor : public Sensor { public: --- 68,72 ---- /// every time step because that would be a waste of time in most /// cases; it must be "fired" manually. ! class OPAL_DECL RaycastSensor : public Sensor { public: *************** *** 86,89 **** --- 86,93 ---- virtual const RaycastResult& OPAL_CALL fireRay(); + /// Fires a ray of a given length into the Sensor's environment + /// information about the first intersection encountered. + virtual const RaycastResult& OPAL_CALL fireRay( real length ); + virtual void OPAL_CALL setEnabled(bool e); Index: Simulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.h,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** Simulator.h 9 Mar 2005 02:09:50 -0000 1.82 --- Simulator.h 10 Mar 2005 21:13:00 -0000 1.83 *************** *** 229,234 **** /// unnormalized ray, which is important because the ray's length /// is used when casting the ray into the scene. ! virtual const RaycastResult& OPAL_CALL internal_fireRay( ! const Rayr& r) = 0; /// Returns the Simulator's contact group flags. --- 229,235 ---- /// unnormalized ray, which is important because the ray's length /// is used when casting the ray into the scene. ! virtual const RaycastResult& OPAL_CALL internal_fireRay( const Rayr& r) = 0; ! ! virtual const RaycastResult& OPAL_CALL internal_fireRay( const Rayr& r, real length ) = 0; /// Returns the Simulator's contact group flags. |