aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Primitive(Old).cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Primitive(Old).cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Primitive(Old).cs32
1 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Primitive(Old).cs b/OpenSim/Region/Environment/Scenes/Primitive(Old).cs
index 64976a8..2f51ab3 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive(Old).cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive(Old).cs
@@ -57,14 +57,14 @@ namespace OpenSim.Region.Environment.Scenes
57 /// If rootprim, will return world position 57 /// If rootprim, will return world position
58 /// otherwise will return local offset from rootprim 58 /// otherwise will return local offset from rootprim
59 /// </summary> 59 /// </summary>
60 public override LLVector3 Pos 60 public override LLVector3 AbsolutePosition
61 { 61 {
62 get 62 get
63 { 63 {
64 if (m_isRootPrim) 64 if (m_isRootPrim)
65 { 65 {
66 //if we are rootprim then our offset should be zero 66 //if we are rootprim then our offset should be zero
67 return m_pos + m_Parent.Pos; 67 return m_pos + m_Parent.AbsolutePosition;
68 } 68 }
69 else 69 else
70 { 70 {
@@ -75,9 +75,9 @@ namespace OpenSim.Region.Environment.Scenes
75 { 75 {
76 if (m_isRootPrim) 76 if (m_isRootPrim)
77 { 77 {
78 m_Parent.Pos = value; 78 m_Parent.AbsolutePosition = value;
79 } 79 }
80 m_pos = value - m_Parent.Pos; 80 m_pos = value - m_Parent.AbsolutePosition;
81 } 81 }
82 } 82 }
83 83
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Scenes
99 } 99 }
100 else 100 else
101 { 101 {
102 return Pos; 102 return AbsolutePosition;
103 } 103 }
104 } 104 }
105 } 105 }
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Scenes
284 OwnerID = ownerID; 284 OwnerID = ownerID;
285 CreatorID = OwnerID; 285 CreatorID = OwnerID;
286 LastOwnerID = LLUUID.Zero; 286 LastOwnerID = LLUUID.Zero;
287 Pos = pos; 287 AbsolutePosition = pos;
288 m_uuid = LLUUID.Random(); 288 m_uuid = LLUUID.Random();
289 m_localId = (uint)(localID); 289 m_localId = (uint)(localID);
290 290
@@ -335,13 +335,13 @@ namespace OpenSim.Region.Environment.Scenes
335 /// <param name="rootParent"></param> 335 /// <param name="rootParent"></param>
336 public void SetNewParent(Primitive newParent, SceneObjectOLD rootParent) 336 public void SetNewParent(Primitive newParent, SceneObjectOLD rootParent)
337 { 337 {
338 LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); 338 LLVector3 oldPos = new LLVector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z);
339 m_isRootPrim = false; 339 m_isRootPrim = false;
340 m_Parent = newParent; 340 m_Parent = newParent;
341 ParentID = newParent.LocalId; 341 ParentID = newParent.LocalId;
342 m_RootParent = rootParent; 342 m_RootParent = rootParent;
343 m_RootParent.AddChildToList(this); 343 m_RootParent.AddChildToList(this);
344 Pos = oldPos; 344 AbsolutePosition = oldPos;
345 Vector3 axPos = new Vector3(m_pos.X, m_pos.Y, m_pos.Z); 345 Vector3 axPos = new Vector3(m_pos.X, m_pos.Y, m_pos.Z);
346 axPos = m_Parent.Rotation.Inverse() * axPos; 346 axPos = m_Parent.Rotation.Inverse() * axPos;
347 m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); 347 m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
@@ -366,7 +366,7 @@ namespace OpenSim.Region.Environment.Scenes
366 public void SetRootParent(SceneObjectOLD newRoot, Primitive newParent, LLVector3 oldParentPosition, 366 public void SetRootParent(SceneObjectOLD newRoot, Primitive newParent, LLVector3 oldParentPosition,
367 Quaternion oldParentRotation) 367 Quaternion oldParentRotation)
368 { 368 {
369 LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); 369 LLVector3 oldPos = new LLVector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z);
370 Vector3 axOldPos = new Vector3(oldPos.X, oldPos.Y, oldPos.Z); 370 Vector3 axOldPos = new Vector3(oldPos.X, oldPos.Y, oldPos.Z);
371 axOldPos = oldParentRotation * axOldPos; 371 axOldPos = oldParentRotation * axOldPos;
372 oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z); 372 oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z);
@@ -379,7 +379,7 @@ namespace OpenSim.Region.Environment.Scenes
379 379
380 m_RootParent = newRoot; 380 m_RootParent = newRoot;
381 m_RootParent.AddChildToList(this); 381 m_RootParent.AddChildToList(this);
382 Pos = oldPos; 382 AbsolutePosition = oldPos;
383 Vector3 axPos = new Vector3(m_pos.X, m_pos.Y, m_pos.Z); 383 Vector3 axPos = new Vector3(m_pos.X, m_pos.Y, m_pos.Z);
384 axPos = m_Parent.Rotation.Inverse() * axPos; 384 axPos = m_Parent.Rotation.Inverse() * axPos;
385 m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); 385 m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
@@ -445,7 +445,7 @@ namespace OpenSim.Region.Environment.Scenes
445 { 445 {
446 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 446 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
447 447
448 Pos = newPos; 448 AbsolutePosition = newPos;
449 ScheduleTerseUpdate(); 449 ScheduleTerseUpdate();
450 450
451 OnPrimCountTainted(); 451 OnPrimCountTainted();
@@ -461,14 +461,14 @@ namespace OpenSim.Region.Environment.Scenes
461 if (m_isRootPrim) 461 if (m_isRootPrim)
462 { 462 {
463 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 463 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
464 LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); 464 LLVector3 oldPos = new LLVector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z);
465 LLVector3 diff = oldPos - newPos; 465 LLVector3 diff = oldPos - newPos;
466 Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z); 466 Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z);
467 axDiff = Rotation.Inverse() * axDiff; 467 axDiff = Rotation.Inverse() * axDiff;
468 diff.X = axDiff.x; 468 diff.X = axDiff.x;
469 diff.Y = axDiff.y; 469 diff.Y = axDiff.y;
470 diff.Z = axDiff.z; 470 diff.Z = axDiff.z;
471 Pos = newPos; 471 AbsolutePosition = newPos;
472 472
473 foreach (Primitive prim in m_children) 473 foreach (Primitive prim in m_children)
474 { 474 {
@@ -507,7 +507,7 @@ namespace OpenSim.Region.Environment.Scenes
507 public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot) 507 public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot)
508 { 508 {
509 Rotation = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); 509 Rotation = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
510 Pos = pos; 510 AbsolutePosition = pos;
511 ScheduleTerseUpdate(); 511 ScheduleTerseUpdate();
512 } 512 }
513 513
@@ -644,7 +644,7 @@ namespace OpenSim.Region.Environment.Scenes
644 public void SendFullUpdateToClient(IClientAPI remoteClient) 644 public void SendFullUpdateToClient(IClientAPI remoteClient)
645 { 645 {
646 LLVector3 lPos; 646 LLVector3 lPos;
647 lPos = Pos; 647 lPos = AbsolutePosition;
648 LLQuaternion lRot; 648 LLQuaternion lRot;
649 lRot = new LLQuaternion(Rotation.x, Rotation.y, Rotation.z, Rotation.w); 649 lRot = new LLQuaternion(Rotation.x, Rotation.y, Rotation.z, Rotation.w);
650 650
@@ -690,7 +690,7 @@ namespace OpenSim.Region.Environment.Scenes
690 LLVector3 lPos; 690 LLVector3 lPos;
691 Quaternion lRot; 691 Quaternion lRot;
692 692
693 lPos = Pos; 693 lPos = AbsolutePosition;
694 lRot = Rotation; 694 lRot = Rotation;
695 695
696 LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w); 696 LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w);