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.bulletsim
parent
196a774b24
commit
bd8f538f80
|
@ -208,7 +208,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
internal int m_material = (int)Material.Wood;
|
internal int m_material = (int)Material.Wood;
|
||||||
|
|
||||||
public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size,
|
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;
|
Name = primName;
|
||||||
m_vehicle = new ODEDynamics();
|
m_vehicle = new ODEDynamics();
|
||||||
|
@ -252,7 +252,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
|
|
||||||
_orientation = rotation;
|
_orientation = rotation;
|
||||||
m_taintrot = _orientation;
|
m_taintrot = _orientation;
|
||||||
_mesh = mesh;
|
|
||||||
_pbs = pbs;
|
_pbs = pbs;
|
||||||
|
|
||||||
_parent_scene = parent_scene;
|
_parent_scene = parent_scene;
|
||||||
|
|
|
@ -304,7 +304,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
// Create the world and the first space
|
// Create the world and the first space
|
||||||
world = d.WorldCreate();
|
world = d.WorldCreate();
|
||||||
space = d.HashSpaceCreate(IntPtr.Zero);
|
space = d.HashSpaceCreate(IntPtr.Zero);
|
||||||
|
|
||||||
contactgroup = d.JointGroupCreate(0);
|
contactgroup = d.JointGroupCreate(0);
|
||||||
//contactgroup
|
//contactgroup
|
||||||
|
|
||||||
|
@ -1687,7 +1687,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation,
|
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 pos = position;
|
||||||
Vector3 siz = size;
|
Vector3 siz = size;
|
||||||
|
@ -1696,7 +1696,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
OdePrim newPrim;
|
OdePrim newPrim;
|
||||||
lock (OdeLock)
|
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)
|
lock (_prims)
|
||||||
_prims.Add(newPrim);
|
_prims.Add(newPrim);
|
||||||
|
@ -1724,28 +1724,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName);
|
m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PhysicsActor result;
|
return AddPrim(primName, position, size, rotation, pbs, isPhysical, localid);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override float TimeDilation
|
public override float TimeDilation
|
||||||
|
|
Loading…
Reference in New Issue