diff options
author | Robert Adams | 2014-12-31 12:43:26 -0800 |
---|---|---|
committer | Robert Adams | 2014-12-31 12:43:26 -0800 |
commit | 291c7cdbcc80dc270418a4959ccfa0ed8cc0c190 (patch) | |
tree | 869b0fb89d246ac3a3adb9782ff8c9e2b8279d4f /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |
parent | Fixed declaration switcharoo on the region combiner dll. (diff) | |
download | opensim-SC_OLD-291c7cdbcc80dc270418a4959ccfa0ed8cc0c190.zip opensim-SC_OLD-291c7cdbcc80dc270418a4959ccfa0ed8cc0c190.tar.gz opensim-SC_OLD-291c7cdbcc80dc270418a4959ccfa0ed8cc0c190.tar.bz2 opensim-SC_OLD-291c7cdbcc80dc270418a4959ccfa0ed8cc0c190.tar.xz |
BulletSim: Add axis locking enabled through the ExtendedPhysics module.
Allows locking of prim/linkset relative moving in each of the linear
and angular axis. Limits on movement or rotation can be set.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index 2b744a0..d20d094 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -309,11 +309,20 @@ public abstract class BSPhysObject : PhysicsActor | |||
309 | // Note this is a displacement from the root's coordinates. Zero means use the root prim as center-of-mass. | 309 | // Note this is a displacement from the root's coordinates. Zero means use the root prim as center-of-mass. |
310 | public OMV.Vector3? UserSetCenterOfMassDisplacement { get; set; } | 310 | public OMV.Vector3? UserSetCenterOfMassDisplacement { get; set; } |
311 | 311 | ||
312 | public OMV.Vector3 LockedLinearAxis { get; set; } // zero means locked. one means free. | 312 | public OMV.Vector3 LockedLinearAxis; // zero means locked. one means free. |
313 | public OMV.Vector3 LockedAngularAxis { get; set; } // zero means locked. one means free. | 313 | public OMV.Vector3 LockedAngularAxis; // zero means locked. one means free. |
314 | public const float FreeAxis = 1f; | 314 | public const float FreeAxis = 1f; |
315 | public const float LockedAxis = 0f; | ||
315 | public readonly OMV.Vector3 LockedAxisFree = new OMV.Vector3(FreeAxis, FreeAxis, FreeAxis); // All axis are free | 316 | public readonly OMV.Vector3 LockedAxisFree = new OMV.Vector3(FreeAxis, FreeAxis, FreeAxis); // All axis are free |
316 | 317 | ||
318 | // If an axis is locked (flagged above) then the limits of that axis are specified here. | ||
319 | // Linear axis limits are relative to the object's starting coordinates. | ||
320 | // Angular limits are limited to -PI to +PI | ||
321 | public OMV.Vector3 LockedLinearAxisLow; | ||
322 | public OMV.Vector3 LockedLinearAxisHigh; | ||
323 | public OMV.Vector3 LockedAngularAxisLow; | ||
324 | public OMV.Vector3 LockedAngularAxisHigh; | ||
325 | |||
317 | // Enable physical actions. Bullet will keep sleeping non-moving physical objects so | 326 | // Enable physical actions. Bullet will keep sleeping non-moving physical objects so |
318 | // they need waking up when parameters are changed. | 327 | // they need waking up when parameters are changed. |
319 | // Called in taint-time!! | 328 | // Called in taint-time!! |