示例#1
0
 /// <summary>
 /// Drags on an object
 /// </summary>
 /// <param name="objectID">LLUUID of the object to drag</param>
 /// <param name="grabPosition">Drag target in region coordinates</param>
 public void GrabUpdate(LLUUID objectID, LLVector3 grabPosition)
 {
     ObjectGrabUpdatePacket grab = new ObjectGrabUpdatePacket();
     grab.AgentData.AgentID = Client.Self.AgentID;
     grab.AgentData.SessionID = Client.Self.SessionID;
     grab.ObjectData.ObjectID = objectID;
     grab.ObjectData.GrabOffsetInitial = new LLVector3(0, 0, 0);
     grab.ObjectData.GrabPosition = grabPosition;
     grab.ObjectData.TimeSinceLast = 0;
     Client.Network.SendPacket(grab);
 }
示例#2
0
        /// <summary>
        /// Overload: Drag an object
        /// </summary>
        /// <param name="objectID"><seealso cref="UUID"/> of the object to drag</param>
        /// <param name="grabPosition">Drag target in region coordinates</param>
        /// <param name="grabOffset"></param>
        /// <param name="uvCoord">The texture coordinates to grab</param>
        /// <param name="stCoord">The surface coordinates to grab</param>
        /// <param name="faceIndex">The face of the position to grab</param>
        /// <param name="position">The region coordinates of the position to grab</param>
        /// <param name="normal">The surface normal of the position to grab (A normal is a vector perpindicular to the surface)</param>
        /// <param name="binormal">The surface binormal of the position to grab (A binormal is a vector tangen to the surface
        /// pointing along the U direction of the tangent space</param>
        public void GrabUpdate(UUID objectID, Vector3 grabPosition, Vector3 grabOffset, Vector3 uvCoord, Vector3 stCoord, int faceIndex, Vector3 position,
            Vector3 normal, Vector3 binormal)
        {
            ObjectGrabUpdatePacket grab = new ObjectGrabUpdatePacket();
            grab.AgentData.AgentID = Client.Self.AgentID;
            grab.AgentData.SessionID = Client.Self.SessionID;

            grab.ObjectData.ObjectID = objectID;
            grab.ObjectData.GrabOffsetInitial = grabOffset;
            grab.ObjectData.GrabPosition = grabPosition;
            grab.ObjectData.TimeSinceLast = 0;

            grab.SurfaceInfo = new ObjectGrabUpdatePacket.SurfaceInfoBlock[1];
            grab.SurfaceInfo[0] = new ObjectGrabUpdatePacket.SurfaceInfoBlock();
            grab.SurfaceInfo[0].UVCoord = uvCoord;
            grab.SurfaceInfo[0].STCoord = stCoord;
            grab.SurfaceInfo[0].FaceIndex = faceIndex;
            grab.SurfaceInfo[0].Position = position;
            grab.SurfaceInfo[0].Normal = normal;
            grab.SurfaceInfo[0].Binormal = binormal;

            Client.Network.SendPacket(grab);
        }
示例#3
0
 /// <summary>
 /// Drags an object
 /// </summary>
 /// <param name="objectID"><seealso cref="Guid"/> of the object to drag</param>
 /// <param name="grabPosition">Drag target in region coordinates</param>
 public void GrabUpdate(Guid objectID, Vector3f grabPosition)
 {
     ObjectGrabUpdatePacket grab = new ObjectGrabUpdatePacket();
     grab.AgentData.AgentID = Client.Self.AgentID;
     grab.AgentData.SessionID = Client.Self.SessionID;
     grab.ObjectData.ObjectID = objectID;
     grab.ObjectData.GrabOffsetInitial = Vector3f.Zero;
     grab.ObjectData.GrabPosition = grabPosition;
     grab.ObjectData.TimeSinceLast = 0;
     Client.Network.SendPacket(grab);
 }