Update of /cvsroot/opal/opal/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10750/src
Modified Files:
Joint.h ThrusterMotor.cpp ThrusterMotor.h
Log Message:
changed how friction is used (now sqrt(f1*f2) instead of just f1*f2); minor changes to sample apps
Index: Joint.h
===================================================================
RCS file: /cvsroot/opal/opal/src/Joint.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** Joint.h 3 Mar 2005 02:32:28 -0000 1.59
--- Joint.h 4 Mar 2005 05:09:24 -0000 1.60
***************
*** 112,116 ****
/// Sets the Joint's limit angles (in degrees for rotational axes,
! /// distance for linear axes).
/// No limits are applied
/// if this is not called. The Wheel Joint does not
--- 112,116 ----
/// Sets the Joint's limit angles (in degrees for rotational axes,
! /// distance for translational axes).
/// No limits are applied
/// if this is not called. The Wheel Joint does not
***************
*** 120,128 ****
/// Returns the low limit for a given axis (angle in degrees for
! /// rotational axes, distance for linear axes).
virtual real OPAL_CALL getLowLimit(int axisNum)const;
/// Returns the high limit for a given axis (angle in degrees for
! /// rotational axes, distance for linear axes).
virtual real OPAL_CALL getHighLimit(int axisNum)const;
--- 120,128 ----
/// Returns the low limit for a given axis (angle in degrees for
! /// rotational axes, distance for translational axes).
virtual real OPAL_CALL getLowLimit(int axisNum)const;
/// Returns the high limit for a given axis (angle in degrees for
! /// rotational axes, distance for translational axes).
virtual real OPAL_CALL getHighLimit(int axisNum)const;
***************
*** 146,164 ****
/// For rotational axes, returns the current angle in degrees
! /// measured from the initial Joint configuration. For linear
/// axes, simply returns 0.
virtual real OPAL_CALL getAngle(int axisNum)const = 0;
! /// For linear axes, returns the distance from the initial Joint
! /// configuration. For rotational axes, simply returns 0.
virtual real OPAL_CALL getDistance(int axisNum)const = 0;
/// Returns the current rate (degrees per second for rotational
! /// axes, distance units per second for linear axes) for a
/// given axis.
virtual real OPAL_CALL getVelocity(int axisNum)const = 0;
/// Applies a force to this Joint's Solids. To be used for
! /// linear Joints. This does nothing if the Joint is disabled.
virtual void OPAL_CALL addForce(int axisNum, real magnitude,
real duration, bool singleStep=false);
--- 146,164 ----
/// For rotational axes, returns the current angle in degrees
! /// measured from the initial Joint configuration. For translational
/// axes, simply returns 0.
virtual real OPAL_CALL getAngle(int axisNum)const = 0;
! /// For translational axes, returns the distance from the initial
! /// Joint configuration. For rotational axes, simply returns 0.
virtual real OPAL_CALL getDistance(int axisNum)const = 0;
/// Returns the current rate (degrees per second for rotational
! /// axes, distance units per second for translational axes) for a
/// given axis.
virtual real OPAL_CALL getVelocity(int axisNum)const = 0;
/// Applies a force to this Joint's Solids. To be used for
! /// translational axes. This does nothing if the Joint is disabled.
virtual void OPAL_CALL addForce(int axisNum, real magnitude,
real duration, bool singleStep=false);
***************
*** 267,272 ****
int mNumAxes;
! // This data stores which axes are rotational, as opposed to linear
! // degrees of freedom.
bool mAxisRotational[3];
--- 267,272 ----
int mNumAxes;
! // This data stores which axes are rotational, as opposed to
! // translational, degrees of freedom.
bool mAxisRotational[3];
Index: ThrusterMotor.h
===================================================================
RCS file: /cvsroot/opal/opal/src/ThrusterMotor.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ThrusterMotor.h 1 Mar 2005 05:04:23 -0000 1.9
--- ThrusterMotor.h 4 Mar 2005 05:09:24 -0000 1.10
***************
*** 51,56 ****
//virtual void OPAL_CALL init(Solid* solid);
! /// Initializes the Motor with the given data structure. Solid
! /// pointer in the data must be valid.
virtual void OPAL_CALL init(const ThrusterMotorData& data);
--- 51,57 ----
//virtual void OPAL_CALL init(Solid* solid);
! /// Initializes the Motor with the given data structure. The Solid
! /// pointer in the data must be valid. The Force in this data
! /// structure will automatically be set to a "single step" Force.
virtual void OPAL_CALL init(const ThrusterMotorData& data);
***************
*** 66,70 ****
virtual void OPAL_CALL setEnabled(bool e);
! /// Sets the Force applied by this Motor every time step.
virtual void OPAL_CALL setForce(const Force& f);
--- 67,73 ----
virtual void OPAL_CALL setEnabled(bool e);
! /// Sets the Force applied by this Motor every time step. The
! /// Force in this data structure will automatically be set to a
! /// "single step" Force.
virtual void OPAL_CALL setForce(const Force& f);
Index: ThrusterMotor.cpp
===================================================================
RCS file: /cvsroot/opal/opal/src/ThrusterMotor.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ThrusterMotor.cpp 1 Mar 2005 05:04:23 -0000 1.8
--- ThrusterMotor.cpp 4 Mar 2005 05:09:24 -0000 1.9
***************
*** 53,56 ****
--- 53,57 ----
Motor::init();
mData = data;
+ mData.force.singleStep = true;
}
***************
*** 96,99 ****
--- 97,101 ----
{
mData.force = f;
+ mData.force.singleStep = true;
}
|