From bd8f538f800afeffdb6b8ced11e65940921424ab Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sun, 31 Jul 2011 00:49:49 +0100 Subject: refactor: Remove argument to pass in an initial mesh to OdePrim since this is no longer required and it prevents removal of the _mesh field (which is only used temporarily) If passing in a mesh becomes important again in the future then this can be reinstated. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 3 +-- OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 29 ++++------------------------ 2 files changed, 5 insertions(+), 27 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 712f7cd..cd6a0fb 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -208,7 +208,7 @@ namespace OpenSim.Region.Physics.OdePlugin internal int m_material = (int)Material.Wood; public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size, - Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode) + Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode) { Name = primName; m_vehicle = new ODEDynamics(); @@ -252,7 +252,6 @@ namespace OpenSim.Region.Physics.OdePlugin _orientation = rotation; m_taintrot = _orientation; - _mesh = mesh; _pbs = pbs; _parent_scene = parent_scene; diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 3c702db..1d4a28e 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs @@ -304,7 +304,7 @@ namespace OpenSim.Region.Physics.OdePlugin // Create the world and the first space world = d.WorldCreate(); space = d.HashSpaceCreate(IntPtr.Zero); - + contactgroup = d.JointGroupCreate(0); //contactgroup @@ -1687,7 +1687,7 @@ namespace OpenSim.Region.Physics.OdePlugin } private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation, - IMesh mesh, PrimitiveBaseShape pbs, bool isphysical, uint localID) + PrimitiveBaseShape pbs, bool isphysical, uint localID) { Vector3 pos = position; Vector3 siz = size; @@ -1696,7 +1696,7 @@ namespace OpenSim.Region.Physics.OdePlugin OdePrim newPrim; lock (OdeLock) { - newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical, ode); + newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical, ode); lock (_prims) _prims.Add(newPrim); @@ -1724,28 +1724,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName); #endif - PhysicsActor result; - IMesh mesh = null; - - // Don't create the mesh here - wait until the mesh data is loaded from the asset store. -// if (needsMeshing(pbs)) -// { -// try -// { -// mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); -// } -// catch(Exception e) -// { -// m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); -// m_log.Debug(e.ToString()); -// mesh = null; -// return null; -// } -// } - - result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical, localid); - - return result; + return AddPrim(primName, position, size, rotation, pbs, isPhysical, localid); } public override float TimeDilation -- cgit v1.1