aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs
diff options
context:
space:
mode:
authorRobert Adams2013-02-03 16:08:09 -0800
committerRobert Adams2013-02-05 16:56:23 -0800
commitad438ee59fce1b262135ef0f7cd1213f3a79df50 (patch)
tree96871ce99daa85e8142c8ab3d6ec7e8ebeaa24ea /OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs
parentBulletSim: correct angular vertical attraction to properly correct an upside ... (diff)
downloadopensim-SC_OLD-ad438ee59fce1b262135ef0f7cd1213f3a79df50.zip
opensim-SC_OLD-ad438ee59fce1b262135ef0f7cd1213f3a79df50.tar.gz
opensim-SC_OLD-ad438ee59fce1b262135ef0f7cd1213f3a79df50.tar.bz2
opensim-SC_OLD-ad438ee59fce1b262135ef0f7cd1213f3a79df50.tar.xz
BulletSim: rework some parameter setting implementation moving functionality that was in BSScene to BSParam. Remove unused parameters that were passed to the unmanaged code. Update DLLs and SOs for the new param block.
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs
index 8244f02..d7e800d 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs
@@ -96,7 +96,7 @@ public sealed class BSTerrainMesh : BSTerrainPhys
96 { 96 {
97 // DISASTER!! 97 // DISASTER!!
98 PhysicsScene.DetailLog("{0},BSTerrainMesh.create,failedCreationOfShape", ID); 98 PhysicsScene.DetailLog("{0},BSTerrainMesh.create,failedCreationOfShape", ID);
99 physicsScene.Logger.ErrorFormat("{0} Failed creation of terrain mesh! base={1}", LogHeader, TerrainBase); 99 PhysicsScene.Logger.ErrorFormat("{0} Failed creation of terrain mesh! base={1}", LogHeader, TerrainBase);
100 // Something is very messed up and a crash is in our future. 100 // Something is very messed up and a crash is in our future.
101 return; 101 return;
102 } 102 }
@@ -108,7 +108,7 @@ public sealed class BSTerrainMesh : BSTerrainPhys
108 if (!m_terrainBody.HasPhysicalBody) 108 if (!m_terrainBody.HasPhysicalBody)
109 { 109 {
110 // DISASTER!! 110 // DISASTER!!
111 physicsScene.Logger.ErrorFormat("{0} Failed creation of terrain body! base={1}", LogHeader, TerrainBase); 111 PhysicsScene.Logger.ErrorFormat("{0} Failed creation of terrain body! base={1}", LogHeader, TerrainBase);
112 // Something is very messed up and a crash is in our future. 112 // Something is very messed up and a crash is in our future.
113 return; 113 return;
114 } 114 }
@@ -131,6 +131,12 @@ public sealed class BSTerrainMesh : BSTerrainPhys
131 m_terrainBody.collisionType = CollisionType.Terrain; 131 m_terrainBody.collisionType = CollisionType.Terrain;
132 m_terrainBody.ApplyCollisionMask(PhysicsScene); 132 m_terrainBody.ApplyCollisionMask(PhysicsScene);
133 133
134 if (BSParam.UseSingleSidedMeshes)
135 {
136 PhysicsScene.DetailLog("{0},BSTerrainMesh.settingCustomMaterial", id);
137 PhysicsScene.PE.AddToCollisionFlags(m_terrainBody, CollisionFlags.CF_CUSTOM_MATERIAL_CALLBACK);
138 }
139
134 // Make it so the terrain will not move or be considered for movement. 140 // Make it so the terrain will not move or be considered for movement.
135 PhysicsScene.PE.ForceActivationState(m_terrainBody, ActivationState.DISABLE_SIMULATION); 141 PhysicsScene.PE.ForceActivationState(m_terrainBody, ActivationState.DISABLE_SIMULATION);
136 } 142 }
@@ -176,8 +182,7 @@ public sealed class BSTerrainMesh : BSTerrainPhys
176 182
177 // Convert the passed heightmap to mesh information suitable for CreateMeshShape2(). 183 // Convert the passed heightmap to mesh information suitable for CreateMeshShape2().
178 // Return 'true' if successfully created. 184 // Return 'true' if successfully created.
179 public static bool ConvertHeightmapToMesh( 185 public static bool ConvertHeightmapToMesh( BSScene physicsScene,
180 BSScene physicsScene,
181 float[] heightMap, int sizeX, int sizeY, // parameters of incoming heightmap 186 float[] heightMap, int sizeX, int sizeY, // parameters of incoming heightmap
182 float extentX, float extentY, // zero based range for output vertices 187 float extentX, float extentY, // zero based range for output vertices
183 Vector3 extentBase, // base to be added to all vertices 188 Vector3 extentBase, // base to be added to all vertices