aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorRobert Adams2012-11-25 19:05:42 -0800
committerRobert Adams2012-11-25 20:04:32 -0800
commitf977131fe084b9bd431a24c27e61b59ebe88ec84 (patch)
tree10280caaf5397de3bd79c151d34df7955768086d /OpenSim/Region/Physics
parentBulletSim: add BSVMotor as BSDynamics linear motor. (diff)
downloadopensim-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 'OpenSim/Region/Physics')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSMotors.cs7
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
114public class BSFMotor : BSMotor 119public class BSFMotor : BSMotor