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.0.6.0-stable
parent
1edfbc652a
commit
5be7442736
|
@ -144,7 +144,7 @@ namespace OpenSim.Framework
|
||||||
public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery
|
public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery
|
||||||
);
|
);
|
||||||
|
|
||||||
public delegate void MoveObject(UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient);
|
public delegate void MoveObject(UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
|
||||||
|
|
||||||
public delegate void ParcelAccessListRequest(
|
public delegate void ParcelAccessListRequest(
|
||||||
UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
|
UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using OpenMetaverse;
|
||||||
|
|
||||||
|
namespace OpenSim.Framework
|
||||||
|
{
|
||||||
|
public class SurfaceTouchEventArgs
|
||||||
|
{
|
||||||
|
public Vector3 Binormal;
|
||||||
|
public int FaceIndex;
|
||||||
|
public Vector3 Normal;
|
||||||
|
public Vector3 Position;
|
||||||
|
public Vector3 STCoord;
|
||||||
|
public Vector3 UVCoord;
|
||||||
|
}
|
||||||
|
}
|
|
@ -4725,8 +4725,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (handlerGrabUpdate != null)
|
if (handlerGrabUpdate != null)
|
||||||
{
|
{
|
||||||
|
List<SurfaceTouchEventArgs> touchArgs = new List<SurfaceTouchEventArgs>();
|
||||||
|
if ((grabUpdate.SurfaceInfo != null) && (grabUpdate.SurfaceInfo.Length > 0))
|
||||||
|
{
|
||||||
|
foreach (ObjectGrabUpdatePacket.SurfaceInfoBlock surfaceInfo in grabUpdate.SurfaceInfo)
|
||||||
|
{
|
||||||
|
SurfaceTouchEventArgs arg = new SurfaceTouchEventArgs();
|
||||||
|
arg.Binormal = surfaceInfo.Binormal;
|
||||||
|
arg.FaceIndex = surfaceInfo.FaceIndex;
|
||||||
|
arg.Normal = surfaceInfo.Normal;
|
||||||
|
arg.Position = surfaceInfo.Position;
|
||||||
|
arg.STCoord = surfaceInfo.STCoord;
|
||||||
|
arg.UVCoord = surfaceInfo.UVCoord;
|
||||||
|
touchArgs.Add(arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
handlerGrabUpdate(grabUpdate.ObjectData.ObjectID, grabUpdate.ObjectData.GrabOffsetInitial,
|
handlerGrabUpdate(grabUpdate.ObjectData.ObjectID, grabUpdate.ObjectData.GrabOffsetInitial,
|
||||||
grabUpdate.ObjectData.GrabPosition, this);
|
grabUpdate.ObjectData.GrabPosition, this, touchArgs);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PacketType.ObjectDeGrab:
|
case PacketType.ObjectDeGrab:
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||||
{ this.Stale = true; };
|
{ this.Stale = true; };
|
||||||
client.OnDelinkObjects += delegate(List<uint> primIds) { this.Stale = true; };
|
client.OnDelinkObjects += delegate(List<uint> primIds) { this.Stale = true; };
|
||||||
client.OnGrabUpdate += delegate(UUID objectID, Vector3 offset, Vector3 grapPos,
|
client.OnGrabUpdate += delegate(UUID objectID, Vector3 offset, Vector3 grapPos,
|
||||||
IClientAPI remoteClient) { this.Stale = true; };
|
IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) { this.Stale = true; };
|
||||||
client.OnObjectAttach += delegate(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt,
|
client.OnObjectAttach += delegate(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt,
|
||||||
Quaternion rot) { this.Stale = true; };
|
Quaternion rot) { this.Stale = true; };
|
||||||
client.OnObjectDuplicate += delegate(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID,
|
client.OnObjectDuplicate += delegate(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID,
|
||||||
|
|
|
@ -1214,7 +1214,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="offset"></param>
|
/// <param name="offset"></param>
|
||||||
/// <param name="pos"></param>
|
/// <param name="pos"></param>
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
protected internal void MoveObject(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient)
|
protected internal void MoveObject(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
||||||
{
|
{
|
||||||
SceneObjectGroup group = GetGroupByPrim(objectID);
|
SceneObjectGroup group = GetGroupByPrim(objectID);
|
||||||
if (group != null)
|
if (group != null)
|
||||||
|
|
Loading…
Reference in New Issue