From d95918f2288967de3937ec7aa648a5303eba4027 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 17 Jul 2007 17:47:23 +0000 Subject: * Changed SimpleApp to use EventManager and Scene timer * Refactored a lot of m_* and public -> wrappers --- OpenSim/Region/Environment/Scenes/Primitive.cs | 447 ++++++++++++++----------- 1 file changed, 244 insertions(+), 203 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Primitive.cs') diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs index b413758..5b6b13d 100644 --- a/OpenSim/Region/Environment/Scenes/Primitive.cs +++ b/OpenSim/Region/Environment/Scenes/Primitive.cs @@ -15,19 +15,15 @@ namespace OpenSim.Region.Environment.Scenes { private const uint FULL_MASK_PERMISSIONS = 2147483647; - private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); + private LLVector3 m_positionLastFrame = new LLVector3(0, 0, 0); private ulong m_regionHandle; - private byte updateFlag = 0; + private byte m_updateFlag; private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128; - private Dictionary inventoryItems; + private Dictionary m_inventoryItems; private string m_description = ""; - public string SitName = ""; - public string TouchName = ""; - public string Text = ""; - public LLUUID CreatorID; public LLUUID OwnerID; public LLUUID LastOwnerID; @@ -52,22 +48,23 @@ namespace OpenSim.Region.Environment.Scenes public event PrimCountTaintedDelegate OnPrimCountTainted; #region Properties + /// /// If rootprim, will return world position /// otherwise will return local offset from rootprim /// - public override LLVector3 Pos + public override LLVector3 Pos { get { if (m_isRootPrim) { //if we are rootprim then our offset should be zero - return this.m_pos + m_Parent.Pos; + return m_pos + m_Parent.Pos; } else { - return this.m_pos; + return m_pos; } } set @@ -76,63 +73,72 @@ namespace OpenSim.Region.Environment.Scenes { m_Parent.Pos = value; } - this.m_pos = value - m_Parent.Pos; + m_pos = value - m_Parent.Pos; } - } public PrimitiveBaseShape Shape { - get - { - return this.m_Shape; - } + get { return m_Shape; } } public LLVector3 WorldPos { get { - if (!this.m_isRootPrim) + if (!m_isRootPrim) { - Primitive parentPrim = (Primitive)this.m_Parent; - Axiom.Math.Vector3 offsetPos = new Vector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z); + Primitive parentPrim = (Primitive)m_Parent; + Vector3 offsetPos = new Vector3(m_pos.X, m_pos.Y, m_pos.Z); offsetPos = parentPrim.Rotation * offsetPos; return parentPrim.WorldPos + new LLVector3(offsetPos.x, offsetPos.y, offsetPos.z); } else { - return this.Pos; + return Pos; } } } public string Description { - get - { - return this.m_description; - } - set - { - this.m_description = value; - } + get { return m_description; } + set { m_description = value; } } public LLVector3 Scale { + set { m_Shape.Scale = value; } + get { return m_Shape.Scale; } + } + + private string m_sitName = ""; + public string SitName + { + get { return m_sitName; } + } + + private string m_touchName = ""; + public string TouchName + { + get { return m_touchName; } + } + + private string m_text = ""; + public string Text + { + get { return m_text; } set { - this.m_Shape.Scale = value; - } - get - { - return this.m_Shape.Scale; + m_text = value; + ScheduleFullUpdate(); } } + #endregion #region Constructors + /// /// /// @@ -144,21 +150,23 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// - public Primitive(ulong regionHandle, Scene world, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, SceneObject rootObject, PrimitiveBaseShape shape, LLVector3 pos) + public Primitive(ulong regionHandle, Scene world, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, + SceneObject rootObject, PrimitiveBaseShape shape, LLVector3 pos) { - m_regionHandle = regionHandle; m_world = world; - inventoryItems = new Dictionary(); - this.m_Parent = parent; - this.m_isRootPrim = isRoot; - this.m_RootParent = rootObject; - this.CreateFromShape(ownerID, localID, pos, shape); - this.Rotation = Axiom.Math.Quaternion.Identity; + m_inventoryItems = new Dictionary(); + m_Parent = parent; + m_isRootPrim = isRoot; + m_RootParent = rootObject; + ClearUpdateSchedule(); + CreateFromShape(ownerID, localID, pos, shape); + + Rotation = Quaternion.Identity; m_world.AcknowledgeNewPrim(this); - this.OnPrimCountTainted(); + OnPrimCountTainted(); } /// @@ -167,7 +175,6 @@ namespace OpenSim.Region.Environment.Scenes /// Empty constructor for duplication public Primitive() { - } #endregion @@ -176,33 +183,34 @@ namespace OpenSim.Region.Environment.Scenes ~Primitive() { - this.OnPrimCountTainted(); + OnPrimCountTainted(); } + #endregion #region Duplication public Primitive Copy(EntityBase parent, SceneObject rootParent) { - Primitive dupe = (Primitive)this.MemberwiseClone(); - + Primitive dupe = (Primitive)MemberwiseClone(); + dupe.m_Parent = parent; dupe.m_RootParent = rootParent; // TODO: Copy this properly. - dupe.inventoryItems = this.inventoryItems; - dupe.children = new List(); - dupe.m_Shape = this.m_Shape.Copy(); - dupe.m_regionHandle = this.m_regionHandle; - dupe.m_world = this.m_world; - - uint newLocalID = this.m_world.PrimIDAllocate(); - dupe.uuid = LLUUID.Random(); + dupe.m_inventoryItems = m_inventoryItems; + dupe.m_children = new List(); + dupe.m_Shape = m_Shape.Copy(); + dupe.m_regionHandle = m_regionHandle; + dupe.m_world = m_world; + + uint newLocalID = m_world.PrimIDAllocate(); + dupe.m_uuid = LLUUID.Random(); dupe.LocalId = newLocalID; if (parent is SceneObject) { - dupe.m_isRootPrim = true; + dupe.m_isRootPrim = true; dupe.ParentID = 0; } else @@ -211,18 +219,18 @@ namespace OpenSim.Region.Environment.Scenes dupe.ParentID = ((Primitive)parent).LocalId; } - dupe.Scale = new LLVector3(this.Scale.X, this.Scale.Y, this.Scale.Z); - dupe.Rotation = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); - dupe.m_pos = new LLVector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z); - + dupe.Scale = new LLVector3(Scale.X, Scale.Y, Scale.Z); + dupe.Rotation = new Quaternion(Rotation.w, Rotation.x, Rotation.y, Rotation.z); + dupe.m_pos = new LLVector3(m_pos.X, m_pos.Y, m_pos.Z); + rootParent.AddChildToList(dupe); - this.m_world.AcknowledgeNewPrim(dupe); + m_world.AcknowledgeNewPrim(dupe); dupe.TriggerOnPrimCountTainted(); - - foreach (Primitive prim in this.children) + + foreach (Primitive prim in m_children) { Primitive primClone = prim.Copy(dupe, rootParent); - dupe.children.Add(primClone); + dupe.m_children.Add(primClone); } return dupe; @@ -231,30 +239,41 @@ namespace OpenSim.Region.Environment.Scenes #endregion #region Override from EntityBase + /// /// /// - public override void update() + public override void Update() { - if (this.updateFlag == 1) // is a new prim just been created/reloaded or has major changes + if (m_updateFlag == 1) //some change has been made so update the clients { - this.SendFullUpdateToAllClients(); - this.updateFlag = 0; + SendTerseUpdateToALLClients(); + ClearUpdateSchedule(); } - if (this.updateFlag == 2) //some change has been made so update the clients + else { - this.SendTerseUpdateToALLClients(); - this.updateFlag = 0; + if (m_updateFlag == 2) // is a new prim just been created/reloaded or has major changes + { + SendFullUpdateToAllClients(); + ClearUpdateSchedule(); + } } - foreach (EntityBase child in children) + foreach (EntityBase child in m_children) { - child.update(); + child.Update(); } } + + private void ClearUpdateSchedule() + { + m_updateFlag = 0; + } + #endregion #region Setup + /// /// /// @@ -263,21 +282,36 @@ namespace OpenSim.Region.Environment.Scenes /// public void CreateFromShape(LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) { - this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; - this.OwnerID = ownerID; - this.CreatorID = this.OwnerID; - this.LastOwnerID = LLUUID.Zero; - this.Pos = pos; - this.uuid = LLUUID.Random(); - this.m_localId = (uint)(localID); + CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; + OwnerID = ownerID; + CreatorID = OwnerID; + LastOwnerID = LLUUID.Zero; + Pos = pos; + m_uuid = LLUUID.Random(); + m_localId = (uint)(localID); + + m_Shape = shape; + + ScheduleFullUpdate(); + } + + private void ScheduleFullUpdate() + { + m_updateFlag = 2; + } - this.m_Shape = shape; - this.updateFlag = 1; + private void ScheduleTerseUpdate() + { + if (m_updateFlag < 1) + { + m_updateFlag = 1; + } } #endregion #region Linking / unlinking + /// /// /// @@ -286,13 +320,13 @@ namespace OpenSim.Region.Environment.Scenes { // Console.WriteLine("linking new prims " + linkObject.rootLocalID + " to me (" + this.LocalId + ")"); //TODO check permissions - this.children.Add(linkObject.rootPrimitive); - linkObject.rootPrimitive.SetNewParent(this, this.m_RootParent); + m_children.Add(linkObject.rootPrimitive); + linkObject.rootPrimitive.SetNewParent(this, m_RootParent); - this.m_world.DeleteEntity(linkObject.rootUUID); + m_world.DeleteEntity(linkObject.rootUUID); linkObject.DeleteAllChildren(); - this.OnPrimCountTainted(); + OnPrimCountTainted(); } /// @@ -302,59 +336,58 @@ namespace OpenSim.Region.Environment.Scenes /// public void SetNewParent(Primitive newParent, SceneObject rootParent) { - LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); - this.m_isRootPrim = false; - this.m_Parent = newParent; - this.ParentID = newParent.LocalId; - this.m_RootParent = rootParent; - this.m_RootParent.AddChildToList(this); - this.Pos = oldPos; - Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); - axPos = this.m_Parent.Rotation.Inverse() * axPos; - this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); - Axiom.Math.Quaternion oldRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); - this.Rotation = this.m_Parent.Rotation.Inverse() * this.Rotation; - this.updateFlag = 1; - - foreach (Primitive child in children) + LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); + m_isRootPrim = false; + m_Parent = newParent; + ParentID = newParent.LocalId; + m_RootParent = rootParent; + m_RootParent.AddChildToList(this); + Pos = oldPos; + Vector3 axPos = new Vector3(m_pos.X, m_pos.Y, m_pos.Z); + axPos = m_Parent.Rotation.Inverse() * axPos; + m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); + Quaternion oldRot = new Quaternion(Rotation.w, Rotation.x, Rotation.y, Rotation.z); + Rotation = m_Parent.Rotation.Inverse() * Rotation; + ScheduleFullUpdate(); + + foreach (Primitive child in m_children) { child.SetRootParent(rootParent, newParent, oldPos, oldRot); } - children.Clear(); - - + m_children.Clear(); } /// /// /// /// - public void SetRootParent(SceneObject newRoot , Primitive newParent, LLVector3 oldParentPosition, Axiom.Math.Quaternion oldParentRotation) + public void SetRootParent(SceneObject newRoot, Primitive newParent, LLVector3 oldParentPosition, + Quaternion oldParentRotation) { - LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); - Axiom.Math.Vector3 axOldPos = new Vector3(oldPos.X, oldPos.Y, oldPos.Z); + LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); + Vector3 axOldPos = new Vector3(oldPos.X, oldPos.Y, oldPos.Z); axOldPos = oldParentRotation * axOldPos; oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z); oldPos += oldParentPosition; - Axiom.Math.Quaternion oldRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); - this.m_isRootPrim = false; - this.m_Parent = newParent; - this.ParentID = newParent.LocalId; + Quaternion oldRot = new Quaternion(Rotation.w, Rotation.x, Rotation.y, Rotation.z); + m_isRootPrim = false; + m_Parent = newParent; + ParentID = newParent.LocalId; newParent.AddToChildrenList(this); - this.m_RootParent = newRoot; - this.m_RootParent.AddChildToList(this); - this.Pos = oldPos; - Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); - axPos = this.m_Parent.Rotation.Inverse() * axPos; - this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); - this.Rotation = oldParentRotation * this.Rotation; - this.Rotation = this.m_Parent.Rotation.Inverse()* this.Rotation ; - this.updateFlag = 1; - foreach (Primitive child in children) + m_RootParent = newRoot; + m_RootParent.AddChildToList(this); + Pos = oldPos; + Vector3 axPos = new Vector3(m_pos.X, m_pos.Y, m_pos.Z); + axPos = m_Parent.Rotation.Inverse() * axPos; + m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); + Rotation = oldParentRotation * Rotation; + Rotation = m_Parent.Rotation.Inverse() * Rotation; + ScheduleFullUpdate(); + foreach (Primitive child in m_children) { child.SetRootParent(newRoot, newParent, oldPos, oldRot); } - children.Clear(); + m_children.Clear(); } /// @@ -363,12 +396,12 @@ namespace OpenSim.Region.Environment.Scenes /// public void AddOffsetToChildren(LLVector3 offset) { - foreach (Primitive prim in this.children) + foreach (Primitive prim in m_children) { prim.m_pos += offset; - prim.updateFlag = 2; + prim.ScheduleTerseUpdate(); } - this.OnPrimCountTainted(); + OnPrimCountTainted(); } /// @@ -377,38 +410,42 @@ namespace OpenSim.Region.Environment.Scenes /// public void AddToChildrenList(Primitive prim) { - this.children.Add(prim); + m_children.Add(prim); } + #endregion #region Resizing/Scale + /// /// /// /// public void ResizeGoup(LLVector3 scale) { - LLVector3 offset = (scale - this.m_Shape.Scale); + LLVector3 offset = (scale - m_Shape.Scale); offset.X /= 2; offset.Y /= 2; offset.Z /= 2; - if (this.m_isRootPrim) + if (m_isRootPrim) { - this.m_Parent.Pos += offset; + m_Parent.Pos += offset; } else { - this.m_pos += offset; + m_pos += offset; } - this.AddOffsetToChildren(new LLVector3(-offset.X, -offset.Y, -offset.Z)); - this.m_Shape.Scale = scale; + AddOffsetToChildren(new LLVector3(-offset.X, -offset.Y, -offset.Z)); + m_Shape.Scale = scale; - this.updateFlag = 1; + ScheduleFullUpdate(); } + #endregion #region Position + /// /// /// @@ -417,10 +454,10 @@ namespace OpenSim.Region.Environment.Scenes { LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); - this.Pos = newPos; - this.updateFlag = 2; + Pos = newPos; + ScheduleTerseUpdate(); - this.OnPrimCountTainted(); + OnPrimCountTainted(); } /// @@ -429,48 +466,46 @@ namespace OpenSim.Region.Environment.Scenes /// public void UpdateSinglePosition(LLVector3 pos) { - // Console.WriteLine("updating single prim position"); - if (this.m_isRootPrim) + // Console.WriteLine("updating single prim position"); + if (m_isRootPrim) { LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); LLVector3 diff = oldPos - newPos; - Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z); - axDiff = this.Rotation.Inverse() * axDiff; + Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z); + axDiff = Rotation.Inverse() * axDiff; diff.X = axDiff.x; diff.Y = axDiff.y; diff.Z = axDiff.z; - this.Pos = newPos; + Pos = newPos; - foreach (Primitive prim in this.children) + foreach (Primitive prim in m_children) { prim.m_pos += diff; - prim.updateFlag = 2; + prim.ScheduleTerseUpdate(); } - this.updateFlag = 2; + ScheduleTerseUpdate(); } else { LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); - this.m_pos = newPos; - this.updateFlag = 2; + m_pos = newPos; + ScheduleTerseUpdate(); } - - } #endregion #region Rotation + /// /// /// /// public void UpdateGroupRotation(LLQuaternion rot) { - this.Rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); - this.updateFlag = 2; - + Rotation = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); + ScheduleTerseUpdate(); } /// @@ -480,9 +515,9 @@ namespace OpenSim.Region.Environment.Scenes /// public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot) { - this.Rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); - this.Pos = pos; - this.updateFlag = 2; + Rotation = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); + Pos = pos; + ScheduleTerseUpdate(); } /// @@ -492,62 +527,67 @@ namespace OpenSim.Region.Environment.Scenes public void UpdateSingleRotation(LLQuaternion rot) { //Console.WriteLine("updating single prim rotation"); - Axiom.Math.Quaternion axRot = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); - Axiom.Math.Quaternion oldParentRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); - this.Rotation = axRot; - foreach (Primitive prim in this.children) + Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); + Quaternion oldParentRot = new Quaternion(Rotation.w, Rotation.x, Rotation.y, Rotation.z); + Rotation = axRot; + foreach (Primitive prim in m_children) { - Axiom.Math.Vector3 axPos = new Vector3(prim.m_pos.X, prim.m_pos.Y, prim.m_pos.Z); + Vector3 axPos = new Vector3(prim.m_pos.X, prim.m_pos.Y, prim.m_pos.Z); axPos = oldParentRot * axPos; axPos = axRot.Inverse() * axPos; prim.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); - prim.Rotation = oldParentRot * prim.Rotation ; - prim.Rotation = axRot.Inverse()* prim.Rotation; - prim.updateFlag = 2; + prim.Rotation = oldParentRot * prim.Rotation; + prim.Rotation = axRot.Inverse() * prim.Rotation; + prim.ScheduleTerseUpdate(); } - this.updateFlag = 2; + ScheduleTerseUpdate(); } + #endregion #region Shape + /// /// /// /// public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock) { - this.m_Shape.PathBegin = shapeBlock.PathBegin; - this.m_Shape.PathEnd = shapeBlock.PathEnd; - this.m_Shape.PathScaleX = shapeBlock.PathScaleX; - this.m_Shape.PathScaleY = shapeBlock.PathScaleY; - this.m_Shape.PathShearX = shapeBlock.PathShearX; - this.m_Shape.PathShearY = shapeBlock.PathShearY; - this.m_Shape.PathSkew = shapeBlock.PathSkew; - this.m_Shape.ProfileBegin = shapeBlock.ProfileBegin; - this.m_Shape.ProfileEnd = shapeBlock.ProfileEnd; - this.m_Shape.PathCurve = shapeBlock.PathCurve; - this.m_Shape.ProfileCurve = shapeBlock.ProfileCurve; - this.m_Shape.ProfileHollow = shapeBlock.ProfileHollow; - this.m_Shape.PathRadiusOffset = shapeBlock.PathRadiusOffset; - this.m_Shape.PathRevolutions = shapeBlock.PathRevolutions; - this.m_Shape.PathTaperX = shapeBlock.PathTaperX; - this.m_Shape.PathTaperY = shapeBlock.PathTaperY; - this.m_Shape.PathTwist = shapeBlock.PathTwist; - this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin; - this.updateFlag = 1; + m_Shape.PathBegin = shapeBlock.PathBegin; + m_Shape.PathEnd = shapeBlock.PathEnd; + m_Shape.PathScaleX = shapeBlock.PathScaleX; + m_Shape.PathScaleY = shapeBlock.PathScaleY; + m_Shape.PathShearX = shapeBlock.PathShearX; + m_Shape.PathShearY = shapeBlock.PathShearY; + m_Shape.PathSkew = shapeBlock.PathSkew; + m_Shape.ProfileBegin = shapeBlock.ProfileBegin; + m_Shape.ProfileEnd = shapeBlock.ProfileEnd; + m_Shape.PathCurve = shapeBlock.PathCurve; + m_Shape.ProfileCurve = shapeBlock.ProfileCurve; + m_Shape.ProfileHollow = shapeBlock.ProfileHollow; + m_Shape.PathRadiusOffset = shapeBlock.PathRadiusOffset; + m_Shape.PathRevolutions = shapeBlock.PathRevolutions; + m_Shape.PathTaperX = shapeBlock.PathTaperX; + m_Shape.PathTaperY = shapeBlock.PathTaperY; + m_Shape.PathTwist = shapeBlock.PathTwist; + m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin; + ScheduleFullUpdate(); } + #endregion #region Texture + /// /// /// /// public void UpdateTextureEntry(byte[] textureEntry) { - this.m_Shape.TextureEntry = textureEntry; - this.updateFlag = 1; + m_Shape.TextureEntry = textureEntry; + ScheduleFullUpdate(); } + #endregion #region Client Update Methods @@ -558,12 +598,12 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendFullUpdateForAllChildren(IClientAPI remoteClient) { - this.SendFullUpdateToClient(remoteClient); - for (int i = 0; i < this.children.Count; i++) + SendFullUpdateToClient(remoteClient); + for (int i = 0; i < m_children.Count; i++) { - if (this.children[i] is Primitive) + if (m_children[i] is Primitive) { - ((Primitive)this.children[i]).SendFullUpdateForAllChildren(remoteClient); + ((Primitive)m_children[i]).SendFullUpdateForAllChildren(remoteClient); } } } @@ -575,11 +615,12 @@ namespace OpenSim.Region.Environment.Scenes public void SendFullUpdateToClient(IClientAPI remoteClient) { LLVector3 lPos; - lPos = this.Pos; + lPos = Pos; LLQuaternion lRot; - lRot = new LLQuaternion(this.Rotation.x, this.Rotation.y, this.Rotation.z, this.Rotation.w); + lRot = new LLQuaternion(Rotation.x, Rotation.y, Rotation.z, Rotation.w); - remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.m_Shape, lPos, lRot, this.m_flags, this.uuid, this.OwnerID, this.Text, this.ParentID); + remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalId, m_Shape, lPos, lRot, m_flags, m_uuid, + OwnerID, m_text, ParentID); } /// @@ -587,10 +628,10 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendFullUpdateToAllClients() { - List avatars = this.m_world.RequestAvatarList(); + List avatars = m_world.RequestAvatarList(); for (int i = 0; i < avatars.Count; i++) { - this.SendFullUpdateToClient(avatars[i].ControllingClient); + SendFullUpdateToClient(avatars[i].ControllingClient); } } @@ -600,12 +641,12 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendTerseUpdateForAllChildren(IClientAPI remoteClient) { - this.SendTerseUpdateToClient(remoteClient); - for (int i = 0; i < this.children.Count; i++) + SendTerseUpdateToClient(remoteClient); + for (int i = 0; i < m_children.Count; i++) { - if (this.children[i] is Primitive) + if (m_children[i] is Primitive) { - ((Primitive)this.children[i]).SendTerseUpdateForAllChildren(remoteClient); + ((Primitive)m_children[i]).SendTerseUpdateForAllChildren(remoteClient); } } } @@ -619,11 +660,11 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 lPos; Quaternion lRot; - lPos = this.Pos; - lRot = this.Rotation; + lPos = Pos; + lRot = Rotation; LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w); - RemoteClient.SendPrimTerseUpdate(this.m_regionHandle, 64096, this.LocalId, lPos, mRot); + RemoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalId, lPos, mRot); } /// @@ -631,10 +672,10 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendTerseUpdateToALLClients() { - List avatars = this.m_world.RequestAvatarList(); + List avatars = m_world.RequestAvatarList(); for (int i = 0; i < avatars.Count; i++) { - this.SendTerseUpdateToClient(avatars[i].ControllingClient); + SendTerseUpdateToClient(avatars[i].ControllingClient); } } @@ -642,7 +683,7 @@ namespace OpenSim.Region.Environment.Scenes public void TriggerOnPrimCountTainted() { - this.OnPrimCountTainted(); + OnPrimCountTainted(); } } -} +} \ No newline at end of file -- cgit v1.1