diff options
Diffstat (limited to 'OpenSim')
10 files changed, 36 insertions, 68 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 343a8fd..0fbd746 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1467,13 +1467,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1467 | 1467 | ||
1468 | newPart.PhysActor | 1468 | newPart.PhysActor |
1469 | = m_scene.PhysicsScene.AddPrimShape( | 1469 | = m_scene.PhysicsScene.AddPrimShape( |
1470 | newPart.LocalId, | ||
1471 | string.Format("{0}/{1}", newPart.Name, newPart.UUID), | 1470 | string.Format("{0}/{1}", newPart.Name, newPart.UUID), |
1472 | pbs, | 1471 | pbs, |
1473 | newPart.AbsolutePosition, | 1472 | newPart.AbsolutePosition, |
1474 | newPart.Scale, | 1473 | newPart.Scale, |
1475 | newPart.RotationOffset, | 1474 | newPart.RotationOffset, |
1476 | part.PhysActor.IsPhysical); | 1475 | part.PhysActor.IsPhysical, |
1476 | newPart.LocalId); | ||
1477 | 1477 | ||
1478 | newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); | 1478 | newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); |
1479 | } | 1479 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index e9571aa..7604510 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1588,17 +1588,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
1588 | // or flexible | 1588 | // or flexible |
1589 | if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) | 1589 | if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) |
1590 | { | 1590 | { |
1591 | // m_log.DebugFormat("[SCENE OBJECT PART]: Creating PhysActor for {0} {1} {2}", Name, LocalId, UUID); | 1591 | try |
1592 | 1592 | { | |
1593 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( | 1593 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( |
1594 | LocalId, | 1594 | string.Format("{0}/{1}", Name, UUID), |
1595 | string.Format("{0}/{1}", Name, UUID), | 1595 | Shape, |
1596 | Shape, | 1596 | AbsolutePosition, |
1597 | AbsolutePosition, | 1597 | Scale, |
1598 | Scale, | 1598 | RotationOffset, |
1599 | RotationOffset, | 1599 | RigidBody, |
1600 | RigidBody); | 1600 | m_localId); |
1601 | 1601 | PhysActor.SetMaterial(Material); | |
1602 | } | ||
1603 | catch | ||
1604 | { | ||
1605 | m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom.", m_uuid); | ||
1606 | PhysActor = null; | ||
1607 | } | ||
1602 | // Basic Physics returns null.. joy joy joy. | 1608 | // Basic Physics returns null.. joy joy joy. |
1603 | if (PhysActor != null) | 1609 | if (PhysActor != null) |
1604 | { | 1610 | { |
@@ -4446,7 +4452,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
4446 | AbsolutePosition, | 4452 | AbsolutePosition, |
4447 | Scale, | 4453 | Scale, |
4448 | RotationOffset, | 4454 | RotationOffset, |
4449 | UsePhysics); | 4455 | UsePhysics, |
4456 | m_localId); | ||
4457 | PhysActor.SetMaterial(Material); | ||
4450 | 4458 | ||
4451 | pa = PhysActor; | 4459 | pa = PhysActor; |
4452 | if (pa != null) | 4460 | if (pa != null) |
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index b6e1cb4..6c9d9ab 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs | |||
@@ -84,13 +84,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
84 | */ | 84 | */ |
85 | 85 | ||
86 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 86 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
87 | Vector3 size, Quaternion rotation) | 87 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid) |
88 | { | ||
89 | return AddPrimShape(primName, pbs, position, size, rotation, false); | ||
90 | } | ||
91 | |||
92 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
93 | Vector3 size, Quaternion rotation, bool isPhysical) | ||
94 | { | 88 | { |
95 | return null; | 89 | return null; |
96 | } | 90 | } |
diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs index 6df213d..0d1bd82 100644 --- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs +++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs | |||
@@ -213,12 +213,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin | |||
213 | return newPrim; | 213 | return newPrim; |
214 | } | 214 | } |
215 | 215 | ||
216 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, Vector3 size, Quaternion rotation) | 216 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical, uint localid) |
217 | { | ||
218 | return AddPrimShape(primName, pbs, position, size, rotation, false); | ||
219 | } | ||
220 | |||
221 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical) | ||
222 | { | 217 | { |
223 | PhysicsActor result; | 218 | PhysicsActor result; |
224 | IMesh mesh = null; | 219 | IMesh mesh = null; |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index e2a6a2e..df62dbc 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -626,13 +626,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
626 | } | 626 | } |
627 | 627 | ||
628 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, OpenMetaverse.Vector3 position, | 628 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, OpenMetaverse.Vector3 position, |
629 | OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation) | 629 | OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation, bool isPhysical, uint localid) |
630 | { | ||
631 | return AddPrimShape(primName, pbs, position, size, rotation, false); | ||
632 | } | ||
633 | |||
634 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, OpenMetaverse.Vector3 position, | ||
635 | OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation, bool isPhysical) | ||
636 | { | 630 | { |
637 | PhysicsActor result; | 631 | PhysicsActor result; |
638 | 632 | ||
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 0de4626..28ace34 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -88,15 +88,16 @@ namespace OpenSim.Region.Physics.Manager | |||
88 | 88 | ||
89 | public abstract void RemovePrim(PhysicsActor prim); | 89 | public abstract void RemovePrim(PhysicsActor prim); |
90 | 90 | ||
91 | //public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
92 | // Vector3 size, Quaternion rotation); //To be removed - Actually removed! | ||
93 | |||
91 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 94 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
92 | Vector3 size, Quaternion rotation); //To be removed | 95 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid); |
93 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
94 | Vector3 size, Quaternion rotation, bool isPhysical); | ||
95 | 96 | ||
96 | public virtual PhysicsActor AddPrimShape(uint localID, string primName, PrimitiveBaseShape pbs, Vector3 position, | 97 | public virtual PhysicsActor AddPrimShape(uint localID, string primName, PrimitiveBaseShape pbs, Vector3 position, |
97 | Vector3 size, Quaternion rotation, bool isPhysical) | 98 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid) |
98 | { | 99 | { |
99 | PhysicsActor ret = AddPrimShape(primName, pbs, position, size, rotation, isPhysical); | 100 | PhysicsActor ret = AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid); |
100 | 101 | ||
101 | if (ret != null) | 102 | if (ret != null) |
102 | ret.LocalID = localID; | 103 | ret.LocalID = localID; |
@@ -284,13 +285,7 @@ namespace OpenSim.Region.Physics.Manager | |||
284 | */ | 285 | */ |
285 | 286 | ||
286 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 287 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
287 | Vector3 size, Quaternion rotation) //To be removed | 288 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid) |
288 | { | ||
289 | return AddPrimShape(primName, pbs, position, size, rotation, false); | ||
290 | } | ||
291 | |||
292 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
293 | Vector3 size, Quaternion rotation, bool isPhysical) | ||
294 | { | 289 | { |
295 | m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size); | 290 | m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size); |
296 | return PhysicsActor.Null; | 291 | return PhysicsActor.Null; |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index ba8cba4..6fda32d 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -1708,13 +1708,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1708 | } | 1708 | } |
1709 | 1709 | ||
1710 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 1710 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
1711 | Vector3 size, Quaternion rotation) //To be removed | 1711 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid) |
1712 | { | ||
1713 | return AddPrimShape(primName, pbs, position, size, rotation, false); | ||
1714 | } | ||
1715 | |||
1716 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
1717 | Vector3 size, Quaternion rotation, bool isPhysical) | ||
1718 | { | 1712 | { |
1719 | #if SPAM | 1713 | #if SPAM |
1720 | m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName); | 1714 | m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName); |
diff --git a/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs b/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs index fbd1574..2ea810f 100644 --- a/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs +++ b/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs | |||
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Physics.OdePlugin.Tests | |||
84 | Vector3 position = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f), 128f); | 84 | Vector3 position = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f), 128f); |
85 | Vector3 size = new Vector3(0.5f, 0.5f, 0.5f); | 85 | Vector3 size = new Vector3(0.5f, 0.5f, 0.5f); |
86 | Quaternion rot = Quaternion.Identity; | 86 | Quaternion rot = Quaternion.Identity; |
87 | PhysicsActor prim = ps.AddPrimShape("CoolShape", newcube, position, size, rot, true); | 87 | PhysicsActor prim = ps.AddPrimShape("CoolShape", newcube, position, size, rot, true, 0); |
88 | OdePrim oprim = (OdePrim)prim; | 88 | OdePrim oprim = (OdePrim)prim; |
89 | OdeScene pscene = (OdeScene) ps; | 89 | OdeScene pscene = (OdeScene) ps; |
90 | 90 | ||
diff --git a/OpenSim/Region/Physics/POSPlugin/POSScene.cs b/OpenSim/Region/Physics/POSPlugin/POSScene.cs index c3f5040..2f24a50 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSScene.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSScene.cs | |||
@@ -91,13 +91,7 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
91 | */ | 91 | */ |
92 | 92 | ||
93 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 93 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
94 | Vector3 size, Quaternion rotation) | 94 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid) |
95 | { | ||
96 | return AddPrimShape(primName, pbs, position, size, rotation, false); | ||
97 | } | ||
98 | |||
99 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
100 | Vector3 size, Quaternion rotation, bool isPhysical) | ||
101 | { | 95 | { |
102 | POSPrim prim = new POSPrim(); | 96 | POSPrim prim = new POSPrim(); |
103 | prim.Position = position; | 97 | prim.Position = position; |
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXScene.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXScene.cs index 4de4b01..beb3404 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXScene.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXScene.cs | |||
@@ -108,13 +108,7 @@ namespace OpenSim.Region.Physics.PhysXPlugin | |||
108 | } | 108 | } |
109 | 109 | ||
110 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 110 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
111 | Vector3 size, Quaternion rotation) //To be removed | 111 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid) |
112 | { | ||
113 | return AddPrimShape(primName, pbs, position, size, rotation, false); | ||
114 | } | ||
115 | |||
116 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
117 | Vector3 size, Quaternion rotation, bool isPhysical) | ||
118 | { | 112 | { |
119 | return AddPrim(position, size, rotation); | 113 | return AddPrim(position, size, rotation); |
120 | } | 114 | } |