aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/EventManager.cs
diff options
context:
space:
mode:
authornlin2009-04-10 06:39:52 +0000
committernlin2009-04-10 06:39:52 +0000
commit8e6c20b27fdb95b9008614eb36678508407a4d19 (patch)
tree562e0363e5e551c8d3fee03736d319f9e8963c64 /OpenSim/Region/Framework/Scenes/EventManager.cs
parent* Updated BulletDotNET dll with the ContactFlags definition. (diff)
downloadopensim-SC-8e6c20b27fdb95b9008614eb36678508407a4d19.zip
opensim-SC-8e6c20b27fdb95b9008614eb36678508407a4d19.tar.gz
opensim-SC-8e6c20b27fdb95b9008614eb36678508407a4d19.tar.bz2
opensim-SC-8e6c20b27fdb95b9008614eb36678508407a4d19.tar.xz
Handle ObjectSpin* packets to spin physical prims on Ctrl+Shift+Drag
Addresses Mantis #3381 The current implementation works as expected if the object has no rotation or only rotation around the Z axis; you can spin the object left or right (around the world Z axis). It works a little unexpectedly if the object has a non-Z-axis rotation; in this case the body is spun about its local Z axis, not the world Z-axis. (But SL also behaves oddly with a spin on an arbitrarily rotated object.)
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 8621f70..7496af0 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -132,6 +132,14 @@ namespace OpenSim.Region.Framework.Scenes
132 132
133 public event SceneGroupGrabed OnSceneGroupGrab; 133 public event SceneGroupGrabed OnSceneGroupGrab;
134 134
135 public delegate bool SceneGroupSpinStarted(UUID groupID);
136
137 public event SceneGroupSpinStarted OnSceneGroupSpinStart;
138
139 public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation);
140
141 public event SceneGroupSpun OnSceneGroupSpin;
142
135 public delegate void LandObjectAdded(ILandObject newParcel); 143 public delegate void LandObjectAdded(ILandObject newParcel);
136 144
137 public event LandObjectAdded OnLandObjectAdded; 145 public event LandObjectAdded OnLandObjectAdded;
@@ -381,6 +389,8 @@ namespace OpenSim.Region.Framework.Scenes
381 private StopScript handlerStopScript = null; //OnStopScript; 389 private StopScript handlerStopScript = null; //OnStopScript;
382 private SceneGroupMoved handlerSceneGroupMove = null; //OnSceneGroupMove; 390 private SceneGroupMoved handlerSceneGroupMove = null; //OnSceneGroupMove;
383 private SceneGroupGrabed handlerSceneGroupGrab = null; //OnSceneGroupGrab; 391 private SceneGroupGrabed handlerSceneGroupGrab = null; //OnSceneGroupGrab;
392 private SceneGroupSpinStarted handlerSceneGroupSpinStarted = null; //OnSceneGroupSpinStart;
393 private SceneGroupSpun handlerSceneGroupSpin = null; //OnSceneGroupSpin;
384 private LandObjectAdded handlerLandObjectAdded = null; //OnLandObjectAdded; 394 private LandObjectAdded handlerLandObjectAdded = null; //OnLandObjectAdded;
385 private LandObjectRemoved handlerLandObjectRemoved = null; //OnLandObjectRemoved; 395 private LandObjectRemoved handlerLandObjectRemoved = null; //OnLandObjectRemoved;
386 private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null; //OnAvatarEnteringNewParcel; 396 private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null; //OnAvatarEnteringNewParcel;
@@ -636,6 +646,28 @@ namespace OpenSim.Region.Framework.Scenes
636 return true; 646 return true;
637 } 647 }
638 648
649 public bool TriggerGroupSpinStart(UUID groupID)
650 {
651 handlerSceneGroupSpinStarted = OnSceneGroupSpinStart;
652
653 if (handlerSceneGroupSpinStarted != null)
654 {
655 return handlerSceneGroupSpinStarted(groupID);
656 }
657 return true;
658 }
659
660 public bool TriggerGroupSpin(UUID groupID, Quaternion rotation)
661 {
662 handlerSceneGroupSpin = OnSceneGroupSpin;
663
664 if (handlerSceneGroupSpin != null)
665 {
666 return handlerSceneGroupSpin(groupID, rotation);
667 }
668 return true;
669 }
670
639 public void TriggerGroupGrab(UUID groupID, Vector3 offset, UUID userID) 671 public void TriggerGroupGrab(UUID groupID, Vector3 offset, UUID userID)
640 { 672 {
641 handlerSceneGroupGrab = OnSceneGroupGrab; 673 handlerSceneGroupGrab = OnSceneGroupGrab;