Update of /cvsroot/opal/opal/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4002/src
Modified Files:
Defines.h Simulator.cpp Simulator.h
Log Message:
added a Simulator option to change the "max correcting velocity" for penetrating objects
Index: Simulator.cpp
===================================================================
RCS file: /cvsroot/opal/opal/src/Simulator.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** Simulator.cpp 12 Apr 2005 06:46:43 -0000 1.59
--- Simulator.cpp 12 Apr 2005 21:23:45 -0000 1.60
***************
*** 51,54 ****
--- 51,55 ----
//setMaxLinearVel(defaults::maxLinearVel);
//setMaxAngularVel(defaults::maxAngularVel);
+ setMaxCorrectingVel(defaults::maxCorrectingVel);
setUserData(NULL);
setPostStepEventHandler(NULL);
***************
*** 864,867 ****
--- 865,879 ----
}
+ void Simulator::setMaxCorrectingVel(real vel)
+ {
+ assert(vel > 0);
+ mMaxCorrectingVel = vel;
+ }
+
+ real Simulator::getMaxCorrectingVel()const
+ {
+ return mMaxCorrectingVel;
+ }
+
void Simulator::addSolid(Solid* s)
{
Index: Defines.h
===================================================================
RCS file: /cvsroot/opal/opal/src/Defines.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** Defines.h 12 Apr 2005 06:46:43 -0000 1.74
--- Defines.h 12 Apr 2005 21:23:44 -0000 1.75
***************
*** 284,287 ****
--- 284,288 ----
//const real maxAngularVel = (real)1000.0;
const bool staticSleepingContactsEnabled = false;
+ const real maxCorrectingVel=(real)40.0;
/// All groups make contacts with all other groups by default.
***************
*** 398,402 ****
//note: max and min mass ratios must be the inverse of each other
! const real maxMassRatio=(real)1000.0;
const real minERP=(real)0.1;
const real maxERP=(real)0.9;
--- 399,403 ----
//note: max and min mass ratios must be the inverse of each other
! //const real maxMassRatio=(real)1000.0;
const real minERP=(real)0.1;
const real maxERP=(real)0.9;
***************
*** 404,408 ****
const real jointFudgeFactor=(real)0.1;
const real maxFriction=(real)1000.0;
- const real maxCorrectingVel=(real)40.0;
const real surfaceLayer=(real)0.001;
}
--- 405,408 ----
Index: Simulator.h
===================================================================
RCS file: /cvsroot/opal/opal/src/Simulator.h,v
retrieving revision 1.97
retrieving revision 1.98
diff -C2 -d -r1.97 -r1.98
*** Simulator.h 12 Apr 2005 06:46:43 -0000 1.97
--- Simulator.h 12 Apr 2005 21:23:45 -0000 1.98
***************
*** 131,134 ****
--- 131,142 ----
virtual SolverAccuracyLevel OPAL_CALL getSolverAccuracy()const;
+ /// Sets the maximum correcting velocity for interpenetrating
+ /// objects. The given velocity must be positive.
+ virtual void OPAL_CALL setMaxCorrectingVel(real vel);
+
+ /// Returns the maximum correcting velocity for interpenetrating
+ /// objects.
+ virtual real OPAL_CALL getMaxCorrectingVel()const;
+
/// Sets the maximum linear velocity for any Solid. This limits
/// Solid motion to prevent explosions from numerical innacuracy.
***************
*** 397,400 ****
--- 405,412 ----
PostStepEventHandler* mPostStepEventHandler;
+ /// The maximum correcting velocity used when forcing apart
+ /// interpenetrating objects.
+ real mMaxCorrectingVel;
+
private:
};
|