aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-03-21 12:57:46 +0000
committerUbitUmarov2012-03-21 12:57:46 +0000
commit316f272b621741e694f2b522910594a0e5879634 (patch)
tree54cf9f0069ed9b53b29ea625c1354a9fb9000879 /OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
parentMerge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
downloadopensim-SC_OLD-316f272b621741e694f2b522910594a0e5879634.zip
opensim-SC_OLD-316f272b621741e694f2b522910594a0e5879634.tar.gz
opensim-SC_OLD-316f272b621741e694f2b522910594a0e5879634.tar.bz2
opensim-SC_OLD-316f272b621741e694f2b522910594a0e5879634.tar.xz
shapetype support on chOde so it can also request a simple convex hull 'mesh'
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs44
1 files changed, 12 insertions, 32 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
index ea89d87..00f5122 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
@@ -1720,7 +1720,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1720 } 1720 }
1721 1721
1722 private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation, 1722 private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation,
1723 IMesh mesh, PrimitiveBaseShape pbs, bool isphysical, uint localid) 1723 IMesh mesh, PrimitiveBaseShape pbs, bool isphysical, bool isphantom, byte shapetype, uint localid)
1724 { 1724 {
1725 1725
1726 Vector3 pos = position; 1726 Vector3 pos = position;
@@ -1730,27 +1730,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1730 OdePrim newPrim; 1730 OdePrim newPrim;
1731 lock (OdeLock) 1731 lock (OdeLock)
1732 { 1732 {
1733 newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical,false, ode, localid); 1733 newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical, isphantom, shapetype, ode, localid);
1734
1735 lock (_prims)
1736 _prims.Add(newPrim);
1737 }
1738
1739 return newPrim;
1740 }
1741
1742 private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation,
1743 IMesh mesh, PrimitiveBaseShape pbs, bool isphysical, bool isphantom, uint localid)
1744 {
1745
1746 Vector3 pos = position;
1747 Vector3 siz = size;
1748 Quaternion rot = rotation;
1749
1750 OdePrim newPrim;
1751 lock (OdeLock)
1752 {
1753 newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical, isphantom, ode, localid);
1754 1734
1755 lock (_prims) 1735 lock (_prims)
1756 _prims.Add(newPrim); 1736 _prims.Add(newPrim);
@@ -1781,7 +1761,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1781 if (needsMeshing(pbs)) 1761 if (needsMeshing(pbs))
1782 mesh = mesher.CreateMesh(primName, pbs, size, (int)LevelOfDetail.High, true); 1762 mesh = mesher.CreateMesh(primName, pbs, size, (int)LevelOfDetail.High, true);
1783 1763
1784 result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical, localid); 1764 result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical,false,0, localid);
1785 1765
1786 return result; 1766 return result;
1787 } 1767 }
@@ -1795,25 +1775,25 @@ namespace OpenSim.Region.Physics.OdePlugin
1795 if (needsMeshing(pbs)) 1775 if (needsMeshing(pbs))
1796 mesh = mesher.CreateMesh(primName, pbs, size, (int)LevelOfDetail.High, true); 1776 mesh = mesher.CreateMesh(primName, pbs, size, (int)LevelOfDetail.High, true);
1797 1777
1798 result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical, isPhantom, localid); 1778 result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical, isPhantom,0, localid);
1799 1779
1800 return result; 1780 return result;
1801 } 1781 }
1802 1782
1803 1783 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
1804 1784 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapetype, uint localid)
1805/*
1806 public override PhysicsActor AddPrimShape(string primName, PhysicsActor parent, PrimitiveBaseShape pbs, Vector3 position,
1807 uint localid, byte[] sdata)
1808 { 1785 {
1809 PhysicsActor result; 1786 PhysicsActor result;
1787 IMesh mesh = null;
1810 1788
1811 result = AddPrim(primName, position, parent, 1789 if (needsMeshing(pbs))
1812 pbs, localid, sdata); 1790 mesh = mesher.CreateMesh(primName, pbs, size, (int)LevelOfDetail.High, true);
1791
1792 result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical, isPhantom, shapetype, localid);
1813 1793
1814 return result; 1794 return result;
1815 } 1795 }
1816*/ 1796
1817 public override float TimeDilation 1797 public override float TimeDilation
1818 { 1798 {
1819 get { return m_timeDilation; } 1799 get { return m_timeDilation; }