aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMW2008-10-10 16:01:59 +0000
committerMW2008-10-10 16:01:59 +0000
commit5be74427365c3b712099aba8f8345f5fd92ca2fc (patch)
tree6bc48aa9326bf1ff4c004d6455ad23fa4a83ca4a /OpenSim
parentvery tiny change (diff)
downloadopensim-SC_OLD-5be74427365c3b712099aba8f8345f5fd92ca2fc.zip
opensim-SC_OLD-5be74427365c3b712099aba8f8345f5fd92ca2fc.tar.gz
opensim-SC_OLD-5be74427365c3b712099aba8f8345f5fd92ca2fc.tar.bz2
opensim-SC_OLD-5be74427365c3b712099aba8f8345f5fd92ca2fc.tar.xz
added a list of SurfaceTouchEventArgs to the IClientAPI.OnGrabUpdate event, for the new surface touch parameters in 1.21 viewers.
TODO: add the touch args to OnGrabObject and OnDeGrabObject.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Framework/SurfaceTouchEventArgs.cs17
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs17
-rw-r--r--OpenSim/Region/DataSnapshot/ObjectSnapshot.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs2
5 files changed, 36 insertions, 4 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 5bf0d19..26ab586 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -144,7 +144,7 @@ namespace OpenSim.Framework
144 public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery 144 public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery
145 ); 145 );
146 146
147 public delegate void MoveObject(UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient); 147 public delegate void MoveObject(UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
148 148
149 public delegate void ParcelAccessListRequest( 149 public delegate void ParcelAccessListRequest(
150 UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client); 150 UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
diff --git a/OpenSim/Framework/SurfaceTouchEventArgs.cs b/OpenSim/Framework/SurfaceTouchEventArgs.cs
new file mode 100644
index 0000000..f34d8ba
--- /dev/null
+++ b/OpenSim/Framework/SurfaceTouchEventArgs.cs
@@ -0,0 +1,17 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenMetaverse;
5
6namespace OpenSim.Framework
7{
8 public class SurfaceTouchEventArgs
9 {
10 public Vector3 Binormal;
11 public int FaceIndex;
12 public Vector3 Normal;
13 public Vector3 Position;
14 public Vector3 STCoord;
15 public Vector3 UVCoord;
16 }
17}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 563d83b..d82b0cc 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -4725,8 +4725,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4725 4725
4726 if (handlerGrabUpdate != null) 4726 if (handlerGrabUpdate != null)
4727 { 4727 {
4728 List<SurfaceTouchEventArgs> touchArgs = new List<SurfaceTouchEventArgs>();
4729 if ((grabUpdate.SurfaceInfo != null) && (grabUpdate.SurfaceInfo.Length > 0))
4730 {
4731 foreach (ObjectGrabUpdatePacket.SurfaceInfoBlock surfaceInfo in grabUpdate.SurfaceInfo)
4732 {
4733 SurfaceTouchEventArgs arg = new SurfaceTouchEventArgs();
4734 arg.Binormal = surfaceInfo.Binormal;
4735 arg.FaceIndex = surfaceInfo.FaceIndex;
4736 arg.Normal = surfaceInfo.Normal;
4737 arg.Position = surfaceInfo.Position;
4738 arg.STCoord = surfaceInfo.STCoord;
4739 arg.UVCoord = surfaceInfo.UVCoord;
4740 touchArgs.Add(arg);
4741 }
4742 }
4728 handlerGrabUpdate(grabUpdate.ObjectData.ObjectID, grabUpdate.ObjectData.GrabOffsetInitial, 4743 handlerGrabUpdate(grabUpdate.ObjectData.ObjectID, grabUpdate.ObjectData.GrabOffsetInitial,
4729 grabUpdate.ObjectData.GrabPosition, this); 4744 grabUpdate.ObjectData.GrabPosition, this, touchArgs);
4730 } 4745 }
4731 break; 4746 break;
4732 case PacketType.ObjectDeGrab: 4747 case PacketType.ObjectDeGrab:
diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
index 49d9aec..c77de96 100644
--- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
+++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
68 { this.Stale = true; }; 68 { this.Stale = true; };
69 client.OnDelinkObjects += delegate(List<uint> primIds) { this.Stale = true; }; 69 client.OnDelinkObjects += delegate(List<uint> primIds) { this.Stale = true; };
70 client.OnGrabUpdate += delegate(UUID objectID, Vector3 offset, Vector3 grapPos, 70 client.OnGrabUpdate += delegate(UUID objectID, Vector3 offset, Vector3 grapPos,
71 IClientAPI remoteClient) { this.Stale = true; }; 71 IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) { this.Stale = true; };
72 client.OnObjectAttach += delegate(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, 72 client.OnObjectAttach += delegate(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt,
73 Quaternion rot) { this.Stale = true; }; 73 Quaternion rot) { this.Stale = true; };
74 client.OnObjectDuplicate += delegate(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID, 74 client.OnObjectDuplicate += delegate(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID,
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 4840133..80d0151 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -1214,7 +1214,7 @@ namespace OpenSim.Region.Environment.Scenes
1214 /// <param name="offset"></param> 1214 /// <param name="offset"></param>
1215 /// <param name="pos"></param> 1215 /// <param name="pos"></param>
1216 /// <param name="remoteClient"></param> 1216 /// <param name="remoteClient"></param>
1217 protected internal void MoveObject(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient) 1217 protected internal void MoveObject(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
1218 { 1218 {
1219 SceneObjectGroup group = GetGroupByPrim(objectID); 1219 SceneObjectGroup group = GetGroupByPrim(objectID);
1220 if (group != null) 1220 if (group != null)