diff options
author | Robert Adams | 2012-11-25 19:05:42 -0800 |
---|---|---|
committer | Robert Adams | 2012-11-25 20:04:32 -0800 |
commit | f977131fe084b9bd431a24c27e61b59ebe88ec84 (patch) | |
tree | 10280caaf5397de3bd79c151d34df7955768086d /OpenSim/Region | |
parent | BulletSim: add BSVMotor as BSDynamics linear motor. (diff) | |
download | opensim-SC-f977131fe084b9bd431a24c27e61b59ebe88ec84.zip opensim-SC-f977131fe084b9bd431a24c27e61b59ebe88ec84.tar.gz opensim-SC-f977131fe084b9bd431a24c27e61b59ebe88ec84.tar.bz2 opensim-SC-f977131fe084b9bd431a24c27e61b59ebe88ec84.tar.xz |
BulletSim: add ToString override to BSVMotor.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs b/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs index 68eec2d..480da2c 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs | |||
@@ -75,7 +75,7 @@ public class BSVMotor : BSMotor | |||
75 | Vector3 origTarget = TargetValue; // DEBUG | 75 | Vector3 origTarget = TargetValue; // DEBUG |
76 | Vector3 origCurrVal = CurrentValue; // DEBUG | 76 | Vector3 origCurrVal = CurrentValue; // DEBUG |
77 | 77 | ||
78 | // Add (desiredVector - currentAppliedVector) / howLongItShouldTakeToComplete | 78 | // Addition = (desiredVector - currentAppliedVector) / secondsItShouldTakeToComplete |
79 | Vector3 addAmount = (TargetValue - CurrentValue)/TimeScale * timeStep; | 79 | Vector3 addAmount = (TargetValue - CurrentValue)/TimeScale * timeStep; |
80 | CurrentValue += addAmount; | 80 | CurrentValue += addAmount; |
81 | returnCurrent = CurrentValue; | 81 | returnCurrent = CurrentValue; |
@@ -109,6 +109,11 @@ public class BSVMotor : BSMotor | |||
109 | } | 109 | } |
110 | return returnCurrent; | 110 | return returnCurrent; |
111 | } | 111 | } |
112 | public override string ToString() | ||
113 | { | ||
114 | return String.Format("<{0},curr={1},targ={2},decayTS={3},frictTS={4}>", | ||
115 | UseName, CurrentValue, TargetValue, TargetValueDecayTimeScale, FrictionTimescale); | ||
116 | } | ||
112 | } | 117 | } |
113 | 118 | ||
114 | public class BSFMotor : BSMotor | 119 | public class BSFMotor : BSMotor |