diff options
author | Robert Adams | 2012-12-30 10:21:47 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-31 19:57:22 -0800 |
commit | 9218748321519ed04da5cdffa1f29e69030171b5 (patch) | |
tree | 7516cfbea32d716651430bc3124dbdd4cb772105 /OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | |
parent | BulletSim: add the implementation files for the two versions of Bullet: (diff) | |
download | opensim-SC_OLD-9218748321519ed04da5cdffa1f29e69030171b5.zip opensim-SC_OLD-9218748321519ed04da5cdffa1f29e69030171b5.tar.gz opensim-SC_OLD-9218748321519ed04da5cdffa1f29e69030171b5.tar.bz2 opensim-SC_OLD-9218748321519ed04da5cdffa1f29e69030171b5.tar.xz |
BulletSim: another round of conversion: dynamics world and collision object functions.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs index d99a50f..590c687 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | |||
@@ -133,17 +133,14 @@ public sealed class BSTerrainManager : IDisposable | |||
133 | public void CreateInitialGroundPlaneAndTerrain() | 133 | public void CreateInitialGroundPlaneAndTerrain() |
134 | { | 134 | { |
135 | // The ground plane is here to catch things that are trying to drop to negative infinity | 135 | // The ground plane is here to catch things that are trying to drop to negative infinity |
136 | BulletShape groundPlaneShape = new BulletShape( | 136 | BulletShape groundPlaneShape = PhysicsScene.PE.CreateGroundPlaneShape(BSScene.GROUNDPLANE_ID, 1f, BSParam.TerrainCollisionMargin); |
137 | BulletSimAPI.CreateGroundPlaneShape2(BSScene.GROUNDPLANE_ID, 1f, | ||
138 | BSParam.TerrainCollisionMargin), | ||
139 | BSPhysicsShapeType.SHAPE_GROUNDPLANE); | ||
140 | m_groundPlane = PhysicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape, | 137 | m_groundPlane = PhysicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape, |
141 | BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity); | 138 | BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity); |
142 | 139 | ||
143 | BulletSimAPI.AddObjectToWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr); | 140 | PhysicsScene.PE.AddObjectToWorld(PhysicsScene.World, m_groundPlane); |
144 | BulletSimAPI.UpdateSingleAabb2(PhysicsScene.World.ptr, m_groundPlane.ptr); | 141 | PhysicsScene.PE.UpdateSingleAabb(PhysicsScene.World, m_groundPlane); |
145 | // Ground plane does not move | 142 | // Ground plane does not move |
146 | BulletSimAPI.ForceActivationState2(m_groundPlane.ptr, ActivationState.DISABLE_SIMULATION); | 143 | PhysicsScene.PE.ForceActivationState(m_groundPlane, ActivationState.DISABLE_SIMULATION); |
147 | // Everything collides with the ground plane. | 144 | // Everything collides with the ground plane. |
148 | m_groundPlane.collisionType = CollisionType.Groundplane; | 145 | m_groundPlane.collisionType = CollisionType.Groundplane; |
149 | m_groundPlane.ApplyCollisionMask(); | 146 | m_groundPlane.ApplyCollisionMask(); |
@@ -158,7 +155,7 @@ public sealed class BSTerrainManager : IDisposable | |||
158 | { | 155 | { |
159 | if (m_groundPlane.HasPhysicalBody) | 156 | if (m_groundPlane.HasPhysicalBody) |
160 | { | 157 | { |
161 | if (BulletSimAPI.RemoveObjectFromWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr)) | 158 | if (PhysicsScene.PE.RemoveObjectFromWorld(PhysicsScene.World, m_groundPlane)) |
162 | { | 159 | { |
163 | PhysicsScene.PE.DestroyObject(PhysicsScene.World, m_groundPlane); | 160 | PhysicsScene.PE.DestroyObject(PhysicsScene.World, m_groundPlane); |
164 | } | 161 | } |