|
From: Markus R. <rol...@us...> - 2006-02-12 11:25:49
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26032 Modified Files: contactjointhandler.h contactjointhandler.cpp Log Message: - added some more accessors Index: contactjointhandler.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/contactjointhandler.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** contactjointhandler.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- contactjointhandler.cpp 12 Feb 2006 11:25:36 -0000 1.2 *************** *** 169,172 **** --- 169,178 ---- } + const dSurfaceParameters& + ContactJointHandler::SetSurfaceParameter() const + { + return mSurfaceParameter; + } + void ContactJointHandler::SetContactMode(int mode, bool set) *************** *** 181,184 **** --- 187,196 ---- } + int + ContactJointHandler::GetContactMode() const + { + return mSurfaceParameter.mode; + } + void ContactJointHandler::SetContactBounceMode(bool set) *************** *** 193,196 **** --- 205,214 ---- } + float + ContactJointHandler::GetMinBounceVel() const + { + return mSurfaceParameter.bounce_vel; + } + void ContactJointHandler::SetBounceValue(float bounce) *************** *** 199,202 **** --- 217,226 ---- } + float + ContactJointHandler::GetBounceValue() const + { + return mSurfaceParameter.bounce; + } + void ContactJointHandler::SetContactSoftERPMode(bool set) *************** *** 212,215 **** --- 236,245 ---- } + float + ContactJointHandler::GetContactSoftERP() const + { + return mSurfaceParameter.soft_erp; + } + void ContactJointHandler::SetContactSoftCFMMode(bool set) *************** *** 224,227 **** --- 254,262 ---- } + float ContactJointHandler::GetContactSoftCFM() const + { + return mSurfaceParameter.soft_cfm; + } + void ContactJointHandler::SetContactSlipMode (bool set) { *************** *** 236,239 **** --- 271,286 ---- } + float + ContactJointHandler::GetContactSlip1() const + { + return mSurfaceParameter.slip1; + } + + float + ContactJointHandler::GetContactSlip2() const + { + return mSurfaceParameter.slip2; + } + void ContactJointHandler::SetContactMu(float mu) { *************** *** 241,244 **** --- 288,297 ---- } + float ContactJointHandler::GetContactMu() const + { + return mSurfaceParameter.mu; + } + + Index: contactjointhandler.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/contactjointhandler.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** contactjointhandler.h 5 Dec 2005 21:16:49 -0000 1.1 --- contactjointhandler.h 12 Feb 2006 11:25:36 -0000 1.2 *************** *** 63,69 **** --- 63,79 ---- void SetSurfaceParameter(const dSurfaceParameters& surface); + /** returns the surface parameters for the contact joints taht the + CollisionHandler creates + */ + const dSurfaceParameters& SetSurfaceParameter() const; + /** sets or resets a contact mode flag in the surface parameter*/ void SetContactMode(int mode, bool set); + /** returns the current set of contact mode flags in the surface + parameter + */ + int GetContactMode() const; + /** sets or resets the dContactBounce mode flag */ void SetContactBounceMode(bool set); *************** *** 72,78 **** --- 82,94 ---- void SetBounceValue(float bounce); + /** returns the bounce value */ + float GetBounceValue() const; + /** sets the mininum incoming velocity necessary for bounce */ void SetMinBounceVel(float vel); + /** returns the mininum incoming velocity necessary for bounce */ + float GetMinBounceVel() const; + /** sets or resets the error reduction parameter (ERP) mode, useful to make surfaces soft *************** *** 83,86 **** --- 99,105 ---- void SetContactSoftERP(float erp); + /** returns the contact normal error reduction parameter (ERP) */ + float GetContactSoftERP() const; + /** sets or resets the constraint force mixing mode (CFM), useful to make surfaces soft *************** *** 88,106 **** void SetContactSoftCFMMode(bool set); ! /** sets the constraint force mixing parameter (CFM) ! */ void SetContactSoftCFM(float cfm); /** sets or resets the force dependent contact slip mode (FDS) */ void SetContactSlipMode (bool set); ! /** sets the force dependent slip (FDS) ! */ void SetContactSlip(float slip); /** sets the Coulomb friction coefficient */ void SetContactMu(float mu); protected: f_inline float MixValues(const float v1, const float v2, const int n) const; --- 107,141 ---- void SetContactSoftCFMMode(bool set); ! /** sets the constraint force mixing parameter (CFM) */ void SetContactSoftCFM(float cfm); + /** returns the constraint force mixing parameter (CFM) */ + float GetContactSoftCFM() const; + /** sets or resets the force dependent contact slip mode (FDS) */ void SetContactSlipMode (bool set); ! /** sets the force dependent slip (FDS) in both friction ! directions ! */ void SetContactSlip(float slip); + /** returns the force dependent slip in the first slip direction + (FDS) + */ + float GetContactSlip1() const; + + /** returns the force dependent slip in the second slip direction + (FDS) + */ + float GetContactSlip2() const; + /** sets the Coulomb friction coefficient */ void SetContactMu(float mu); + /** returns the Coulomb friction coefficient */ + float GetContactMu() const; + protected: f_inline float MixValues(const float v1, const float v2, const int n) const; |