aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Primitive.cs
diff options
context:
space:
mode:
authorMW2007-07-10 17:56:31 +0000
committerMW2007-07-10 17:56:31 +0000
commit7f03246653a6f277505d2055528cbb8dd2e1f4c1 (patch)
tree357f60cec23bdf29f1037e488fb7f167dc1cd31c /OpenSim/Region/Environment/Scenes/Primitive.cs
parent* LLSDStreamhandler now works. (diff)
downloadopensim-SC-7f03246653a6f277505d2055528cbb8dd2e1f4c1.zip
opensim-SC-7f03246653a6f277505d2055528cbb8dd2e1f4c1.tar.gz
opensim-SC-7f03246653a6f277505d2055528cbb8dd2e1f4c1.tar.bz2
opensim-SC-7f03246653a6f277505d2055528cbb8dd2e1f4c1.tar.xz
Gird mode in sugilite should now work in so far as you should be able to login and move between regions in the same instance. Moving to regions in a different instance of opensim still needs implementing (working on it now).
Also trying to look at the map in grid mode will crash the server.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Primitive.cs38
1 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs
index 05bb1f9..d23a569 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Environment.Scenes
83 { 83 {
84 Primitive parentPrim = (Primitive)this.m_Parent; 84 Primitive parentPrim = (Primitive)this.m_Parent;
85 Axiom.Math.Vector3 offsetPos = new Vector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z); 85 Axiom.Math.Vector3 offsetPos = new Vector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z);
86 offsetPos = parentPrim.rotation * offsetPos; 86 offsetPos = parentPrim.Rotation * offsetPos;
87 return parentPrim.WorldPos + new LLVector3(offsetPos.x, offsetPos.y, offsetPos.z); 87 return parentPrim.WorldPos + new LLVector3(offsetPos.x, offsetPos.y, offsetPos.z);
88 } 88 }
89 else 89 else
@@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Scenes
139 this.m_isRootPrim = isRoot; 139 this.m_isRootPrim = isRoot;
140 this.m_RootParent = rootObject; 140 this.m_RootParent = rootObject;
141 this.CreateFromPacket(addPacket, ownerID, localID); 141 this.CreateFromPacket(addPacket, ownerID, localID);
142 this.rotation = Axiom.Math.Quaternion.Identity; 142 this.Rotation = Axiom.Math.Quaternion.Identity;
143 } 143 }
144 144
145 /// <summary> 145 /// <summary>
@@ -169,7 +169,7 @@ namespace OpenSim.Region.Environment.Scenes
169 dupe.LocalId = newLocalID; 169 dupe.LocalId = newLocalID;
170 170
171 dupe.Scale = new LLVector3(this.Scale.X, this.Scale.Y, this.Scale.Z); 171 dupe.Scale = new LLVector3(this.Scale.X, this.Scale.Y, this.Scale.Z);
172 dupe.rotation = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); 172 dupe.Rotation = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z);
173 dupe.Pos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); 173 dupe.Pos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z);
174 174
175 return dupe; 175 return dupe;
@@ -278,10 +278,10 @@ namespace OpenSim.Region.Environment.Scenes
278 this.m_RootParent.AddChildToList(this); 278 this.m_RootParent.AddChildToList(this);
279 this.Pos = oldPos; 279 this.Pos = oldPos;
280 Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); 280 Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z);
281 axPos = this.m_Parent.rotation.Inverse() * axPos; 281 axPos = this.m_Parent.Rotation.Inverse() * axPos;
282 this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); 282 this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
283 Axiom.Math.Quaternion oldRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); 283 Axiom.Math.Quaternion oldRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z);
284 this.rotation = this.m_Parent.rotation.Inverse() * this.rotation; 284 this.Rotation = this.m_Parent.Rotation.Inverse() * this.Rotation;
285 this.updateFlag = 1; 285 this.updateFlag = 1;
286 286
287 foreach (Primitive child in children) 287 foreach (Primitive child in children)
@@ -304,7 +304,7 @@ namespace OpenSim.Region.Environment.Scenes
304 axOldPos = oldParentRotation * axOldPos; 304 axOldPos = oldParentRotation * axOldPos;
305 oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z); 305 oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z);
306 oldPos += oldParentPosition; 306 oldPos += oldParentPosition;
307 Axiom.Math.Quaternion oldRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); 307 Axiom.Math.Quaternion oldRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z);
308 this.m_isRootPrim = false; 308 this.m_isRootPrim = false;
309 this.m_Parent = newParent; 309 this.m_Parent = newParent;
310 this.ParentID = newParent.LocalId; 310 this.ParentID = newParent.LocalId;
@@ -313,10 +313,10 @@ namespace OpenSim.Region.Environment.Scenes
313 this.m_RootParent.AddChildToList(this); 313 this.m_RootParent.AddChildToList(this);
314 this.Pos = oldPos; 314 this.Pos = oldPos;
315 Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); 315 Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z);
316 axPos = this.m_Parent.rotation.Inverse() * axPos; 316 axPos = this.m_Parent.Rotation.Inverse() * axPos;
317 this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); 317 this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
318 this.rotation = oldParentRotation * this.rotation; 318 this.Rotation = oldParentRotation * this.Rotation;
319 this.rotation = this.m_Parent.rotation.Inverse()* this.rotation ; 319 this.Rotation = this.m_Parent.Rotation.Inverse()* this.Rotation ;
320 this.updateFlag = 1; 320 this.updateFlag = 1;
321 foreach (Primitive child in children) 321 foreach (Primitive child in children)
322 { 322 {
@@ -401,7 +401,7 @@ namespace OpenSim.Region.Environment.Scenes
401 LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); 401 LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z);
402 LLVector3 diff = oldPos - newPos; 402 LLVector3 diff = oldPos - newPos;
403 Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z); 403 Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z);
404 axDiff = this.rotation.Inverse() * axDiff; 404 axDiff = this.Rotation.Inverse() * axDiff;
405 diff.X = axDiff.x; 405 diff.X = axDiff.x;
406 diff.Y = axDiff.y; 406 diff.Y = axDiff.y;
407 diff.Z = axDiff.z; 407 diff.Z = axDiff.z;
@@ -431,7 +431,7 @@ namespace OpenSim.Region.Environment.Scenes
431 /// <param name="rot"></param> 431 /// <param name="rot"></param>
432 public void UpdateGroupRotation(LLQuaternion rot) 432 public void UpdateGroupRotation(LLQuaternion rot)
433 { 433 {
434 this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); 434 this.Rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
435 this.updateFlag = 2; 435 this.updateFlag = 2;
436 436
437 } 437 }
@@ -443,7 +443,7 @@ namespace OpenSim.Region.Environment.Scenes
443 /// <param name="rot"></param> 443 /// <param name="rot"></param>
444 public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot) 444 public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot)
445 { 445 {
446 this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); 446 this.Rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
447 this.Pos = pos; 447 this.Pos = pos;
448 this.updateFlag = 2; 448 this.updateFlag = 2;
449 } 449 }
@@ -456,16 +456,16 @@ namespace OpenSim.Region.Environment.Scenes
456 { 456 {
457 //Console.WriteLine("updating single prim rotation"); 457 //Console.WriteLine("updating single prim rotation");
458 Axiom.Math.Quaternion axRot = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); 458 Axiom.Math.Quaternion axRot = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
459 Axiom.Math.Quaternion oldParentRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); 459 Axiom.Math.Quaternion oldParentRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z);
460 this.rotation = axRot; 460 this.Rotation = axRot;
461 foreach (Primitive prim in this.children) 461 foreach (Primitive prim in this.children)
462 { 462 {
463 Axiom.Math.Vector3 axPos = new Vector3(prim.m_pos.X, prim.m_pos.Y, prim.m_pos.Z); 463 Axiom.Math.Vector3 axPos = new Vector3(prim.m_pos.X, prim.m_pos.Y, prim.m_pos.Z);
464 axPos = oldParentRot * axPos; 464 axPos = oldParentRot * axPos;
465 axPos = axRot.Inverse() * axPos; 465 axPos = axRot.Inverse() * axPos;
466 prim.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); 466 prim.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
467 prim.rotation = oldParentRot * prim.rotation ; 467 prim.Rotation = oldParentRot * prim.Rotation ;
468 prim.rotation = axRot.Inverse()* prim.rotation; 468 prim.Rotation = axRot.Inverse()* prim.Rotation;
469 prim.updateFlag = 2; 469 prim.updateFlag = 2;
470 } 470 }
471 this.updateFlag = 2; 471 this.updateFlag = 2;
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Environment.Scenes
528 LLVector3 lPos; 528 LLVector3 lPos;
529 lPos = this.Pos; 529 lPos = this.Pos;
530 LLQuaternion lRot; 530 LLQuaternion lRot;
531 lRot = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w); 531 lRot = new LLQuaternion(this.Rotation.x, this.Rotation.y, this.Rotation.z, this.Rotation.w);
532 532
533 remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.m_Shape, lPos, lRot, new LLUUID("00000000-0000-0000-9999-000000000005"), this.m_flags, this.uuid, this.OwnerID, this.Text, this.ParentID); 533 remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.m_Shape, lPos, lRot, new LLUUID("00000000-0000-0000-9999-000000000005"), this.m_flags, this.uuid, this.OwnerID, this.Text, this.ParentID);
534 } 534 }
@@ -571,7 +571,7 @@ namespace OpenSim.Region.Environment.Scenes
571 Quaternion lRot; 571 Quaternion lRot;
572 572
573 lPos = this.Pos; 573 lPos = this.Pos;
574 lRot = this.rotation; 574 lRot = this.Rotation;
575 575
576 LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w); 576 LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w);
577 RemoteClient.SendPrimTerseUpdate(this.m_regionHandle, 64096, this.LocalId, lPos, mRot); 577 RemoteClient.SendPrimTerseUpdate(this.m_regionHandle, 64096, this.LocalId, lPos, mRot);