aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
diff options
context:
space:
mode:
authorRobert Adams2012-09-19 08:21:29 -0700
committerRobert Adams2012-09-27 22:01:21 -0700
commita27e4ce6cbfb0a2e852624fd4d81121ca829f85c (patch)
treecd467ddf5dcc8a7109eef5d82f1929c1b5bf77b8 /OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
parentBulletSim: Convert BSCharacter to use common BSPhysObject code and variables. (diff)
downloadopensim-SC_OLD-a27e4ce6cbfb0a2e852624fd4d81121ca829f85c.zip
opensim-SC_OLD-a27e4ce6cbfb0a2e852624fd4d81121ca829f85c.tar.gz
opensim-SC_OLD-a27e4ce6cbfb0a2e852624fd4d81121ca829f85c.tar.bz2
opensim-SC_OLD-a27e4ce6cbfb0a2e852624fd4d81121ca829f85c.tar.xz
BulletSim: add class and infrastructure for shape and object
tracking in the C# code. Needed for the changing body type (to and from GhostObjects) for volumeDetect.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
index c113db1..fb802e4 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
@@ -107,7 +107,9 @@ public class BSTerrainManager
107 public void CreateInitialGroundPlaneAndTerrain() 107 public void CreateInitialGroundPlaneAndTerrain()
108 { 108 {
109 // The ground plane is here to catch things that are trying to drop to negative infinity 109 // The ground plane is here to catch things that are trying to drop to negative infinity
110 BulletShape groundPlaneShape = new BulletShape(BulletSimAPI.CreateGroundPlaneShape2(BSScene.GROUNDPLANE_ID, 1f, TERRAIN_COLLISION_MARGIN)); 110 BulletShape groundPlaneShape = new BulletShape(
111 BulletSimAPI.CreateGroundPlaneShape2(BSScene.GROUNDPLANE_ID, 1f, TERRAIN_COLLISION_MARGIN),
112 ShapeData.PhysicsShapeType.SHAPE_GROUNDPLANE);
111 m_groundPlane = new BulletBody(BSScene.GROUNDPLANE_ID, 113 m_groundPlane = new BulletBody(BSScene.GROUNDPLANE_ID,
112 BulletSimAPI.CreateBodyWithDefaultMotionState2(groundPlaneShape.Ptr, Vector3.Zero, Quaternion.Identity)); 114 BulletSimAPI.CreateBodyWithDefaultMotionState2(groundPlaneShape.Ptr, Vector3.Zero, Quaternion.Identity));
113 BulletSimAPI.AddObjectToWorld2(PhysicsScene.World.Ptr, m_groundPlane.Ptr); 115 BulletSimAPI.AddObjectToWorld2(PhysicsScene.World.Ptr, m_groundPlane.Ptr);
@@ -297,7 +299,8 @@ public class BSTerrainManager
297 centerPos.Z = minZ + ((maxZ - minZ) / 2f); 299 centerPos.Z = minZ + ((maxZ - minZ) / 2f);
298 300
299 // Create the terrain shape from the mapInfo 301 // Create the terrain shape from the mapInfo
300 mapInfo.terrainShape = new BulletShape(BulletSimAPI.CreateTerrainShape2(mapInfo.Ptr)); 302 mapInfo.terrainShape = new BulletShape(BulletSimAPI.CreateTerrainShape2(mapInfo.Ptr),
303 ShapeData.PhysicsShapeType.SHAPE_TERRAIN);
301 304
302 mapInfo.terrainBody = new BulletBody(mapInfo.ID, 305 mapInfo.terrainBody = new BulletBody(mapInfo.ID,
303 BulletSimAPI.CreateBodyWithDefaultMotionState2(mapInfo.terrainShape.Ptr, 306 BulletSimAPI.CreateBodyWithDefaultMotionState2(mapInfo.terrainShape.Ptr,