aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/Tests
diff options
context:
space:
mode:
authorRobert Adams2013-06-30 17:06:27 -0700
committerRobert Adams2013-06-30 17:07:51 -0700
commit9d5ae759504f01dceac5d3f859da1e43e28797ad (patch)
treec9a9f17f9019f3f25e160ec0116d1c9bb57d4637 /OpenSim/Region/Physics/BulletSPlugin/Tests
parentBulletSim: set linkset type to be prim specific rather than a simulator (diff)
downloadopensim-SC_OLD-9d5ae759504f01dceac5d3f859da1e43e28797ad.zip
opensim-SC_OLD-9d5ae759504f01dceac5d3f859da1e43e28797ad.tar.gz
opensim-SC_OLD-9d5ae759504f01dceac5d3f859da1e43e28797ad.tar.bz2
opensim-SC_OLD-9d5ae759504f01dceac5d3f859da1e43e28797ad.tar.xz
BulletSim: remove the handle to the vehicle actor and cause routines
that need it to look it up.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/Tests')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs32
1 files changed, 18 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs b/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs
index b040e21..583c436 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs
@@ -114,21 +114,25 @@ public class BasicVehicles : OpenSimTestCase
114 // Instead the appropriate values are set and calls are made just the parts of the 114 // Instead the appropriate values are set and calls are made just the parts of the
115 // controller we want to exercise. Stepping the physics engine then applies 115 // controller we want to exercise. Stepping the physics engine then applies
116 // the actions of that one feature. 116 // the actions of that one feature.
117 TestVehicle.VehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_EFFICIENCY, efficiency); 117 BSDynamics vehicleActor = TestVehicle.GetVehicleActor();
118 TestVehicle.VehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_TIMESCALE, timeScale); 118 if (vehicleActor != null)
119 TestVehicle.VehicleActor.enableAngularVerticalAttraction = true;
120
121 TestVehicle.IsPhysical = true;
122 PhysicsScene.ProcessTaints();
123
124 // Step the simulator a bunch of times and vertical attraction should orient the vehicle up
125 for (int ii = 0; ii < simSteps; ii++)
126 { 119 {
127 TestVehicle.VehicleActor.ForgetKnownVehicleProperties(); 120 vehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_EFFICIENCY, efficiency);
128 TestVehicle.VehicleActor.ComputeAngularVerticalAttraction(); 121 vehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_TIMESCALE, timeScale);
129 TestVehicle.VehicleActor.PushKnownChanged(); 122 vehicleActor.enableAngularVerticalAttraction = true;
130 123
131 PhysicsScene.Simulate(simulationTimeStep); 124 TestVehicle.IsPhysical = true;
125 PhysicsScene.ProcessTaints();
126
127 // Step the simulator a bunch of times and vertical attraction should orient the vehicle up
128 for (int ii = 0; ii < simSteps; ii++)
129 {
130 vehicleActor.ForgetKnownVehicleProperties();
131 vehicleActor.ComputeAngularVerticalAttraction();
132 vehicleActor.PushKnownChanged();
133
134 PhysicsScene.Simulate(simulationTimeStep);
135 }
132 } 136 }
133 137
134 TestVehicle.IsPhysical = false; 138 TestVehicle.IsPhysical = false;