Overloads CreateMesh method of interface IMesher to pass prim physical status to mesher

0.6.0-stable
Dahlia Trimble 2008-07-12 01:02:41 +00:00
parent 746c6fb1a2
commit f6c7f167b9
4 changed files with 12 additions and 1 deletions

View File

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

View File

@ -61,6 +61,11 @@ namespace OpenSim.Region.Physics.Manager
public class ZeroMesher : IMesher
{
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;
}

View File

@ -2055,6 +2055,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;

View File

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