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.
This commit is contained in:
MW
2008-10-10 16:01:59 +00:00
parent 1edfbc652a
commit 5be7442736
5 changed files with 36 additions and 4 deletions

View File

@@ -4725,8 +4725,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
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,
grabUpdate.ObjectData.GrabPosition, this);
grabUpdate.ObjectData.GrabPosition, this, touchArgs);
}
break;
case PacketType.ObjectDeGrab: