From f977131fe084b9bd431a24c27e61b59ebe88ec84 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 25 Nov 2012 19:05:42 -0800 Subject: BulletSim: add ToString override to BSVMotor. --- OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') 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 Vector3 origTarget = TargetValue; // DEBUG Vector3 origCurrVal = CurrentValue; // DEBUG - // Add (desiredVector - currentAppliedVector) / howLongItShouldTakeToComplete + // Addition = (desiredVector - currentAppliedVector) / secondsItShouldTakeToComplete Vector3 addAmount = (TargetValue - CurrentValue)/TimeScale * timeStep; CurrentValue += addAmount; returnCurrent = CurrentValue; @@ -109,6 +109,11 @@ public class BSVMotor : BSMotor } return returnCurrent; } + public override string ToString() + { + return String.Format("<{0},curr={1},targ={2},decayTS={3},frictTS={4}>", + UseName, CurrentValue, TargetValue, TargetValueDecayTimeScale, FrictionTimescale); + } } public class BSFMotor : BSMotor -- cgit v1.1