From 643a02ec60151e1a501d1b260592695b90be6233 Mon Sep 17 00:00:00 2001
From: MW
Date: Wed, 18 Jul 2007 18:12:16 +0000
Subject: More testing some ideas, to find best method for SceneObject
Primitive classes.
---
OpenSim/Region/ClientStack/ClientView.API.cs | 101 +--------------------------
1 file changed, 1 insertion(+), 100 deletions(-)
(limited to 'OpenSim/Region/ClientStack/ClientView.API.cs')
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 044ad68..54ddd97 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -719,56 +719,7 @@ namespace OpenSim.Region.ClientStack
this.OutPacket(attach);
}
- ///
- /// Sends a full ObjectUpdatePacket to a client to inform it of a new primitive
- /// or big changes to a existing primitive.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags)
- {
- ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
- outPacket.RegionData.RegionHandle = regionHandle;
- outPacket.RegionData.TimeDilation = timeDilation;
- outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
- outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID, flags);
- outPacket.ObjectData[0].ID = localID;
- outPacket.ObjectData[0].FullID = primData.FullID;
- byte[] pb = pos.GetBytes();
- Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
- byte[] rot = rotation.GetBytes();
- Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 48, rot.Length);
- OutPacket(outPacket);
- }
-
- ///
- /// Sends a full ObjectUpdatePacket to a client to inform it of a new primitive
- /// or big changes to a existing primitive.
- /// Uses default rotation
- ///
- ///
- ///
- public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags)
- {
- ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
- outPacket.RegionData.RegionHandle = regionHandle;
- outPacket.RegionData.TimeDilation = timeDilation;
- outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
- outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID, flags);
- outPacket.ObjectData[0].ID = localID;
- outPacket.ObjectData[0].FullID = primData.FullID;
- byte[] pb = pos.GetBytes();
- Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
-
- OutPacket(outPacket);
- }
-
-
+
public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID)
{
ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
@@ -978,22 +929,6 @@ namespace OpenSim.Region.ClientStack
return dat;
}
-
- ///
- /// Create the ObjectDataBlock for a ObjectUpdatePacket (for a Primitive)
- ///
- ///
- ///
- protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimData primData, LLUUID textureID, uint flags)
- {
- ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock();
- this.SetDefaultPrimPacketValues(objupdate);
- objupdate.UpdateFlags = flags;
- this.SetPrimPacketShapeData(objupdate, primData, textureID);
-
- return objupdate;
- }
-
///
/// Create the ObjectDataBlock for a ObjectUpdatePacket (for a Primitive)
///
@@ -1009,40 +944,6 @@ namespace OpenSim.Region.ClientStack
return objupdate;
}
-
- ///
- /// Copy the data from a PrimData object to a ObjectUpdatePacket
- ///
- ///
- ///
- protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimData primData, LLUUID textureID)
- {
- LLObject.TextureEntry ntex = new LLObject.TextureEntry(textureID);
- objectData.TextureEntry = ntex.ToBytes();
- objectData.OwnerID = primData.OwnerID;
- objectData.ParentID = primData.ParentID;
- objectData.PCode = primData.PCode;
- objectData.PathBegin = primData.PathBegin;
- objectData.PathEnd = primData.PathEnd;
- objectData.PathScaleX = primData.PathScaleX;
- objectData.PathScaleY = primData.PathScaleY;
- objectData.PathShearX = primData.PathShearX;
- objectData.PathShearY = primData.PathShearY;
- objectData.PathSkew = primData.PathSkew;
- objectData.ProfileBegin = primData.ProfileBegin;
- objectData.ProfileEnd = primData.ProfileEnd;
- objectData.Scale = primData.Scale;
- objectData.PathCurve = primData.PathCurve;
- objectData.ProfileCurve = primData.ProfileCurve;
- objectData.ProfileHollow = primData.ProfileHollow;
- objectData.PathRadiusOffset = primData.PathRadiusOffset;
- objectData.PathRevolutions = primData.PathRevolutions;
- objectData.PathTaperX = primData.PathTaperX;
- objectData.PathTaperY = primData.PathTaperY;
- objectData.PathTwist = primData.PathTwist;
- objectData.PathTwistBegin = primData.PathTwistBegin;
- }
-
protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimitiveBaseShape primData)
{
--
cgit v1.1