From f6c7f167b9ee35a68b69f48ae8261225cb452a7a Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Sat, 12 Jul 2008 01:02:41 +0000 Subject: Overloads CreateMesh method of interface IMesher to pass prim physical status to mesher --- OpenSim/Region/Physics/Manager/IMesher.cs | 1 + OpenSim/Region/Physics/Manager/ZeroMesher.cs | 5 +++++ OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 5 +++++ OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index b5fc95c..48e4ba6 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -34,6 +34,7 @@ namespace OpenSim.Region.Physics.Manager public interface IMesher { IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod); + IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod, bool isPhysical); } public interface IVertex diff --git a/OpenSim/Region/Physics/Manager/ZeroMesher.cs b/OpenSim/Region/Physics/Manager/ZeroMesher.cs index 8362630..609dee3 100644 --- a/OpenSim/Region/Physics/Manager/ZeroMesher.cs +++ b/OpenSim/Region/Physics/Manager/ZeroMesher.cs @@ -62,6 +62,11 @@ namespace OpenSim.Region.Physics.Manager { public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod) { + return CreateMesh(primName, primShape, size, lod, false); + } + + public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod, bool isPhysical) + { return null; } } diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index df850a0..42b6a90 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -2056,6 +2056,11 @@ namespace OpenSim.Region.Physics.Meshing public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod) { + return CreateMesh(primName, primShape, size, lod, false); + } + + public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod, bool isPhysical) + { Mesh mesh = null; if (primShape.SculptEntry && primShape.SculptType != (byte)0 && primShape.SculptData.Length > 0) diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index defc0ca..d063507 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -1321,7 +1321,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (IsPhysical) meshlod = _parent_scene.MeshSculptphysicalLOD; // Don't need to re-enable body.. it's done in SetMesh - IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod); + IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); // createmesh returns null when it's a shape that isn't a cube. if (mesh != null) { -- cgit v1.1