aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorRobert Adams2012-12-01 18:06:39 -0800
committerRobert Adams2012-12-03 07:59:42 -0800
commitf9fed421fed75d2494fe55c6b153f59232e2c796 (patch)
tree5d6e1eca5eff9c360db3611ed8d9c72e4fc480ad /OpenSim/Region
parentBulletSim: localize vehicle property setting so the vehicle prim is only upda... (diff)
downloadopensim-SC_OLD-f9fed421fed75d2494fe55c6b153f59232e2c796.zip
opensim-SC_OLD-f9fed421fed75d2494fe55c6b153f59232e2c796.tar.gz
opensim-SC_OLD-f9fed421fed75d2494fe55c6b153f59232e2c796.tar.bz2
opensim-SC_OLD-f9fed421fed75d2494fe55c6b153f59232e2c796.tar.xz
BulletSim: format vehicle detail logging messages so vehicle changs are grouped better in the log output.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs28
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSMotors.cs6
2 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index 9749429..cbad3bf 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -800,7 +800,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
800 Prim.AddForce(totalDownForce, false); 800 Prim.AddForce(totalDownForce, false);
801 } 801 }
802 802
803 VDetailLog("{0},MoveLinear,done,newVel={1},totDown={2},linContrib={3},terrContrib={4},hoverContrib={5},limitContrib={6}", 803 VDetailLog("{0}, MoveLinear,done,newVel={1},totDown={2},linContrib={3},terrContrib={4},hoverContrib={5},limitContrib={6}",
804 Prim.LocalID, newVelocity, totalDownForce, 804 Prim.LocalID, newVelocity, totalDownForce,
805 linearMotorContribution, terrainHeightContribution, hoverContribution, limitMotorUpContribution 805 linearMotorContribution, terrainHeightContribution, hoverContribution, limitMotorUpContribution
806 ); 806 );
@@ -817,7 +817,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
817 // TODO: correct position by applying force rather than forcing position. 817 // TODO: correct position by applying force rather than forcing position.
818 pos.Z = GetTerrainHeight(pos) + 2; 818 pos.Z = GetTerrainHeight(pos) + 2;
819 VehiclePosition = pos; 819 VehiclePosition = pos;
820 VDetailLog("{0},MoveLinear,terrainHeight,terrainHeight={1},pos={2}", Prim.LocalID, GetTerrainHeight(pos), pos); 820 VDetailLog("{0}, MoveLinear,terrainHeight,terrainHeight={1},pos={2}", Prim.LocalID, GetTerrainHeight(pos), pos);
821 } 821 }
822 return ret; 822 return ret;
823 } 823 }
@@ -872,7 +872,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
872 } 872 }
873 } 873 }
874 874
875 VDetailLog("{0},MoveLinear,hover,pos={1},ret={2},hoverTS={3},height={4},target={5}", 875 VDetailLog("{0}, MoveLinear,hover,pos={1},ret={2},hoverTS={3},height={4},target={5}",
876 Prim.LocalID, pos, ret, m_VhoverTimescale, m_VhoverHeight, m_VhoverTargetHeight); 876 Prim.LocalID, pos, ret, m_VhoverTimescale, m_VhoverHeight, m_VhoverTargetHeight);
877 } 877 }
878 878
@@ -914,7 +914,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
914 if (changed) 914 if (changed)
915 { 915 {
916 VehiclePosition = pos; 916 VehiclePosition = pos;
917 VDetailLog("{0},MoveLinear,blockingEndPoint,block={1},origPos={2},pos={3}", 917 VDetailLog("{0}, MoveLinear,blockingEndPoint,block={1},origPos={2},pos={3}",
918 Prim.LocalID, m_BlockingEndPoint, posChange, pos); 918 Prim.LocalID, m_BlockingEndPoint, posChange, pos);
919 } 919 }
920 } 920 }
@@ -947,7 +947,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
947 // has a decay factor. This says this force should 947 // has a decay factor. This says this force should
948 // be computed with a motor. 948 // be computed with a motor.
949 // TODO: add interaction with banking. 949 // TODO: add interaction with banking.
950 VDetailLog("{0},MoveLinear,limitMotorUp,distAbove={1},downForce={2}", 950 VDetailLog("{0}, MoveLinear,limitMotorUp,distAbove={1},downForce={2}",
951 Prim.LocalID, distanceAboveGround, ret); 951 Prim.LocalID, distanceAboveGround, ret);
952 } 952 }
953 return ret; 953 return ret;
@@ -977,7 +977,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
977 // decay requested direction 977 // decay requested direction
978 m_angularMotorDirection *= (1.0f - (pTimestep * 1.0f/m_angularMotorDecayTimescale)); 978 m_angularMotorDirection *= (1.0f - (pTimestep * 1.0f/m_angularMotorDecayTimescale));
979 979
980 VDetailLog("{0},MoveAngular,angularMotorApply,angTScale={1},timeStep={2},origvel={3},origDir={4},vel={5}", 980 VDetailLog("{0}, MoveAngular,angularMotorApply,angTScale={1},timeStep={2},origvel={3},origDir={4},vel={5}",
981 Prim.LocalID, m_angularMotorTimescale, pTimestep, origVel, origDir, m_angularMotorVelocity); 981 Prim.LocalID, m_angularMotorTimescale, pTimestep, origVel, origDir, m_angularMotorVelocity);
982 } 982 }
983 else 983 else
@@ -998,7 +998,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
998 { 998 {
999 angularMotorContribution.X = 0f; 999 angularMotorContribution.X = 0f;
1000 angularMotorContribution.Y = 0f; 1000 angularMotorContribution.Y = 0f;
1001 VDetailLog("{0},MoveAngular,noDeflectionUp,angularMotorContrib={1}", Prim.LocalID, angularMotorContribution); 1001 VDetailLog("{0}, MoveAngular,noDeflectionUp,angularMotorContrib={1}", Prim.LocalID, angularMotorContribution);
1002 } 1002 }
1003 1003
1004 Vector3 verticalAttractionContribution = ComputeAngularVerticalAttraction(pTimestep); 1004 Vector3 verticalAttractionContribution = ComputeAngularVerticalAttraction(pTimestep);
@@ -1044,7 +1044,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1044 torqueFromOffset.Z = 0; 1044 torqueFromOffset.Z = 0;
1045 torqueFromOffset *= m_vehicleMass; 1045 torqueFromOffset *= m_vehicleMass;
1046 Prim.ApplyTorqueImpulse(torqueFromOffset, true); 1046 Prim.ApplyTorqueImpulse(torqueFromOffset, true);
1047 VDetailLog("{0},BSDynamic.MoveAngular,motorOffset,applyTorqueImpulse={1}", Prim.LocalID, torqueFromOffset); 1047 VDetailLog("{0}, BSDynamic.MoveAngular,motorOffset,applyTorqueImpulse={1}", Prim.LocalID, torqueFromOffset);
1048 } 1048 }
1049 1049
1050 // ================================================================== 1050 // ==================================================================
@@ -1052,7 +1052,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1052 { 1052 {
1053 m_lastAngularVelocity = Vector3.Zero; // Reduce small value to zero. 1053 m_lastAngularVelocity = Vector3.Zero; // Reduce small value to zero.
1054 // TODO: zeroing is good but it also sets values in unmanaged code. Remove the stores when idle. 1054 // TODO: zeroing is good but it also sets values in unmanaged code. Remove the stores when idle.
1055 VDetailLog("{0},MoveAngular,done,zero,lastAngular={1}", Prim.LocalID, m_lastAngularVelocity); 1055 VDetailLog("{0}, MoveAngular,done,zero,lastAngular={1}", Prim.LocalID, m_lastAngularVelocity);
1056 VehicleRotationalVelocity = Vector3.Zero; 1056 VehicleRotationalVelocity = Vector3.Zero;
1057 Prim.ZeroAngularMotion(true); 1057 Prim.ZeroAngularMotion(true);
1058 } 1058 }
@@ -1067,7 +1067,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1067 // Unscale the force by the angular factor so it overwhelmes the Bullet additions. 1067 // Unscale the force by the angular factor so it overwhelmes the Bullet additions.
1068 VehicleRotationalVelocity = applyAngularForce; 1068 VehicleRotationalVelocity = applyAngularForce;
1069 1069
1070 VDetailLog("{0},MoveAngular,done,nonZero,angMotor={1},vertAttr={2},bank={3},deflect={4},newAngForce={5},lastAngular={6}", 1070 VDetailLog("{0}, MoveAngular,done,nonZero,angMotor={1},vertAttr={2},bank={3},deflect={4},newAngForce={5},lastAngular={6}",
1071 Prim.LocalID, 1071 Prim.LocalID,
1072 angularMotorContribution, verticalAttractionContribution, 1072 angularMotorContribution, verticalAttractionContribution,
1073 bankingContribution, deflectionContribution, 1073 bankingContribution, deflectionContribution,
@@ -1122,7 +1122,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1122 float efficencySquared = m_verticalAttractionEfficiency * m_verticalAttractionEfficiency; 1122 float efficencySquared = m_verticalAttractionEfficiency * m_verticalAttractionEfficiency;
1123 verticalAttractionContribution *= (m_verticalAttractionEfficiency * m_verticalAttractionEfficiency); 1123 verticalAttractionContribution *= (m_verticalAttractionEfficiency * m_verticalAttractionEfficiency);
1124 1124
1125 VDetailLog("{0},MoveAngular,verticalAttraction,,verticalError={1},unscaled={2},preEff={3},eff={4},effSq={5},vertAttr={6}", 1125 VDetailLog("{0}, MoveAngular,verticalAttraction,,verticalError={1},unscaled={2},preEff={3},eff={4},effSq={5},vertAttr={6}",
1126 Prim.LocalID, verticalError, unscaledContrib, preEfficiencyContrib, 1126 Prim.LocalID, verticalError, unscaledContrib, preEfficiencyContrib,
1127 m_verticalAttractionEfficiency, efficencySquared, 1127 m_verticalAttractionEfficiency, efficencySquared,
1128 verticalAttractionContribution); 1128 verticalAttractionContribution);
@@ -1148,7 +1148,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1148 // Scale by efficiency and timescale 1148 // Scale by efficiency and timescale
1149 ret = (preferredAxisOfMotion * (m_angularDeflectionEfficiency) / m_angularDeflectionTimescale) * pTimestep; 1149 ret = (preferredAxisOfMotion * (m_angularDeflectionEfficiency) / m_angularDeflectionTimescale) * pTimestep;
1150 1150
1151 VDetailLog("{0},MoveAngular,Deflection,perfAxis={1},deflection={2}", Prim.LocalID, preferredAxisOfMotion, ret); 1151 VDetailLog("{0}, MoveAngular,Deflection,perfAxis={1},deflection={2}", Prim.LocalID, preferredAxisOfMotion, ret);
1152 1152
1153 // This deflection computation is not correct. 1153 // This deflection computation is not correct.
1154 ret = Vector3.Zero; 1154 ret = Vector3.Zero;
@@ -1210,7 +1210,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1210 ret += bankingRot; 1210 ret += bankingRot;
1211 } 1211 }
1212 m_angularMotorVelocity.X *= m_bankingEfficiency == 1 ? 0.0f : 1 - m_bankingEfficiency; 1212 m_angularMotorVelocity.X *= m_bankingEfficiency == 1 ? 0.0f : 1 - m_bankingEfficiency;
1213 VDetailLog("{0},MoveAngular,Banking,bEff={1},angMotVel={2},effSq={3},mult={4},mix={5},banking={6}", 1213 VDetailLog("{0}, MoveAngular,Banking,bEff={1},angMotVel={2},effSq={3},mult={4},mix={5},banking={6}",
1214 Prim.LocalID, m_bankingEfficiency, m_angularMotorVelocity, effSquared, mult, mix, ret); 1214 Prim.LocalID, m_bankingEfficiency, m_angularMotorVelocity, effSquared, mult, mix, ret);
1215 } 1215 }
1216 return ret; 1216 return ret;
@@ -1252,7 +1252,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1252 if (rotq != m_rot) 1252 if (rotq != m_rot)
1253 { 1253 {
1254 VehicleOrientation = m_rot; 1254 VehicleOrientation = m_rot;
1255 VDetailLog("{0},LimitRotation,done,orig={1},new={2}", Prim.LocalID, rotq, m_rot); 1255 VDetailLog("{0}, LimitRotation,done,orig={1},new={2}", Prim.LocalID, rotq, m_rot);
1256 } 1256 }
1257 1257
1258 } 1258 }
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs b/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs
index b256887..e9f1549 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs
@@ -143,12 +143,12 @@ public class BSVMotor : BSMotor
143 CurrentValue *= (Vector3.One - frictionFactor); 143 CurrentValue *= (Vector3.One - frictionFactor);
144 } 144 }
145 145
146 MDetailLog("{0},BSVMotor.Step,nonZero,{1},origCurr={2},origTarget={3},timeStep={4},timeScale={5},addAmnt={6},targetDecay={7},decayFact={8},fricTS={9},frictFact={10}", 146 MDetailLog("{0}, BSVMotor.Step,nonZero,{1},origCurr={2},origTarget={3},timeStep={4},timeScale={5},addAmnt={6},targetDecay={7},decayFact={8},fricTS={9},frictFact={10}",
147 BSScene.DetailLogZero, UseName, origCurrVal, origTarget, 147 BSScene.DetailLogZero, UseName, origCurrVal, origTarget,
148 timeStep, TimeScale, addAmount, 148 timeStep, TimeScale, addAmount,
149 TargetValueDecayTimeScale, decayFactor, 149 TargetValueDecayTimeScale, decayFactor,
150 FrictionTimescale, frictionFactor); 150 FrictionTimescale, frictionFactor);
151 MDetailLog("{0},BSVMotor.Step,nonZero,{1},curr={2},target={3},add={4},decay={5},frict={6},ret={7}", 151 MDetailLog("{0}, BSVMotor.Step,nonZero,{1},curr={2},target={3},add={4},decay={5},frict={6},ret={7}",
152 BSScene.DetailLogZero, UseName, CurrentValue, TargetValue, 152 BSScene.DetailLogZero, UseName, CurrentValue, TargetValue,
153 addAmount, decayFactor, frictionFactor, returnCurrent); 153 addAmount, decayFactor, frictionFactor, returnCurrent);
154 } 154 }
@@ -158,7 +158,7 @@ public class BSVMotor : BSMotor
158 CurrentValue = Vector3.Zero; 158 CurrentValue = Vector3.Zero;
159 TargetValue = Vector3.Zero; 159 TargetValue = Vector3.Zero;
160 160
161 MDetailLog("{0},BSVMotor.Step,zero,{1},curr={2},target={3},ret={4}", 161 MDetailLog("{0}, BSVMotor.Step,zero,{1},curr={2},target={3},ret={4}",
162 BSScene.DetailLogZero, UseName, TargetValue, CurrentValue, returnCurrent); 162 BSScene.DetailLogZero, UseName, TargetValue, CurrentValue, returnCurrent);
163 163
164 } 164 }