aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs28
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs35
2 files changed, 35 insertions, 28 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index c1e54da..c01626a 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -759,7 +759,7 @@ namespace OpenSim.Region.Physics.OdePlugin
759 if (m_taintselected != m_isSelected) 759 if (m_taintselected != m_isSelected)
760 changeSelectedStatus(timestep); 760 changeSelectedStatus(timestep);
761 761
762 if (!m_taintVelocity.IsIdentical(PhysicsVector.Zero,0)) 762 if (!m_taintVelocity.IsIdentical(PhysicsVector.Zero, 0.001f))
763 changevelocity(timestep); 763 changevelocity(timestep);
764 764
765 if (m_taintparent != _parent) 765 if (m_taintparent != _parent)
@@ -918,18 +918,18 @@ namespace OpenSim.Region.Physics.OdePlugin
918 918
919 m_targetSpace = targetspace; 919 m_targetSpace = targetspace;
920 920
921 //if (_mesh == null) 921 if (_mesh == null)
922 //{ 922 {
923 // if (_parent_scene.needsMeshing(_pbs)) 923 if (_parent_scene.needsMeshing(_pbs))
924 // { 924 {
925 // // Don't need to re-enable body.. it's done in SetMesh 925 // Don't need to re-enable body.. it's done in SetMesh
926 // _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical); 926 _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical);
927 // // createmesh returns null when it's a shape that isn't a cube. 927 // createmesh returns null when it's a shape that isn't a cube.
928 // } 928 }
929 //} 929 }
930 930
931 if (_mesh == null ) 931 //if (_mesh == null )
932 _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical); 932 // _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical);
933 933
934 934
935 lock (OdeScene.OdeLock) 935 lock (OdeScene.OdeLock)
@@ -1323,7 +1323,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1323 // we don't need to do space calculation because the client sends a position update also. 1323 // we don't need to do space calculation because the client sends a position update also.
1324 1324
1325 // Construction of new prim 1325 // Construction of new prim
1326 //if (_parent_scene.needsMeshing(_pbs)) 1326 if (_parent_scene.needsMeshing(_pbs))
1327 { 1327 {
1328 float meshlod = _parent_scene.meshSculptLOD; 1328 float meshlod = _parent_scene.meshSculptLOD;
1329 1329
@@ -1609,7 +1609,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1609 if (_size.Z <= 0) _size.Z = 0.01f; 1609 if (_size.Z <= 0) _size.Z = 0.01f;
1610 // Construction of new prim 1610 // Construction of new prim
1611 1611
1612 //if (_parent_scene.needsMeshing(_pbs)) 1612 if (_parent_scene.needsMeshing(_pbs))
1613 { 1613 {
1614 // Don't need to re-enable body.. it's done in SetMesh 1614 // Don't need to re-enable body.. it's done in SetMesh
1615 float meshlod = _parent_scene.meshSculptLOD; 1615 float meshlod = _parent_scene.meshSculptLOD;
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index ec0e0ff..3f8aa26 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -1174,16 +1174,17 @@ namespace OpenSim.Region.Physics.OdePlugin
1174 //switch (pbs.ProfileShape) 1174 //switch (pbs.ProfileShape)
1175 //{ 1175 //{
1176 // case ProfileShape.Square: 1176 // case ProfileShape.Square:
1177 /// support simple box & hollow box now; later, more shapes 1177 // //support simple box & hollow box now; later, more shapes
1178 //if (needsMeshing(pbs)) 1178 // if (needsMeshing(pbs))
1179 //{ 1179 // {
1180 // mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); 1180 // mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
1181 //} 1181 // }
1182 1182
1183 // break; 1183 // break;
1184 //} 1184 //}
1185 1185
1186 mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); 1186 if (needsMeshing(pbs))
1187 mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
1187 1188
1188 result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); 1189 result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical);
1189 1190
@@ -1523,14 +1524,18 @@ namespace OpenSim.Region.Physics.OdePlugin
1523 /// </summary> 1524 /// </summary>
1524 /// <param name="pbs"></param> 1525 /// <param name="pbs"></param>
1525 /// <returns></returns> 1526 /// <returns></returns>
1526 //public bool needsMeshing(PrimitiveBaseShape pbs) 1527 public bool needsMeshing(PrimitiveBaseShape pbs)
1527 //{ 1528 {
1529 // most of this is redundant now as the mesher will return null if it cant mesh a prim
1530 // but we still need to check for sculptie meshing being enabled so this is the most
1531 // convenient place to do it for now...
1532
1528 // //if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle && pbs.ProfileCurve == (byte)LLObject.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f) 1533 // //if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle && pbs.ProfileCurve == (byte)LLObject.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f)
1529 // //Console.WriteLine("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + LLObject.UnpackPathScale(pbs.PathScaleY).ToString()); 1534 // //Console.WriteLine("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + LLObject.UnpackPathScale(pbs.PathScaleY).ToString());
1530 // if (pbs.SculptEntry && !meshSculptedPrim) 1535 if (pbs.SculptEntry && !meshSculptedPrim)
1531 // { 1536 {
1532 // return false; 1537 return false;
1533 // } 1538 }
1534 1539
1535 // if (pbs.ProfileHollow != 0) 1540 // if (pbs.ProfileHollow != 0)
1536 // return true; 1541 // return true;
@@ -1577,7 +1582,9 @@ namespace OpenSim.Region.Physics.OdePlugin
1577 1582
1578 1583
1579 // return false; 1584 // return false;
1580 //} 1585
1586 return true; // assume the mesher will return a default shape or null and later code can deal with this
1587 }
1581 1588
1582 /// <summary> 1589 /// <summary>
1583 /// Called after our prim properties are set Scale, position etc. 1590 /// Called after our prim properties are set Scale, position etc.
@@ -1763,7 +1770,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1763 1770
1764 lock (_activeprims) 1771 lock (_activeprims)
1765 { 1772 {
1766 if (timeStep < 0.2f) 1773 //if (timeStep < 0.2f)
1767 { 1774 {
1768 foreach (OdePrim actor in _activeprims) 1775 foreach (OdePrim actor in _activeprims)
1769 { 1776 {