|
From: Markus R. <rol...@us...> - 2006-02-12 11:37:20
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28956 Modified Files: angularmotor.cpp angularmotor.h balljoint.cpp balljoint.h dragcontroller.cpp dragcontroller.h fixedjoint.cpp fixedjoint.h hinge2joint.cpp hinge2joint.h hingejoint.cpp hingejoint.h joint.cpp joint.h sliderjoint.cpp sliderjoint.h universaljoint.cpp universaljoint.h Log Message: - const correctnes for GetXXX() methods Index: hingejoint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/hingejoint.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** hingejoint.cpp 2 Jan 2006 19:07:10 -0000 1.3 --- hingejoint.cpp 12 Feb 2006 11:36:52 -0000 1.4 *************** *** 93,97 **** // calculate hinge axis (pos. y, relative to world transform) Vector3f forward(GetWorldTransform().Rotate(Vector3f(0,1,0))); ! dJointSetHingeAxis(mODEJoint, forward[0], forward[1], forward[2]); break; } --- 93,97 ---- // calculate hinge axis (pos. y, relative to world transform) Vector3f forward(GetWorldTransform().Rotate(Vector3f(0,1,0))); ! dJointSetHingeAxis(mODEJoint, forward[0], forward[1], forward[2]); break; } *************** *** 130,134 **** } ! float HingeJoint::GetParameter(int parameter) { return dJointGetHingeParam(mODEJoint, parameter); --- 130,134 ---- } ! float HingeJoint::GetParameter(int parameter) const { return dJointGetHingeParam(mODEJoint, parameter); Index: angularmotor.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/angularmotor.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** angularmotor.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- angularmotor.cpp 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 112,116 **** } ! float AngularMotor::GetParameter(int parameter) { return dJointGetAMotorParam(mODEJoint, parameter); --- 112,116 ---- } ! float AngularMotor::GetParameter(int parameter) const { return dJointGetAMotorParam(mODEJoint, parameter); Index: dragcontroller.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/dragcontroller.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dragcontroller.h 5 Dec 2005 21:16:49 -0000 1.1 --- dragcontroller.h 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 39,43 **** // returns the applied linear drag ! float GetLinearDrag(); // sets the applied linear drag --- 39,43 ---- // returns the applied linear drag ! float GetLinearDrag() const; // sets the applied linear drag *************** *** 45,49 **** // returns the applied angular drag ! float GetAngularDrag(); // sets the applied angular drag --- 45,49 ---- // returns the applied angular drag ! float GetAngularDrag() const; // sets the applied angular drag Index: dragcontroller.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/dragcontroller.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dragcontroller.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- dragcontroller.cpp 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 56,60 **** } ! float DragController::GetLinearDrag() { return mLinearDrag; --- 56,60 ---- } ! float DragController::GetLinearDrag() const { return mLinearDrag; *************** *** 66,70 **** } ! float DragController::GetAngularDrag() { return mAngularDrag; --- 66,70 ---- } ! float DragController::GetAngularDrag() const { return mAngularDrag; Index: sliderjoint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/sliderjoint.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sliderjoint.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- sliderjoint.cpp 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 68,72 **** } ! float SliderJoint::GetParameter(int parameter) { return dJointGetSliderParam(mODEJoint, parameter); --- 68,72 ---- } ! float SliderJoint::GetParameter(int parameter) const { return dJointGetSliderParam(mODEJoint, parameter); Index: hinge2joint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/hinge2joint.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hinge2joint.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- hinge2joint.cpp 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 123,127 **** } ! float Hinge2Joint::GetParameter(int parameter) { return dJointGetHinge2Param(mODEJoint, parameter); --- 123,127 ---- } ! float Hinge2Joint::GetParameter(int parameter) const { return dJointGetHinge2Param(mODEJoint, parameter); Index: universaljoint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/universaljoint.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** universaljoint.h 6 Jan 2006 13:53:38 -0000 1.2 --- universaljoint.h 12 Feb 2006 11:36:52 -0000 1.3 *************** *** 57,61 **** /** returns the vector describing one of the two axis (in local coordinates) ! \param idx index of the desired axis */ salt::Vector3f GetAxis(EAxisIndex idx); --- 57,61 ---- /** returns the vector describing one of the two axis (in local coordinates) ! \param idx index of the desired axis */ salt::Vector3f GetAxis(EAxisIndex idx); *************** *** 74,78 **** /** returns a joint parameter value */ ! virtual float GetParameter(int parameter); protected: --- 74,78 ---- /** returns a joint parameter value */ ! virtual float GetParameter(int parameter) const; protected: Index: sliderjoint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/sliderjoint.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sliderjoint.h 5 Dec 2005 21:16:49 -0000 1.1 --- sliderjoint.h 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 55,59 **** /** returns a joint parameter value */ ! virtual float GetParameter(int parameter); }; --- 55,59 ---- /** returns a joint parameter value */ ! virtual float GetParameter(int parameter) const; }; Index: hinge2joint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/hinge2joint.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hinge2joint.h 5 Dec 2005 21:16:49 -0000 1.1 --- hinge2joint.h 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 62,66 **** /** returns a joint parameter value */ ! virtual float GetParameter(int parameter); }; --- 62,66 ---- /** returns a joint parameter value */ ! virtual float GetParameter(int parameter) const; }; Index: joint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/joint.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** joint.cpp 18 Dec 2005 18:07:10 -0000 1.3 --- joint.cpp 12 Feb 2006 11:36:52 -0000 1.4 *************** *** 162,166 **** } ! int Joint::GetType() { return dJointGetType(mODEJoint); --- 162,166 ---- } ! int Joint::GetType() const { return dJointGetType(mODEJoint); *************** *** 221,230 **** } ! bool Joint::FeedBackEnabled() { return (dJointGetFeedback(mODEJoint) != 0); } ! Vector3f Joint::GetFeedbackForce(EBodyIndex idx) { dJointFeedback* fb = mFeedback.get(); --- 221,230 ---- } ! bool Joint::FeedBackEnabled() const { return (dJointGetFeedback(mODEJoint) != 0); } ! Vector3f Joint::GetFeedbackForce(EBodyIndex idx) const { dJointFeedback* fb = mFeedback.get(); *************** *** 255,259 **** } ! Vector3f Joint::GetFeedbackTorque(EBodyIndex idx) { dJointFeedback* fb = mFeedback.get(); --- 255,259 ---- } ! Vector3f Joint::GetFeedbackTorque(EBodyIndex idx) const { dJointFeedback* fb = mFeedback.get(); *************** *** 289,293 **** } ! float Joint::GetBounce(EAxisIndex idx) { return GetParameter(dParamBounce + (idx * dParamGroup)); --- 289,293 ---- } ! float Joint::GetBounce(EAxisIndex idx) const { return GetParameter(dParamBounce + (idx * dParamGroup)); *************** *** 299,303 **** } ! float Joint::GetLowStopPos(EAxisIndex idx) { return GetParameter(dParamLoStop + (idx * dParamGroup)); --- 299,303 ---- } ! float Joint::GetLowStopPos(EAxisIndex idx) const { return GetParameter(dParamLoStop + (idx * dParamGroup)); *************** *** 309,313 **** } ! float Joint::GetHighStopPos(EAxisIndex idx) { return GetParameter(dParamHiStop + (idx * dParamGroup)); --- 309,313 ---- } ! float Joint::GetHighStopPos(EAxisIndex idx) const { return GetParameter(dParamHiStop + (idx * dParamGroup)); *************** *** 319,323 **** } ! float Joint::GetLowStopDeg(EAxisIndex idx) { return gRadToDeg(GetParameter(dParamLoStop + (idx * dParamGroup))); --- 319,323 ---- } ! float Joint::GetLowStopDeg(EAxisIndex idx) const { return gRadToDeg(GetParameter(dParamLoStop + (idx * dParamGroup))); *************** *** 329,333 **** } ! float Joint::GetHighStopDeg(EAxisIndex idx) { return gRadToDeg(GetParameter(dParamHiStop + (idx * dParamGroup))); --- 329,333 ---- } ! float Joint::GetHighStopDeg(EAxisIndex idx) const { return gRadToDeg(GetParameter(dParamHiStop + (idx * dParamGroup))); *************** *** 339,343 **** } ! float Joint::GetCFM(EAxisIndex idx) { return GetParameter(dParamCFM + (idx * dParamGroup)); --- 339,343 ---- } ! float Joint::GetCFM(EAxisIndex idx) const { return GetParameter(dParamCFM + (idx * dParamGroup)); *************** *** 349,353 **** } ! float Joint::GetStopCFM(EAxisIndex idx) { return GetParameter(dParamStopCFM + (idx * dParamGroup)); --- 349,353 ---- } ! float Joint::GetStopCFM(EAxisIndex idx) const { return GetParameter(dParamStopCFM + (idx * dParamGroup)); *************** *** 359,363 **** } ! float Joint::GetStopERP(EAxisIndex idx) { return GetParameter(dParamStopERP + (idx * dParamGroup)); --- 359,363 ---- } ! float Joint::GetStopERP(EAxisIndex idx) const { return GetParameter(dParamStopERP + (idx * dParamGroup)); *************** *** 369,373 **** } ! float Joint::GetSuspensionERP(EAxisIndex idx) { return GetParameter(dParamSuspensionERP + (idx * dParamGroup)); --- 369,373 ---- } ! float Joint::GetSuspensionERP(EAxisIndex idx) const { return GetParameter(dParamSuspensionERP + (idx * dParamGroup)); *************** *** 379,383 **** } ! float Joint::GetSuspensionCFM(EAxisIndex idx) { return GetParameter(dParamSuspensionCFM + (idx * dParamGroup)); --- 379,383 ---- } ! float Joint::GetSuspensionCFM(EAxisIndex idx) const { return GetParameter(dParamSuspensionCFM + (idx * dParamGroup)); *************** *** 389,393 **** } ! float Joint::GetLinearMotorVelocity(EAxisIndex idx) { return GetParameter(dParamVel + (idx * dParamGroup)); --- 389,393 ---- } ! float Joint::GetLinearMotorVelocity(EAxisIndex idx) const { return GetParameter(dParamVel + (idx * dParamGroup)); *************** *** 399,403 **** } ! float Joint::GetAngularMotorVelocity(EAxisIndex idx) { return gRadToDeg(GetParameter(dParamVel + (idx * dParamGroup))); --- 399,403 ---- } ! float Joint::GetAngularMotorVelocity(EAxisIndex idx) const { return gRadToDeg(GetParameter(dParamVel + (idx * dParamGroup))); *************** *** 409,413 **** } ! float Joint::GetMaxMotorForce(EAxisIndex idx) { return GetParameter(dParamFMax + (idx * dParamGroup)); --- 409,413 ---- } ! float Joint::GetMaxMotorForce(EAxisIndex idx) const { return GetParameter(dParamFMax + (idx * dParamGroup)); Index: universaljoint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/universaljoint.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** universaljoint.cpp 6 Jan 2006 13:53:38 -0000 1.2 --- universaljoint.cpp 12 Feb 2006 11:36:52 -0000 1.3 *************** *** 153,157 **** } ! float UniversalJoint::GetParameter(int parameter) { return dJointGetUniversalParam(mODEJoint, parameter); --- 153,157 ---- } ! float UniversalJoint::GetParameter(int parameter) const { return dJointGetUniversalParam(mODEJoint, parameter); Index: hingejoint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/hingejoint.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** hingejoint.h 2 Jan 2006 19:07:11 -0000 1.3 --- hingejoint.h 12 Feb 2006 11:36:52 -0000 1.4 *************** *** 66,70 **** /** returns a joint parameter value */ ! virtual float GetParameter(int parameter); protected: --- 66,70 ---- /** returns a joint parameter value */ ! virtual float GetParameter(int parameter) const; protected: Index: balljoint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/balljoint.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** balljoint.h 5 Dec 2005 21:16:49 -0000 1.1 --- balljoint.h 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 53,57 **** /** returns a joint parameter value */ ! virtual float GetParameter(int parameter); }; --- 53,57 ---- /** returns a joint parameter value */ ! virtual float GetParameter(int parameter) const; }; Index: joint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/joint.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** joint.h 5 Dec 2005 21:16:49 -0000 1.1 --- joint.h 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 95,99 **** dJointTypeHinge2, dJointTypeFixed or dJointTypeAMotor. */ ! int GetType(); /** returns true if the two given bodies are connected by a --- 95,99 ---- dJointTypeHinge2, dJointTypeFixed or dJointTypeAMotor. */ ! int GetType() const; /** returns true if the two given bodies are connected by a *************** *** 121,135 **** /** returns true if the joint is set to collect feedback information */ ! bool FeedBackEnabled(); /** queries the force that the joint applied to one body attached to it during the last timestep. */ ! salt::Vector3f GetFeedbackForce(EBodyIndex idx); /** queries the torque that the joint applied to one body attached to it during the last timestep. */ ! salt::Vector3f GetFeedbackTorque(EBodyIndex idx); /** sets the bouncyness of the stops. This is a restitution --- 121,135 ---- /** returns true if the joint is set to collect feedback information */ ! bool FeedBackEnabled() const; /** queries the force that the joint applied to one body attached to it during the last timestep. */ ! salt::Vector3f GetFeedbackForce(EBodyIndex idx) const; /** queries the torque that the joint applied to one body attached to it during the last timestep. */ ! salt::Vector3f GetFeedbackTorque(EBodyIndex idx) const; /** sets the bouncyness of the stops. This is a restitution *************** *** 140,144 **** /** returns the bouncyness of the stops */ ! float GetBounce(EAxisIndex idx); /** sets the low stop angle in degrees, this stop must be greater --- 140,144 ---- /** returns the bouncyness of the stops */ ! float GetBounce(EAxisIndex idx) const; /** sets the low stop angle in degrees, this stop must be greater *************** *** 148,152 **** /** returns the low stop angle in degrees */ ! float GetLowStopDeg(EAxisIndex idx); /** sets the high stop angle in degrees, this stop must be less --- 148,152 ---- /** returns the low stop angle in degrees */ ! float GetLowStopDeg(EAxisIndex idx) const; /** sets the high stop angle in degrees, this stop must be less *************** *** 156,160 **** /** returns the high stop angle in degrees */ ! float GetHighStopDeg(EAxisIndex idx); /** sets the low stop position */ --- 156,160 ---- /** returns the high stop angle in degrees */ ! float GetHighStopDeg(EAxisIndex idx) const; /** sets the low stop position */ *************** *** 162,166 **** /** returns the low stop position */ ! float GetLowStopPos(EAxisIndex idx); /** sets the high stop position */ --- 162,166 ---- /** returns the low stop position */ ! float GetLowStopPos(EAxisIndex idx) const; /** sets the high stop position */ *************** *** 168,172 **** /** returns the high stop position */ ! float GetHighStopPos(EAxisIndex idx); /** the constraint force mixing (CFM) value used when not at a --- 168,172 ---- /** returns the high stop position */ ! float GetHighStopPos(EAxisIndex idx) const; /** the constraint force mixing (CFM) value used when not at a *************** *** 176,180 **** /** returns the constraint force mixing value used when not a a stop */ ! float GetCFM(EAxisIndex idx); /** sets the constraint force mixing (CFM) value used by the --- 176,180 ---- /** returns the constraint force mixing value used when not a a stop */ ! float GetCFM(EAxisIndex idx) const; /** sets the constraint force mixing (CFM) value used by the *************** *** 187,191 **** /** returns the constraint force mixing value used by the stops */ ! float GetStopCFM(EAxisIndex idx); /** sets the error reduction parameter (ERP) used by the stops. */ --- 187,191 ---- /** returns the constraint force mixing value used by the stops */ ! float GetStopCFM(EAxisIndex idx) const; /** sets the error reduction parameter (ERP) used by the stops. */ *************** *** 193,197 **** /** returns the error reduction parameter used by the stops */ ! float GetStopERP(EAxisIndex idx); /** sets the suspension error reduction parameter (ERP). As of ode --- 193,197 ---- /** returns the error reduction parameter used by the stops */ ! float GetStopERP(EAxisIndex idx) const; /** sets the suspension error reduction parameter (ERP). As of ode *************** *** 203,207 **** ode 0.039 this is only implemented on the hinge-2 joint. */ ! float GetSuspensionERP(EAxisIndex idx); /** sets the suspension constraint force mixing value. As of ode --- 203,207 ---- ode 0.039 this is only implemented on the hinge-2 joint. */ ! float GetSuspensionERP(EAxisIndex idx) const; /** sets the suspension constraint force mixing value. As of ode *************** *** 213,217 **** ode 0.039 this is only implemented on the hinge-2 joint. */ ! float GetSuspensionCFM(EAxisIndex idx); /** sets the linear motor velocity */ --- 213,217 ---- ode 0.039 this is only implemented on the hinge-2 joint. */ ! float GetSuspensionCFM(EAxisIndex idx) const; /** sets the linear motor velocity */ *************** *** 219,223 **** /** returns the linear motor velocity */ ! float GetLinearMotorVelocity(EAxisIndex idx); /** sets the angular motor velocity in degrees */ --- 219,223 ---- /** returns the linear motor velocity */ ! float GetLinearMotorVelocity(EAxisIndex idx) const; /** sets the angular motor velocity in degrees */ *************** *** 225,229 **** /** returns the angular motor velocity in degrees */ ! float GetAngularMotorVelocity(EAxisIndex idx); /** sets the maximum force or torque that the motor will use to --- 225,229 ---- /** returns the angular motor velocity in degrees */ ! float GetAngularMotorVelocity(EAxisIndex idx) const; /** sets the maximum force or torque that the motor will use to *************** *** 237,241 **** achieve the desired velocity. */ ! float GetMaxMotorForce(EAxisIndex idx); protected: --- 237,241 ---- achieve the desired velocity. */ ! float GetMaxMotorForce(EAxisIndex idx) const; protected: *************** *** 250,254 **** /** returns a joint parameter value */ ! virtual float GetParameter(int parameter) = 0; protected: --- 250,254 ---- /** returns a joint parameter value */ ! virtual float GetParameter(int parameter) const = 0; protected: Index: angularmotor.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/angularmotor.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** angularmotor.h 5 Dec 2005 21:16:49 -0000 1.1 --- angularmotor.h 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 123,127 **** /** returns a joint parameter value */ ! virtual float GetParameter(int parameter); }; --- 123,127 ---- /** returns a joint parameter value */ ! virtual float GetParameter(int parameter) const; }; Index: fixedjoint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/fixedjoint.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fixedjoint.h 5 Dec 2005 21:16:49 -0000 1.1 --- fixedjoint.h 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 43,47 **** /** returns a joint parameter value */ ! virtual float GetParameter(int parameter); }; --- 43,47 ---- /** returns a joint parameter value */ ! virtual float GetParameter(int parameter) const; }; Index: fixedjoint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/fixedjoint.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fixedjoint.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- fixedjoint.cpp 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 49,53 **** } ! float FixedJoint::GetParameter(int /*parameter*/) { // no ode get param fkt. defined --- 49,53 ---- } ! float FixedJoint::GetParameter(int /*parameter*/) const { // no ode get param fkt. defined Index: balljoint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/balljoint.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** balljoint.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- balljoint.cpp 12 Feb 2006 11:36:52 -0000 1.2 *************** *** 82,86 **** } ! float BallJoint::GetParameter(int /*parameter*/) { // no ode get param fkt. defined --- 82,86 ---- } ! float BallJoint::GetParameter(int /*parameter*/) const { // no ode get param fkt. defined |