diff options
author | Robert Adams | 2012-09-18 08:39:52 -0700 |
---|---|---|
committer | Robert Adams | 2012-09-27 22:01:11 -0700 |
commit | ee7cda261cbbc9dcd558c35eabc070cc0bf45644 (patch) | |
tree | f30f9c9baf15ef6988983e53bf3141749eab75f9 /OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | |
parent | Comment out unused RestPlugins text in OpenSimDefaults.ini (diff) | |
download | opensim-SC_OLD-ee7cda261cbbc9dcd558c35eabc070cc0bf45644.zip opensim-SC_OLD-ee7cda261cbbc9dcd558c35eabc070cc0bf45644.tar.gz opensim-SC_OLD-ee7cda261cbbc9dcd558c35eabc070cc0bf45644.tar.bz2 opensim-SC_OLD-ee7cda261cbbc9dcd558c35eabc070cc0bf45644.tar.xz |
BulletSim: move a bunch of common logic out of BSPrim and BSCharacter
and into the parent class BSPhysObject.
Rework collision logic to enable extra collision after done colliding.
Rename 'Scene' to 'PhysicsScene' to differentiate it from the simulator 'Scene'.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index 61006f0..2da2331 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | |||
@@ -539,7 +539,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
539 | // add Gravity and Buoyancy | 539 | // add Gravity and Buoyancy |
540 | // There is some gravity, make a gravity force vector that is applied after object velocity. | 540 | // There is some gravity, make a gravity force vector that is applied after object velocity. |
541 | // m_VehicleBuoyancy: -1=2g; 0=1g; 1=0g; | 541 | // m_VehicleBuoyancy: -1=2g; 0=1g; 1=0g; |
542 | Vector3 grav = m_prim.Scene.DefaultGravity * (m_prim.Mass * (1f - m_VehicleBuoyancy)); | 542 | Vector3 grav = m_prim.PhysicsScene.DefaultGravity * (m_prim.Mass * (1f - m_VehicleBuoyancy)); |
543 | 543 | ||
544 | /* | 544 | /* |
545 | * RA: Not sure why one would do this | 545 | * RA: Not sure why one would do this |
@@ -552,7 +552,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
552 | // Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f); | 552 | // Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f); |
553 | 553 | ||
554 | // If below the terrain, move us above the ground a little. | 554 | // If below the terrain, move us above the ground a little. |
555 | float terrainHeight = m_prim.Scene.TerrainManager.GetTerrainHeightAtXYZ(pos); | 555 | float terrainHeight = m_prim.PhysicsScene.TerrainManager.GetTerrainHeightAtXYZ(pos); |
556 | // Taking the rotated size doesn't work here because m_prim.Size is the size of the root prim and not the linkset. | 556 | // Taking the rotated size doesn't work here because m_prim.Size is the size of the root prim and not the linkset. |
557 | // Need to add a m_prim.LinkSet.Size similar to m_prim.LinkSet.Mass. | 557 | // Need to add a m_prim.LinkSet.Size similar to m_prim.LinkSet.Mass. |
558 | // Vector3 rotatedSize = m_prim.Size * m_prim.Orientation; | 558 | // Vector3 rotatedSize = m_prim.Size * m_prim.Orientation; |
@@ -570,7 +570,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
570 | // We should hover, get the target height | 570 | // We should hover, get the target height |
571 | if ((m_flags & VehicleFlag.HOVER_WATER_ONLY) != 0) | 571 | if ((m_flags & VehicleFlag.HOVER_WATER_ONLY) != 0) |
572 | { | 572 | { |
573 | m_VhoverTargetHeight = m_prim.Scene.GetWaterLevelAtXYZ(pos) + m_VhoverHeight; | 573 | m_VhoverTargetHeight = m_prim.PhysicsScene.GetWaterLevelAtXYZ(pos) + m_VhoverHeight; |
574 | } | 574 | } |
575 | if ((m_flags & VehicleFlag.HOVER_TERRAIN_ONLY) != 0) | 575 | if ((m_flags & VehicleFlag.HOVER_TERRAIN_ONLY) != 0) |
576 | { | 576 | { |
@@ -849,8 +849,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
849 | // Invoke the detailed logger and output something if it's enabled. | 849 | // Invoke the detailed logger and output something if it's enabled. |
850 | private void VDetailLog(string msg, params Object[] args) | 850 | private void VDetailLog(string msg, params Object[] args) |
851 | { | 851 | { |
852 | if (m_prim.Scene.VehicleLoggingEnabled) | 852 | if (m_prim.PhysicsScene.VehicleLoggingEnabled) |
853 | m_prim.Scene.PhysicsLogging.Write(msg, args); | 853 | m_prim.PhysicsScene.PhysicsLogging.Write(msg, args); |
854 | } | 854 | } |
855 | } | 855 | } |
856 | } | 856 | } |