|
From: Markus R. <rol...@us...> - 2007-06-13 13:19:21
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24088 Modified Files: Tag: ROSIMPORTER_XLAB hingejoint.cpp hingejoint.h universaljoint.cpp universaljoint.h Log Message: - const correctness Index: hingejoint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/hingejoint.cpp,v retrieving revision 1.5 retrieving revision 1.5.8.1 diff -C2 -d -r1.5 -r1.5.8.1 *** hingejoint.cpp 19 Feb 2006 13:15:26 -0000 1.5 --- hingejoint.cpp 13 Jun 2007 13:19:15 -0000 1.5.8.1 *************** *** 118,127 **** } ! float HingeJoint::GetAngle() { return gRadToDeg(dJointGetHingeAngle(mODEJoint)); } ! float HingeJoint::GetAngleRate() { return gRadToDeg(dJointGetHingeAngleRate(mODEJoint)); --- 118,127 ---- } ! float HingeJoint::GetAngle() const { return gRadToDeg(dJointGetHingeAngle(mODEJoint)); } ! float HingeJoint::GetAngleRate() const { return gRadToDeg(dJointGetHingeAngleRate(mODEJoint)); Index: hingejoint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/hingejoint.h,v retrieving revision 1.5 retrieving revision 1.5.8.1 diff -C2 -d -r1.5 -r1.5.8.1 *** hingejoint.h 19 Feb 2006 13:15:26 -0000 1.5 --- hingejoint.h 13 Jun 2007 13:19:15 -0000 1.5.8.1 *************** *** 63,70 **** bodies, or between the body and the static environment. */ ! float GetAngle(); /** returns the time derivate of the hinge angle */ ! float GetAngleRate(); /** sets a joint parameter value */ --- 63,70 ---- bodies, or between the body and the static environment. */ ! float GetAngle() const; /** returns the time derivate of the hinge angle */ ! float GetAngleRate() const; /** sets a joint parameter value */ Index: universaljoint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/universaljoint.cpp,v retrieving revision 1.3 retrieving revision 1.3.8.1 diff -C2 -d -r1.3 -r1.3.8.1 *** universaljoint.cpp 12 Feb 2006 11:36:52 -0000 1.3 --- universaljoint.cpp 13 Jun 2007 13:19:15 -0000 1.3.8.1 *************** *** 79,83 **** } ! void UniversalJoint::SetAxis1(Vector3f & axis) { Vector3f first(GetWorldTransform().Rotate(axis)); --- 79,83 ---- } ! void UniversalJoint::SetAxis1(const Vector3f & axis) { Vector3f first(GetWorldTransform().Rotate(axis)); *************** *** 85,89 **** } ! void UniversalJoint::SetAxis2(Vector3f & axis) { Vector3f second(GetWorldTransform().Rotate(axis)); --- 85,89 ---- } ! void UniversalJoint::SetAxis2(const Vector3f & axis) { Vector3f second(GetWorldTransform().Rotate(axis)); *************** *** 91,95 **** } ! Vector3f UniversalJoint::GetAxis(EAxisIndex idx) { Vector3f vec(0,0,0); --- 91,95 ---- } ! Vector3f UniversalJoint::GetAxis(EAxisIndex idx) const { Vector3f vec(0,0,0); *************** *** 118,122 **** } ! float UniversalJoint::GetAngle(EAxisIndex idx) { switch (idx) --- 118,122 ---- } ! float UniversalJoint::GetAngle(EAxisIndex idx) const { switch (idx) *************** *** 133,137 **** } ! float UniversalJoint::GetAngleRate(EAxisIndex idx) { switch (idx) --- 133,137 ---- } ! float UniversalJoint::GetAngleRate(EAxisIndex idx) const { switch (idx) Index: universaljoint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/universaljoint.h,v retrieving revision 1.3 retrieving revision 1.3.8.1 diff -C2 -d -r1.3 -r1.3.8.1 *** universaljoint.h 12 Feb 2006 11:36:52 -0000 1.3 --- universaljoint.h 13 Jun 2007 13:19:15 -0000 1.3.8.1 *************** *** 48,57 **** \param axis a vector describing the axis in relative coordinates */ ! void SetAxis1(salt::Vector3f & axis); /** This function sets up the second axis of the joint \param axis a vector describing the axis in local coordinates */ ! void SetAxis2(salt::Vector3f & axis); /** returns the vector describing one of the two axis --- 48,57 ---- \param axis a vector describing the axis in relative coordinates */ ! void SetAxis1(const salt::Vector3f & axis); /** This function sets up the second axis of the joint \param axis a vector describing the axis in local coordinates */ ! void SetAxis2(const salt::Vector3f & axis); /** returns the vector describing one of the two axis *************** *** 59,63 **** \param idx index of the desired axis */ ! salt::Vector3f GetAxis(EAxisIndex idx); /** returns one of the axis angles in degrees, measured between --- 59,63 ---- \param idx index of the desired axis */ ! salt::Vector3f GetAxis(EAxisIndex idx) const; /** returns one of the axis angles in degrees, measured between *************** *** 65,72 **** environment. */ ! float GetAngle(EAxisIndex idx); /** returns the time derivate of one of the hinge angles */ ! float GetAngleRate(EAxisIndex idx); /** sets a joint parameter value */ --- 65,72 ---- environment. */ ! float GetAngle(EAxisIndex idx) const; /** returns the time derivate of one of the hinge angles */ ! float GetAngleRate(EAxisIndex idx) const; /** sets a joint parameter value */ |