Re-enables testing for config option mesh_sculpted_prim which was inadvertently disabled in a prior modification (oops) :)

0.6.0-stable
Dahlia Trimble 2008-07-25 20:29:37 +00:00
parent 0d488ad489
commit 3035f5cb64
2 changed files with 35 additions and 28 deletions

View File

@ -759,7 +759,7 @@ namespace OpenSim.Region.Physics.OdePlugin
if (m_taintselected != m_isSelected)
changeSelectedStatus(timestep);
if (!m_taintVelocity.IsIdentical(PhysicsVector.Zero,0))
if (!m_taintVelocity.IsIdentical(PhysicsVector.Zero, 0.001f))
changevelocity(timestep);
if (m_taintparent != _parent)
@ -918,18 +918,18 @@ namespace OpenSim.Region.Physics.OdePlugin
m_targetSpace = targetspace;
//if (_mesh == null)
//{
// if (_parent_scene.needsMeshing(_pbs))
// {
// // Don't need to re-enable body.. it's done in SetMesh
// _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical);
// // createmesh returns null when it's a shape that isn't a cube.
// }
//}
if (_mesh == null )
if (_mesh == null)
{
if (_parent_scene.needsMeshing(_pbs))
{
// Don't need to re-enable body.. it's done in SetMesh
_mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical);
// createmesh returns null when it's a shape that isn't a cube.
}
}
//if (_mesh == null )
// _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical);
lock (OdeScene.OdeLock)
@ -1323,7 +1323,7 @@ namespace OpenSim.Region.Physics.OdePlugin
// we don't need to do space calculation because the client sends a position update also.
// Construction of new prim
//if (_parent_scene.needsMeshing(_pbs))
if (_parent_scene.needsMeshing(_pbs))
{
float meshlod = _parent_scene.meshSculptLOD;
@ -1609,7 +1609,7 @@ namespace OpenSim.Region.Physics.OdePlugin
if (_size.Z <= 0) _size.Z = 0.01f;
// Construction of new prim
//if (_parent_scene.needsMeshing(_pbs))
if (_parent_scene.needsMeshing(_pbs))
{
// Don't need to re-enable body.. it's done in SetMesh
float meshlod = _parent_scene.meshSculptLOD;

View File

@ -1174,15 +1174,16 @@ namespace OpenSim.Region.Physics.OdePlugin
//switch (pbs.ProfileShape)
//{
// case ProfileShape.Square:
/// support simple box & hollow box now; later, more shapes
//if (needsMeshing(pbs))
//{
// //support simple box & hollow box now; later, more shapes
// if (needsMeshing(pbs))
// {
// mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
//}
// }
// break;
//}
if (needsMeshing(pbs))
mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical);
@ -1523,14 +1524,18 @@ namespace OpenSim.Region.Physics.OdePlugin
/// </summary>
/// <param name="pbs"></param>
/// <returns></returns>
//public bool needsMeshing(PrimitiveBaseShape pbs)
//{
public bool needsMeshing(PrimitiveBaseShape pbs)
{
// most of this is redundant now as the mesher will return null if it cant mesh a prim
// but we still need to check for sculptie meshing being enabled so this is the most
// convenient place to do it for now...
// //if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle && pbs.ProfileCurve == (byte)LLObject.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f)
// //Console.WriteLine("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + LLObject.UnpackPathScale(pbs.PathScaleY).ToString());
// if (pbs.SculptEntry && !meshSculptedPrim)
// {
// return false;
// }
if (pbs.SculptEntry && !meshSculptedPrim)
{
return false;
}
// if (pbs.ProfileHollow != 0)
// return true;
@ -1577,7 +1582,9 @@ namespace OpenSim.Region.Physics.OdePlugin
// return false;
//}
return true; // assume the mesher will return a default shape or null and later code can deal with this
}
/// <summary>
/// Called after our prim properties are set Scale, position etc.
@ -1763,7 +1770,7 @@ namespace OpenSim.Region.Physics.OdePlugin
lock (_activeprims)
{
if (timeStep < 0.2f)
//if (timeStep < 0.2f)
{
foreach (OdePrim actor in _activeprims)
{