diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | 66 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsScene.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 19 | ||||
-rw-r--r-- | OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | 19 |
6 files changed, 90 insertions, 47 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index f26b9a1..7c2bbf4 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | |||
@@ -101,9 +101,14 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
101 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | 101 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, |
102 | PhysicsVector size, Quaternion rotation) | 102 | PhysicsVector size, Quaternion rotation) |
103 | { | 103 | { |
104 | return null; | 104 | return this.AddPrimShape(primName, pbs, position, size, rotation, false); |
105 | } | 105 | } |
106 | 106 | ||
107 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | ||
108 | PhysicsVector size, Quaternion rotation, bool isPhysical) | ||
109 | { | ||
110 | return null; | ||
111 | } | ||
107 | 112 | ||
108 | public override void Simulate(float timeStep) | 113 | public override void Simulate(float timeStep) |
109 | { | 114 | { |
@@ -186,6 +191,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
186 | _acceleration = new PhysicsVector(); | 191 | _acceleration = new PhysicsVector(); |
187 | } | 192 | } |
188 | 193 | ||
194 | public override bool IsPhysical | ||
195 | { | ||
196 | get { return false; } | ||
197 | set { return; } | ||
198 | } | ||
199 | |||
189 | public override bool Flying | 200 | public override bool Flying |
190 | { | 201 | { |
191 | get { return flying; } | 202 | get { return flying; } |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 7159754..5a2b22c 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -387,6 +387,11 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
387 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | 387 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, |
388 | PhysicsVector size, AxiomQuaternion rotation) | 388 | PhysicsVector size, AxiomQuaternion rotation) |
389 | { | 389 | { |
390 | return this.AddPrimShape(primName, pbs, position, size, rotation, false); | ||
391 | } | ||
392 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | ||
393 | PhysicsVector size, AxiomQuaternion rotation, bool isPhysical) | ||
394 | { | ||
390 | PhysicsActor result; | 395 | PhysicsActor result; |
391 | 396 | ||
392 | switch (pbs.ProfileShape) | 397 | switch (pbs.ProfileShape) |
@@ -651,10 +656,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
651 | 656 | ||
652 | public override PhysicsVector Position | 657 | public override PhysicsVector Position |
653 | { | 658 | { |
654 | get | 659 | get { return _position; } |
655 | { | ||
656 | return _position; | ||
657 | } | ||
658 | set | 660 | set |
659 | { | 661 | { |
660 | lock (BulletXScene.BulletXLock) | 662 | lock (BulletXScene.BulletXLock) |
@@ -666,10 +668,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
666 | } | 668 | } |
667 | public override PhysicsVector Velocity | 669 | public override PhysicsVector Velocity |
668 | { | 670 | { |
669 | get | 671 | get { return _velocity; } |
670 | { | ||
671 | return _velocity; | ||
672 | } | ||
673 | set | 672 | set |
674 | { | 673 | { |
675 | lock (BulletXScene.BulletXLock) | 674 | lock (BulletXScene.BulletXLock) |
@@ -689,31 +688,16 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
689 | } | 688 | } |
690 | public override PhysicsVector Size | 689 | public override PhysicsVector Size |
691 | { | 690 | { |
692 | get | 691 | get { return _size; } |
693 | { | 692 | set { lock (BulletXScene.BulletXLock) { _size = value; } } |
694 | return _size; | ||
695 | } | ||
696 | set | ||
697 | { | ||
698 | lock (BulletXScene.BulletXLock) | ||
699 | { | ||
700 | _size = value; | ||
701 | } | ||
702 | } | ||
703 | } | 693 | } |
704 | public override PhysicsVector Acceleration | 694 | public override PhysicsVector Acceleration |
705 | { | 695 | { |
706 | get | 696 | get { return _acceleration; } |
707 | { | ||
708 | return _acceleration; | ||
709 | } | ||
710 | } | 697 | } |
711 | public override AxiomQuaternion Orientation | 698 | public override AxiomQuaternion Orientation |
712 | { | 699 | { |
713 | get | 700 | get { return _orientation; } |
714 | { | ||
715 | return _orientation; | ||
716 | } | ||
717 | set | 701 | set |
718 | { | 702 | { |
719 | lock (BulletXScene.BulletXLock) | 703 | lock (BulletXScene.BulletXLock) |
@@ -723,29 +707,29 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
723 | } | 707 | } |
724 | } | 708 | } |
725 | } | 709 | } |
726 | public virtual float Mass | 710 | public virtual float Mass |
727 | { get { return 0; } } | 711 | { |
712 | get { return 0; } | ||
713 | } | ||
728 | public RigidBody RigidBody | 714 | public RigidBody RigidBody |
729 | { | 715 | { |
730 | get | 716 | get { return rigidBody; } |
731 | { | ||
732 | return rigidBody; | ||
733 | } | ||
734 | } | 717 | } |
735 | public Vector3 RigidBodyPosition | 718 | public Vector3 RigidBodyPosition |
736 | { | 719 | { |
737 | get { return this.rigidBody.CenterOfMassPosition; } | 720 | get { return this.rigidBody.CenterOfMassPosition; } |
738 | } | 721 | } |
722 | |||
723 | public override bool IsPhysical | ||
724 | { | ||
725 | get { return false; } | ||
726 | set { return; } | ||
727 | } | ||
728 | |||
739 | public override bool Flying | 729 | public override bool Flying |
740 | { | 730 | { |
741 | get | 731 | get { return flying; } |
742 | { | 732 | set { flying = value; } |
743 | return flying; | ||
744 | } | ||
745 | set | ||
746 | { | ||
747 | flying = value; | ||
748 | } | ||
749 | } | 733 | } |
750 | public override bool IsColliding | 734 | public override bool IsColliding |
751 | { | 735 | { |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index f1d0f84..bfe1d0b 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -58,6 +58,8 @@ namespace OpenSim.Region.Physics.Manager | |||
58 | 58 | ||
59 | public abstract Quaternion Orientation { get; set; } | 59 | public abstract Quaternion Orientation { get; set; } |
60 | 60 | ||
61 | public abstract bool IsPhysical {get; set;} | ||
62 | |||
61 | public abstract bool Flying { get; set; } | 63 | public abstract bool Flying { get; set; } |
62 | 64 | ||
63 | public abstract bool IsColliding { get; set; } | 65 | public abstract bool IsColliding { get; set; } |
@@ -100,6 +102,12 @@ namespace OpenSim.Region.Physics.Manager | |||
100 | get { return PhysicsVector.Zero; } | 102 | get { return PhysicsVector.Zero; } |
101 | } | 103 | } |
102 | 104 | ||
105 | public override bool IsPhysical | ||
106 | { | ||
107 | get { return false; } | ||
108 | set { return; } | ||
109 | } | ||
110 | |||
103 | public override bool Flying | 111 | public override bool Flying |
104 | { | 112 | { |
105 | get { return false; } | 113 | get { return false; } |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 3f08234..13591ea 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -45,7 +45,9 @@ namespace OpenSim.Region.Physics.Manager | |||
45 | public abstract void RemovePrim(PhysicsActor prim); | 45 | public abstract void RemovePrim(PhysicsActor prim); |
46 | 46 | ||
47 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | 47 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, |
48 | PhysicsVector size, Quaternion rotation); | 48 | PhysicsVector size, Quaternion rotation); //To be removed |
49 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | ||
50 | PhysicsVector size, Quaternion rotation, bool isPhysical); | ||
49 | 51 | ||
50 | public abstract void Simulate(float timeStep); | 52 | public abstract void Simulate(float timeStep); |
51 | 53 | ||
@@ -82,9 +84,13 @@ namespace OpenSim.Region.Physics.Manager | |||
82 | return PhysicsActor.Null; | 84 | return PhysicsActor.Null; |
83 | } | 85 | } |
84 | */ | 86 | */ |
85 | |||
86 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | 87 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, |
87 | PhysicsVector size, Quaternion rotation) | 88 | PhysicsVector size, Quaternion rotation) //To be removed |
89 | { | ||
90 | return this.AddPrimShape(primName, pbs, position, size, rotation, false); | ||
91 | } | ||
92 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | ||
93 | PhysicsVector size, Quaternion rotation, bool isPhysical) | ||
88 | { | 94 | { |
89 | MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size); | 95 | MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size); |
90 | return PhysicsActor.Null; | 96 | return PhysicsActor.Null; |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 82b94db..f1db034 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -300,7 +300,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
300 | 300 | ||
301 | 301 | ||
302 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | 302 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, |
303 | PhysicsVector size, Quaternion rotation) | 303 | PhysicsVector size, Quaternion rotation) //To be removed |
304 | { | ||
305 | return this.AddPrimShape(primName, pbs, position, size, rotation, false); | ||
306 | } | ||
307 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | ||
308 | PhysicsVector size, Quaternion rotation, bool isPhysical) | ||
304 | { | 309 | { |
305 | PhysicsActor result; | 310 | PhysicsActor result; |
306 | 311 | ||
@@ -510,6 +515,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
510 | parent_scene.actor_name_map[Shell] = (PhysicsActor)this; | 515 | parent_scene.actor_name_map[Shell] = (PhysicsActor)this; |
511 | } | 516 | } |
512 | 517 | ||
518 | public override bool IsPhysical | ||
519 | { | ||
520 | get { return false; } | ||
521 | set { return; } | ||
522 | } | ||
523 | |||
513 | public override bool Flying | 524 | public override bool Flying |
514 | { | 525 | { |
515 | get { return flying; } | 526 | get { return flying; } |
@@ -758,6 +769,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
758 | prim_geom = d.CreateTriMesh(parent_scene.space, _triMeshData, parent_scene.triCallback, null, null); | 769 | prim_geom = d.CreateTriMesh(parent_scene.space, _triMeshData, parent_scene.triCallback, null, null); |
759 | } | 770 | } |
760 | 771 | ||
772 | public override bool IsPhysical | ||
773 | { | ||
774 | get { return false; } | ||
775 | set { return; } | ||
776 | } | ||
777 | |||
761 | public override bool Flying | 778 | public override bool Flying |
762 | { | 779 | { |
763 | get { return false; //no flying prims for you | 780 | get { return false; //no flying prims for you |
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs index cad66d7..7a43a0a 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | |||
@@ -120,7 +120,12 @@ namespace OpenSim.Region.Physics.PhysXPlugin | |||
120 | } | 120 | } |
121 | 121 | ||
122 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | 122 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, |
123 | PhysicsVector size, Quaternion rotation) | 123 | PhysicsVector size, Quaternion rotation) //To be removed |
124 | { | ||
125 | return this.AddPrimShape(primName, pbs, position, size, rotation, false); | ||
126 | } | ||
127 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | ||
128 | PhysicsVector size, Quaternion rotation, bool isPhysical) | ||
124 | { | 129 | { |
125 | return AddPrim(position, size, rotation); | 130 | return AddPrim(position, size, rotation); |
126 | } | 131 | } |
@@ -193,6 +198,12 @@ namespace OpenSim.Region.Physics.PhysXPlugin | |||
193 | _character = character; | 198 | _character = character; |
194 | } | 199 | } |
195 | 200 | ||
201 | public override bool IsPhysical | ||
202 | { | ||
203 | get { return false; } | ||
204 | set { return; } | ||
205 | } | ||
206 | |||
196 | public override bool Flying | 207 | public override bool Flying |
197 | { | 208 | { |
198 | get { return flying; } | 209 | get { return flying; } |
@@ -305,6 +316,12 @@ namespace OpenSim.Region.Physics.PhysXPlugin | |||
305 | _prim = prim; | 316 | _prim = prim; |
306 | } | 317 | } |
307 | 318 | ||
319 | public override bool IsPhysical | ||
320 | { | ||
321 | get { return false; } | ||
322 | set { return; } | ||
323 | } | ||
324 | |||
308 | public override bool Flying | 325 | public override bool Flying |
309 | { | 326 | { |
310 | get { return false; //no flying prims for you | 327 | get { return false; //no flying prims for you |