aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
diff options
context:
space:
mode:
authorRobert Adams2012-12-30 10:21:47 -0800
committerRobert Adams2012-12-31 19:57:22 -0800
commit9218748321519ed04da5cdffa1f29e69030171b5 (patch)
tree7516cfbea32d716651430bc3124dbdd4cb772105 /OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
parentBulletSim: add the implementation files for the two versions of Bullet: (diff)
downloadopensim-SC-9218748321519ed04da5cdffa1f29e69030171b5.zip
opensim-SC-9218748321519ed04da5cdffa1f29e69030171b5.tar.gz
opensim-SC-9218748321519ed04da5cdffa1f29e69030171b5.tar.bz2
opensim-SC-9218748321519ed04da5cdffa1f29e69030171b5.tar.xz
BulletSim: another round of conversion: dynamics world and collision object functions.
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs13
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 }