* 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
afrisby
Teravus Ovares 2007-11-12 16:22:23 +00:00
parent 008e4a2be8
commit 9b6e747d78
3 changed files with 30 additions and 7 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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]