aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs39
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs12
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs20
-rw-r--r--OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs21
-rw-r--r--OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs6
-rw-r--r--OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs20
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs14
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs9
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs9
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSCharacter.cs21
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSPrim.cs21
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs44
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
13 files changed, 237 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index cb87212..e9ed066 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1734,6 +1734,45 @@ namespace OpenSim.Region.Framework.Scenes
1734 } 1734 }
1735 } 1735 }
1736 } 1736 }
1737
1738 public void rotLookAt(Quaternion target, float strength, float damping)
1739 {
1740 SceneObjectPart rootpart = m_rootPart;
1741 if (rootpart != null)
1742 {
1743 if (IsAttachment)
1744 {
1745 /*
1746 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
1747 if (avatar != null)
1748 {
1749 Rotate the Av?
1750 } */
1751 }
1752 else
1753 {
1754 if (rootpart.PhysActor != null)
1755 {
1756 rootpart.PhysActor.APIDTarget = new Quaternion(target.X, target.Y, target.Z, target.W);
1757 rootpart.PhysActor.APIDStrength = strength;
1758 rootpart.PhysActor.APIDDamping = damping;
1759 rootpart.PhysActor.APIDActive = true;
1760 }
1761 }
1762 }
1763 }
1764 public void stopLookAt()
1765 {
1766 SceneObjectPart rootpart = m_rootPart;
1767 if (rootpart != null)
1768 {
1769 if (rootpart.PhysActor != null)
1770 {
1771 rootpart.PhysActor.APIDActive = false;
1772 }
1773 }
1774
1775 }
1737 1776
1738 /// <summary> 1777 /// <summary>
1739 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds. 1778 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds.
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b6916f2..c0243a5 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2185,6 +2185,11 @@ namespace OpenSim.Region.Framework.Scenes
2185 ParentGroup.HasGroupChanged = true; 2185 ParentGroup.HasGroupChanged = true;
2186 ScheduleFullUpdate(); 2186 ScheduleFullUpdate();
2187 } 2187 }
2188
2189 public void RotLookAt(Quaternion target, float strength, float damping)
2190 {
2191 m_parentGroup.rotLookAt(target, strength, damping);
2192 }
2188 2193
2189 /// <summary> 2194 /// <summary>
2190 /// Schedules this prim for a full update 2195 /// Schedules this prim for a full update
@@ -2668,7 +2673,14 @@ namespace OpenSim.Region.Framework.Scenes
2668 ParentGroup.HasGroupChanged = true; 2673 ParentGroup.HasGroupChanged = true;
2669 ScheduleFullUpdate(); 2674 ScheduleFullUpdate();
2670 } 2675 }
2676
2677 public void StopLookAt()
2678 {
2679 m_parentGroup.stopLookAt();
2671 2680
2681 m_parentGroup.ScheduleGroupForTerseUpdate();
2682 }
2683
2672 /// <summary> 2684 /// <summary>
2673 /// Set the text displayed for this part. 2685 /// Set the text displayed for this part.
2674 /// </summary> 2686 /// </summary>
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs
index 8df997e..f411dd7 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs
@@ -303,6 +303,26 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
303 set { return; } 303 set { return; }
304 } 304 }
305 305
306 public override Quaternion APIDTarget
307 {
308 set { return; }
309 }
310
311 public override bool APIDActive
312 {
313 set { return; }
314 }
315
316 public override float APIDStrength
317 {
318 set { return; }
319 }
320
321 public override float APIDDamping
322 {
323 set { return; }
324 }
325
306 public override void SubscribeEvents(int ms) 326 public override void SubscribeEvents(int ms)
307 { 327 {
308 } 328 }
diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs
index 5ed3b14..02328b5 100644
--- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs
+++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs
@@ -620,6 +620,27 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
620 set { return; } 620 set { return; }
621 } 621 }
622 622
623
624 public override Quaternion APIDTarget
625 {
626 set { return; }
627 }
628
629 public override bool APIDActive
630 {
631 set { return; }
632 }
633
634 public override float APIDStrength
635 {
636 set { return; }
637 }
638
639 public override float APIDDamping
640 {
641 set { return; }
642 }
643
623 /// <summary> 644 /// <summary>
624 /// Adds the force supplied to the Target Velocity 645 /// Adds the force supplied to the Target Velocity
625 /// The PID controller takes this target velocity and tries to make it a reality 646 /// The PID controller takes this target velocity and tries to make it a reality
diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs
index 5b542db..9603ea4 100644
--- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs
+++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs
@@ -565,7 +565,11 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
565 public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } } 565 public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } }
566 public override float PIDHoverTau { set { m_PIDHoverTau = value; } } 566 public override float PIDHoverTau { set { m_PIDHoverTau = value; } }
567 567
568 568 public override Quaternion APIDTarget { set { return; } }
569 public override bool APIDActive { set { return; } }
570 public override float APIDStrength { set { return; } }
571 public override float APIDDamping { set { return; } }
572
569 public override void AddForce(Vector3 force, bool pushforce) 573 public override void AddForce(Vector3 force, bool pushforce)
570 { 574 {
571 m_forcelist.Add(force); 575 m_forcelist.Add(force);
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
index 1e94ee2..d5d146e 100644
--- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
+++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
@@ -1238,6 +1238,26 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1238 public override PIDHoverType PIDHoverType { set { return; } } 1238 public override PIDHoverType PIDHoverType { set { return; } }
1239 public override float PIDHoverTau { set { return; } } 1239 public override float PIDHoverTau { set { return; } }
1240 1240
1241 public override OpenMetaverse.Quaternion APIDTarget
1242 {
1243 set { return; }
1244 }
1245
1246 public override bool APIDActive
1247 {
1248 set { return; }
1249 }
1250
1251 public override float APIDStrength
1252 {
1253 set { return; }
1254 }
1255
1256 public override float APIDDamping
1257 {
1258 set { return; }
1259 }
1260
1241 1261
1242 public override void SubscribeEvents(int ms) 1262 public override void SubscribeEvents(int ms)
1243 { 1263 {
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index f58129d..10b153d 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -243,7 +243,12 @@ namespace OpenSim.Region.Physics.Manager
243 public abstract PIDHoverType PIDHoverType { set;} 243 public abstract PIDHoverType PIDHoverType { set;}
244 public abstract float PIDHoverTau { set;} 244 public abstract float PIDHoverTau { set;}
245 245
246 246 // For RotLookAt
247 public abstract Quaternion APIDTarget { set;}
248 public abstract bool APIDActive { set;}
249 public abstract float APIDStrength { set;}
250 public abstract float APIDDamping { set;}
251
247 public abstract void AddForce(Vector3 force, bool pushforce); 252 public abstract void AddForce(Vector3 force, bool pushforce);
248 public abstract void AddAngularForce(Vector3 force, bool pushforce); 253 public abstract void AddAngularForce(Vector3 force, bool pushforce);
249 public abstract void SetMomentum(Vector3 momentum); 254 public abstract void SetMomentum(Vector3 momentum);
@@ -476,7 +481,12 @@ namespace OpenSim.Region.Physics.Manager
476 public override bool PIDHoverActive { set { return; } } 481 public override bool PIDHoverActive { set { return; } }
477 public override PIDHoverType PIDHoverType { set { return; } } 482 public override PIDHoverType PIDHoverType { set { return; } }
478 public override float PIDHoverTau { set { return; } } 483 public override float PIDHoverTau { set { return; } }
479 484
485 public override Quaternion APIDTarget { set { return; } }
486 public override bool APIDActive { set { return; } }
487 public override float APIDStrength { set { return; } }
488 public override float APIDDamping { set { return; } }
489
480 public override void SetMomentum(Vector3 momentum) 490 public override void SetMomentum(Vector3 momentum)
481 { 491 {
482 } 492 }
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 40fbde1..06ed8fb 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -1196,6 +1196,15 @@ namespace OpenSim.Region.Physics.OdePlugin
1196 public override bool PIDHoverActive { set { return; } } 1196 public override bool PIDHoverActive { set { return; } }
1197 public override PIDHoverType PIDHoverType { set { return; } } 1197 public override PIDHoverType PIDHoverType { set { return; } }
1198 public override float PIDHoverTau { set { return; } } 1198 public override float PIDHoverTau { set { return; } }
1199
1200 public override Quaternion APIDTarget{ set { return; } }
1201
1202 public override bool APIDActive{ set { return; } }
1203
1204 public override float APIDStrength{ set { return; } }
1205
1206 public override float APIDDamping{ set { return; } }
1207
1199 1208
1200 public override void SubscribeEvents(int ms) 1209 public override void SubscribeEvents(int ms)
1201 { 1210 {
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index d241574..3eb3b28 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -2827,6 +2827,15 @@ Console.WriteLine(" JointCreateFixed");
2827 public override bool PIDHoverActive { set { m_useHoverPID = value; } } 2827 public override bool PIDHoverActive { set { m_useHoverPID = value; } }
2828 public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } } 2828 public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } }
2829 public override float PIDHoverTau { set { m_PIDHoverTau = value; } } 2829 public override float PIDHoverTau { set { m_PIDHoverTau = value; } }
2830
2831 public override Quaternion APIDTarget{ set { return; } }
2832
2833 public override bool APIDActive{ set { return; } }
2834
2835 public override float APIDStrength{ set { return; } }
2836
2837 public override float APIDDamping{ set { return; } }
2838
2830 2839
2831 private void createAMotor(Vector3 axis) 2840 private void createAMotor(Vector3 axis)
2832 { 2841 {
diff --git a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs
index 26cd1dd..566b4e7 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs
@@ -304,6 +304,27 @@ namespace OpenSim.Region.Physics.POSPlugin
304 { 304 {
305 set { return; } 305 set { return; }
306 } 306 }
307
308 public override Quaternion APIDTarget
309 {
310 set { return; }
311 }
312
313 public override bool APIDActive
314 {
315 set { return; }
316 }
317
318 public override float APIDStrength
319 {
320 set { return; }
321 }
322
323 public override float APIDDamping
324 {
325 set { return; }
326 }
327
307 328
308 public override void SubscribeEvents(int ms) 329 public override void SubscribeEvents(int ms)
309 { 330 {
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs
index 96c3e26..7447f76 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs
@@ -299,6 +299,27 @@ namespace OpenSim.Region.Physics.POSPlugin
299 { 299 {
300 set { return; } 300 set { return; }
301 } 301 }
302
303 public override Quaternion APIDTarget
304 {
305 set { return; }
306 }
307
308 public override bool APIDActive
309 {
310 set { return; }
311 }
312
313 public override float APIDStrength
314 {
315 set { return; }
316 }
317
318 public override float APIDDamping
319 {
320 set { return; }
321 }
322
302 323
303 public override void SubscribeEvents(int ms) 324 public override void SubscribeEvents(int ms)
304 { 325 {
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
index 8bdb18d..24eb6b1 100644
--- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
@@ -498,6 +498,28 @@ namespace OpenSim.Region.Physics.PhysXPlugin
498 public override bool PIDHoverActive { set { return; } } 498 public override bool PIDHoverActive { set { return; } }
499 public override PIDHoverType PIDHoverType { set { return; } } 499 public override PIDHoverType PIDHoverType { set { return; } }
500 public override float PIDHoverTau { set { return; } } 500 public override float PIDHoverTau { set { return; } }
501
502 public override Quaternion APIDTarget
503 {
504 set { return; }
505 }
506
507 public override bool APIDActive
508 {
509 set { return; }
510 }
511
512 public override float APIDStrength
513 {
514 set { return; }
515 }
516
517 public override float APIDDamping
518 {
519 set { return; }
520 }
521
522
501 523
502 public override void SubscribeEvents(int ms) 524 public override void SubscribeEvents(int ms)
503 { 525 {
@@ -780,6 +802,28 @@ namespace OpenSim.Region.Physics.PhysXPlugin
780 public override bool PIDHoverActive { set { return; } } 802 public override bool PIDHoverActive { set { return; } }
781 public override PIDHoverType PIDHoverType { set { return; } } 803 public override PIDHoverType PIDHoverType { set { return; } }
782 public override float PIDHoverTau { set { return; } } 804 public override float PIDHoverTau { set { return; } }
805
806 public override Quaternion APIDTarget
807 {
808 set { return; }
809 }
810
811 public override bool APIDActive
812 {
813 set { return; }
814 }
815
816 public override float APIDStrength
817 {
818 set { return; }
819 }
820
821 public override float APIDDamping
822 {
823 set { return; }
824 }
825
826
783 827
784 public override void SubscribeEvents(int ms) 828 public override void SubscribeEvents(int ms)
785 { 829 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 79b2391..cf3a1a0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2724,7 +2724,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2724 public void llStopLookAt() 2724 public void llStopLookAt()
2725 { 2725 {
2726 m_host.AddScriptLPS(1); 2726 m_host.AddScriptLPS(1);
2727 NotImplemented("llStopLookAt"); 2727// NotImplemented("llStopLookAt");
2728 m_host.StopLookAt();
2728 } 2729 }
2729 2730
2730 public void llSetTimerEvent(double sec) 2731 public void llSetTimerEvent(double sec)
@@ -3071,7 +3072,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3071 public void llRotLookAt(LSL_Rotation target, double strength, double damping) 3072 public void llRotLookAt(LSL_Rotation target, double strength, double damping)
3072 { 3073 {
3073 m_host.AddScriptLPS(1); 3074 m_host.AddScriptLPS(1);
3074 NotImplemented("llRotLookAt"); 3075// NotImplemented("llRotLookAt");
3076 m_host.RotLookAt(Rot2Quaternion(target), (float)strength, (float)damping);
3075 } 3077 }
3076 3078
3077 public LSL_Integer llStringLength(string str) 3079 public LSL_Integer llStringLength(string str)