aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
diff options
context:
space:
mode:
authorRobert Adams2012-12-31 16:22:45 -0800
committerRobert Adams2012-12-31 19:57:24 -0800
commit3d0fc708647ceb734385f90e2f22be9774e2171e (patch)
tree07fa083aa3507a16c4e094beb164f9b8312fe0a4 /OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
parentBulletSim: nearly complete in conversion from BulletSimAPI to BSAPITemplate. ... (diff)
downloadopensim-SC_OLD-3d0fc708647ceb734385f90e2f22be9774e2171e.zip
opensim-SC_OLD-3d0fc708647ceb734385f90e2f22be9774e2171e.tar.gz
opensim-SC_OLD-3d0fc708647ceb734385f90e2f22be9774e2171e.tar.bz2
opensim-SC_OLD-3d0fc708647ceb734385f90e2f22be9774e2171e.tar.xz
BulletSim: complete movement of BulletSimAPI functions to BSAPITemplate.
Update BulletSim DLLs and SOs with simplier step function interface.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
index cc28344..0802b3a 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
@@ -44,7 +44,7 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
44{ 44{
45 static string LogHeader = "[BULLETSIM TERRAIN HEIGHTMAP]"; 45 static string LogHeader = "[BULLETSIM TERRAIN HEIGHTMAP]";
46 46
47 BulletHeightMapInfo m_mapInfo = null; 47 BulletHMapInfo m_mapInfo = null;
48 48
49 // Constructor to build a default, flat heightmap terrain. 49 // Constructor to build a default, flat heightmap terrain.
50 public BSTerrainHeightmap(BSScene physicsScene, Vector3 regionBase, uint id, Vector3 regionSize) 50 public BSTerrainHeightmap(BSScene physicsScene, Vector3 regionBase, uint id, Vector3 regionSize)
@@ -58,7 +58,7 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
58 { 58 {
59 initialMap[ii] = BSTerrainManager.HEIGHT_INITIALIZATION; 59 initialMap[ii] = BSTerrainManager.HEIGHT_INITIALIZATION;
60 } 60 }
61 m_mapInfo = new BulletHeightMapInfo(id, initialMap, IntPtr.Zero); 61 m_mapInfo = new BulletHMapInfo(id, initialMap, IntPtr.Zero);
62 m_mapInfo.minCoords = minTerrainCoords; 62 m_mapInfo.minCoords = minTerrainCoords;
63 m_mapInfo.maxCoords = maxTerrainCoords; 63 m_mapInfo.maxCoords = maxTerrainCoords;
64 m_mapInfo.terrainRegionBase = TerrainBase; 64 m_mapInfo.terrainRegionBase = TerrainBase;
@@ -72,7 +72,7 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
72 Vector3 minCoords, Vector3 maxCoords) 72 Vector3 minCoords, Vector3 maxCoords)
73 : base(physicsScene, regionBase, id) 73 : base(physicsScene, regionBase, id)
74 { 74 {
75 m_mapInfo = new BulletHeightMapInfo(id, initialMap, IntPtr.Zero); 75 m_mapInfo = new BulletHMapInfo(id, initialMap, IntPtr.Zero);
76 m_mapInfo.minCoords = minCoords; 76 m_mapInfo.minCoords = minCoords;
77 m_mapInfo.maxCoords = maxCoords; 77 m_mapInfo.maxCoords = maxCoords;
78 m_mapInfo.minZ = minCoords.Z; 78 m_mapInfo.minZ = minCoords.Z;
@@ -91,12 +91,12 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
91 // Using the information in m_mapInfo, create the physical representation of the heightmap. 91 // Using the information in m_mapInfo, create the physical representation of the heightmap.
92 private void BuildHeightmapTerrain() 92 private void BuildHeightmapTerrain()
93 { 93 {
94 m_mapInfo.Ptr = PhysicsScene.PE.CreateHeightMapInfo(PhysicsScene.World, m_mapInfo.ID, 94 m_mapInfo.ptr = PhysicsScene.PE.CreateHeightMapInfo(PhysicsScene.World, m_mapInfo.ID,
95 m_mapInfo.minCoords, m_mapInfo.maxCoords, 95 m_mapInfo.minCoords, m_mapInfo.maxCoords,
96 m_mapInfo.heightMap, BSParam.TerrainCollisionMargin); 96 m_mapInfo.heightMap, BSParam.TerrainCollisionMargin);
97 97
98 // Create the terrain shape from the mapInfo 98 // Create the terrain shape from the mapInfo
99 m_mapInfo.terrainShape = PhysicsScene.PE.CreateTerrainShape(m_mapInfo.Ptr); 99 m_mapInfo.terrainShape = PhysicsScene.PE.CreateTerrainShape(m_mapInfo.ptr);
100 100
101 // The terrain object initial position is at the center of the object 101 // The terrain object initial position is at the center of the object
102 Vector3 centerPos; 102 Vector3 centerPos;
@@ -138,7 +138,7 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
138 PhysicsScene.PE.RemoveObjectFromWorld(PhysicsScene.World, m_mapInfo.terrainBody); 138 PhysicsScene.PE.RemoveObjectFromWorld(PhysicsScene.World, m_mapInfo.terrainBody);
139 // Frees both the body and the shape. 139 // Frees both the body and the shape.
140 PhysicsScene.PE.DestroyObject(PhysicsScene.World, m_mapInfo.terrainBody); 140 PhysicsScene.PE.DestroyObject(PhysicsScene.World, m_mapInfo.terrainBody);
141 PhysicsScene.PE.ReleaseHeightMapInfo(m_mapInfo.Ptr); 141 PhysicsScene.PE.ReleaseHeightMapInfo(m_mapInfo.ptr);
142 } 142 }
143 } 143 }
144 m_mapInfo = null; 144 m_mapInfo = null;