diff options
Diffstat (limited to 'OpenSim/Region/Physics/ChOdePlugin')
-rw-r--r-- | OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs | 33 |
2 files changed, 34 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs index 3ed3b5a..42a408e 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | |||
@@ -131,6 +131,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
131 | public bool m_disabled; | 131 | public bool m_disabled; |
132 | public bool m_taintadd; | 132 | public bool m_taintadd; |
133 | public bool m_taintselected; | 133 | public bool m_taintselected; |
134 | public bool m_taintphantom; | ||
134 | public bool m_taintCollidesWater; | 135 | public bool m_taintCollidesWater; |
135 | 136 | ||
136 | public uint m_localID; | 137 | public uint m_localID; |
@@ -161,6 +162,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
161 | 162 | ||
162 | private bool iscolliding; | 163 | private bool iscolliding; |
163 | private bool m_isphysical; | 164 | private bool m_isphysical; |
165 | private bool m_isphantom; | ||
164 | private bool m_isSelected; | 166 | private bool m_isSelected; |
165 | 167 | ||
166 | private bool m_NoColide; // for now only for internal use for bad meshs | 168 | private bool m_NoColide; // for now only for internal use for bad meshs |
@@ -311,8 +313,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
311 | m_taintvehicledata = vdata; | 313 | m_taintvehicledata = vdata; |
312 | _parent_scene.AddPhysicsActorTaint(this); | 314 | _parent_scene.AddPhysicsActorTaint(this); |
313 | } | 315 | } |
316 | |||
314 | public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size, | 317 | public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size, |
315 | Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode, uint localid) | 318 | Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical,bool pisPhantom, CollisionLocker dode, uint localid) |
316 | { | 319 | { |
317 | m_localID = localid; | 320 | m_localID = localid; |
318 | ode = dode; | 321 | ode = dode; |
@@ -373,6 +376,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
373 | m_targetSpace = _parent_scene.space; | 376 | m_targetSpace = _parent_scene.space; |
374 | } | 377 | } |
375 | 378 | ||
379 | m_isphantom = pisPhantom; | ||
380 | m_taintphantom = pisPhantom; | ||
381 | |||
376 | _triMeshData = IntPtr.Zero; | 382 | _triMeshData = IntPtr.Zero; |
377 | m_NoColide = false; | 383 | m_NoColide = false; |
378 | 384 | ||
diff --git a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs index 05f6fae..ea89d87 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs | |||
@@ -1730,7 +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, ode, localid); | 1733 | newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical,false, ode, localid); |
1734 | 1734 | ||
1735 | lock (_prims) | 1735 | lock (_prims) |
1736 | _prims.Add(newPrim); | 1736 | _prims.Add(newPrim); |
@@ -1738,23 +1738,27 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1738 | 1738 | ||
1739 | return newPrim; | 1739 | return newPrim; |
1740 | } | 1740 | } |
1741 | /* | 1741 | |
1742 | private PhysicsActor AddPrim(String name, Vector3 position, PhysicsActor parent, | 1742 | private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation, |
1743 | PrimitiveBaseShape pbs, uint localid, byte[] sdata) | 1743 | IMesh mesh, PrimitiveBaseShape pbs, bool isphysical, bool isphantom, uint localid) |
1744 | { | 1744 | { |
1745 | |||
1745 | Vector3 pos = position; | 1746 | Vector3 pos = position; |
1747 | Vector3 siz = size; | ||
1748 | Quaternion rot = rotation; | ||
1746 | 1749 | ||
1747 | OdePrim newPrim; | 1750 | OdePrim newPrim; |
1748 | lock (OdeLock) | 1751 | lock (OdeLock) |
1749 | { | 1752 | { |
1750 | newPrim = new OdePrim(name, this, pos, parent, pbs, ode, localid, sdata); | 1753 | newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical, isphantom, ode, localid); |
1754 | |||
1751 | lock (_prims) | 1755 | lock (_prims) |
1752 | _prims.Add(newPrim); | 1756 | _prims.Add(newPrim); |
1753 | } | 1757 | } |
1754 | 1758 | ||
1755 | return newPrim; | 1759 | return newPrim; |
1756 | } | 1760 | } |
1757 | */ | 1761 | |
1758 | 1762 | ||
1759 | public void addActivePrim(OdePrim activatePrim) | 1763 | public void addActivePrim(OdePrim activatePrim) |
1760 | { | 1764 | { |
@@ -1781,6 +1785,23 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1781 | 1785 | ||
1782 | return result; | 1786 | return result; |
1783 | } | 1787 | } |
1788 | |||
1789 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
1790 | Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, uint localid) | ||
1791 | { | ||
1792 | PhysicsActor result; | ||
1793 | IMesh mesh = null; | ||
1794 | |||
1795 | if (needsMeshing(pbs)) | ||
1796 | mesh = mesher.CreateMesh(primName, pbs, size, (int)LevelOfDetail.High, true); | ||
1797 | |||
1798 | result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical, isPhantom, localid); | ||
1799 | |||
1800 | return result; | ||
1801 | } | ||
1802 | |||
1803 | |||
1804 | |||
1784 | /* | 1805 | /* |
1785 | public override PhysicsActor AddPrimShape(string primName, PhysicsActor parent, PrimitiveBaseShape pbs, Vector3 position, | 1806 | public override PhysicsActor AddPrimShape(string primName, PhysicsActor parent, PrimitiveBaseShape pbs, Vector3 position, |
1786 | uint localid, byte[] sdata) | 1807 | uint localid, byte[] sdata) |