diff options
author | Dahlia Trimble | 2008-09-19 09:13:27 +0000 |
---|---|---|
committer | Dahlia Trimble | 2008-09-19 09:13:27 +0000 |
commit | e6afb283557d01536ac4a43584840381ccb04ead (patch) | |
tree | b744d84af27df769fb8009e363347649b88a96c1 /OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |
parent | * Tweaked handler code to recognize LibOMV's LLSD Login by post content. (diff) | |
download | opensim-SC-e6afb283557d01536ac4a43584840381ccb04ead.zip opensim-SC-e6afb283557d01536ac4a43584840381ccb04ead.tar.gz opensim-SC-e6afb283557d01536ac4a43584840381ccb04ead.tar.bz2 opensim-SC-e6afb283557d01536ac4a43584840381ccb04ead.tar.xz |
re-enabled some ODE internal proxies for some simple prim types to try to save some more memory
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 107 |
1 files changed, 57 insertions, 50 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 79c4041..c1077f8 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -1332,7 +1332,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1332 | if (IsPhysical) | 1332 | if (IsPhysical) |
1333 | meshlod = _parent_scene.MeshSculptphysicalLOD; | 1333 | meshlod = _parent_scene.MeshSculptphysicalLOD; |
1334 | // Don't need to re-enable body.. it's done in SetMesh | 1334 | // Don't need to re-enable body.. it's done in SetMesh |
1335 | IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); | 1335 | |
1336 | IMesh mesh = null; | ||
1337 | |||
1338 | if(_parent_scene.needsMeshing(_pbs)) | ||
1339 | mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); | ||
1340 | |||
1341 | //IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); | ||
1336 | 1342 | ||
1337 | if (mesh != null) | 1343 | if (mesh != null) |
1338 | { | 1344 | { |
@@ -1691,55 +1697,56 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1691 | d.GeomSetQuaternion(prim_geom, ref myrot); | 1697 | d.GeomSetQuaternion(prim_geom, ref myrot); |
1692 | } | 1698 | } |
1693 | } | 1699 | } |
1694 | //else | 1700 | else |
1695 | //{ | 1701 | { |
1696 | // if (_pbs.ProfileShape == ProfileShape.HalfCircle && _pbs.PathCurve == (byte)Extrusion.Curve1) | 1702 | if (_pbs.ProfileShape == ProfileShape.HalfCircle && _pbs.PathCurve == (byte)Extrusion.Curve1) |
1697 | // { | 1703 | { |
1698 | // if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z) | 1704 | if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z) |
1699 | // { | 1705 | { |
1700 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); | 1706 | _parent_scene.waitForSpaceUnlock(m_targetSpace); |
1701 | // SetGeom(d.CreateSphere(m_targetSpace, _size.X / 2)); | 1707 | SetGeom(d.CreateSphere(m_targetSpace, _size.X / 2)); |
1702 | // } | 1708 | } |
1703 | // else | 1709 | else |
1704 | // { | 1710 | { |
1705 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); | 1711 | _parent_scene.waitForSpaceUnlock(m_targetSpace); |
1706 | // SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); | 1712 | SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); |
1707 | // } | 1713 | } |
1708 | // } | 1714 | } |
1709 | // //else if (_pbs.ProfileShape == ProfileShape.Circle && _pbs.PathCurve == (byte)Extrusion.Straight) | 1715 | //else if (_pbs.ProfileShape == ProfileShape.Circle && _pbs.PathCurve == (byte)Extrusion.Straight) |
1710 | // //{ | 1716 | //{ |
1711 | // //Cyllinder | 1717 | //Cyllinder |
1712 | // //if (_size.X == _size.Y) | 1718 | //if (_size.X == _size.Y) |
1713 | // //{ | 1719 | //{ |
1714 | // //prim_geom = d.CreateCylinder(m_targetSpace, _size.X / 2, _size.Z); | 1720 | //prim_geom = d.CreateCylinder(m_targetSpace, _size.X / 2, _size.Z); |
1715 | // //} | 1721 | //} |
1716 | // //else | 1722 | //else |
1717 | // //{ | 1723 | //{ |
1718 | // //prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); | 1724 | //prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); |
1719 | // //} | 1725 | //} |
1720 | // //} | 1726 | //} |
1721 | // else | 1727 | else |
1722 | // { | 1728 | { |
1723 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); | 1729 | _parent_scene.waitForSpaceUnlock(m_targetSpace); |
1724 | // SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); | 1730 | SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); |
1725 | // } | 1731 | } |
1726 | // d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); | 1732 | d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); |
1727 | // d.Quaternion myrot = new d.Quaternion(); | 1733 | d.Quaternion myrot = new d.Quaternion(); |
1728 | // myrot.W = _orientation.w; | 1734 | //myrot.W = _orientation.w; |
1729 | // myrot.X = _orientation.X; | 1735 | myrot.W = _orientation.W; |
1730 | // myrot.Y = _orientation.Y; | 1736 | myrot.X = _orientation.X; |
1731 | // myrot.Z = _orientation.Z; | 1737 | myrot.Y = _orientation.Y; |
1732 | // d.GeomSetQuaternion(prim_geom, ref myrot); | 1738 | myrot.Z = _orientation.Z; |
1733 | 1739 | d.GeomSetQuaternion(prim_geom, ref myrot); | |
1734 | // //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); | 1740 | |
1735 | // if (IsPhysical && Body == (IntPtr)0) | 1741 | //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); |
1736 | // { | 1742 | if (IsPhysical && Body == (IntPtr)0) |
1737 | // // Re creates body on size. | 1743 | { |
1738 | // // EnableBody also does setMass() | 1744 | // Re creates body on size. |
1739 | // enableBody(); | 1745 | // EnableBody also does setMass() |
1740 | // d.BodyEnable(Body); | 1746 | enableBody(); |
1741 | // } | 1747 | d.BodyEnable(Body); |
1742 | //} | 1748 | } |
1749 | } | ||
1743 | 1750 | ||
1744 | _parent_scene.geom_name_map[prim_geom] = oldname; | 1751 | _parent_scene.geom_name_map[prim_geom] = oldname; |
1745 | 1752 | ||