From 9b6e747d789bfc1ba0a193f7b5f8a02f19bf6654 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 12 Nov 2007 16:22:23 +0000 Subject: * Sets ZeroMesher as default. (If you want to cut and hollow, you'll need to uncomment the Meshmerizer in OpenSim.ini) * Fixes a geometry issue in ODE when using ZeroMesher --- OpenSim/Region/Application/OpenSimMain.cs | 2 +- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 23 ++++++++++++++++++++--- bin/OpenSim.ini.example | 12 +++++++++--- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index e3c326b..7efe408 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -213,7 +213,7 @@ namespace OpenSim { m_sandbox = !startupConfig.GetBoolean("gridmode", false); m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); - m_meshEngineName = startupConfig.GetString("meshing", "Meshmerizer"); + m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); m_verbose = startupConfig.GetBoolean("verbose", true); m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); m_permissions = startupConfig.GetBoolean("serverside_object_permissions", false); diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 646ccb5..2ba8827 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -308,7 +308,11 @@ namespace OpenSim.Region.Physics.OdePlugin p = (OdePrim) prim; p.disableBody(); } - d.GeomDestroy(((OdePrim)prim).prim_geom); + if (((OdePrim)prim).prim_geom != null) + { + if (((OdePrim)prim).prim_geom != (IntPtr) 0) + d.GeomDestroy(((OdePrim)prim).prim_geom); + } _prims.Remove((OdePrim)prim); } @@ -1181,7 +1185,13 @@ namespace OpenSim.Region.Physics.OdePlugin IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size); // createmesh returns null when it's a shape that isn't a cube. if (mesh != null) - setMesh(_parent_scene, mesh); + { + setMesh(_parent_scene, mesh); + } + else + { + prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z); + } } else { prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z); @@ -1228,7 +1238,14 @@ namespace OpenSim.Region.Physics.OdePlugin if (this._parent_scene.needsMeshing(_pbs)) { IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size); - setMesh(_parent_scene, mesh); + if (mesh != null) + { + setMesh(_parent_scene, mesh); + } + else + { + prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z); + } } else { prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z); } diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 1a61425..43af529 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -6,11 +6,15 @@ gridmode = false ; sticking to the basic shapes the engine does support. Usually this is only a box. ; Meshmerizer gives a better handling of complex prims by using triangle meshes. ; Note, that only ODE physics currently deals with meshed prims in a satisfactoring way -; ZeroMesher currently has a memory locking issue. -; meshing = ZeroMesher -meshing = Meshmerizer +; +meshing = ZeroMesher +;meshing = Meshmerizer +; Choose one of the physics engines below physics = basicphysics +;physics = OpenDynamicsEngine +;physics = modified_BulletX + ; Prim Storage ; if you would like to use sqlite uncomment the following line (and ; comment the NullStorage line) @@ -24,6 +28,8 @@ serverside_object_permissions = false ; to try sqlite as the asset database , comment out the above line, and uncomment following one asset_database = "sqlite" verbose = true + +; if you would like to allow prim to be physical and move by physics with the physical checkbox in the client set this to true. physical_prim = true [StandAlone] -- cgit v1.1