aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorMW2007-08-23 11:38:50 +0000
committerMW2007-08-23 11:38:50 +0000
commitedd50f2e8ea384e1fe9f9dc0ed5903477cb383f3 (patch)
treed2444c1588b98d28fbedb43dbac8772b01a53762 /OpenSim/Region/Environment
parentAdded a PhysicsActor PhysActor member to SceneObjectPart, and made it so this... (diff)
downloadopensim-SC-edd50f2e8ea384e1fe9f9dc0ed5903477cb383f3.zip
opensim-SC-edd50f2e8ea384e1fe9f9dc0ed5903477cb383f3.tar.gz
opensim-SC-edd50f2e8ea384e1fe9f9dc0ed5903477cb383f3.tar.bz2
opensim-SC-edd50f2e8ea384e1fe9f9dc0ed5903477cb383f3.tar.xz
Implemented Resize Method in OdePrim.
attached the links to that from SceneObject, so now resizing works (as much as resizing currently works in opensim, fixing resizing in general is on my todo list for today). Rotation of a root prim also now updates the physics engine. So think there really is only deleteprim left, then it should be usable (Different shapes (other than boxes that it currently uses) can wait a little bit longer). [of course there are still the other issues of ODE not really working when there is more than one region in a instance of opensim].
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs19
2 files changed, 24 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 20624d5..87a42b1 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Scenes
547 SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape); 547 SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape);
548 AddEntity(sceneOb); 548 AddEntity(sceneOb);
549 SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); 549 SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
550 // rootPart.PhysActor =phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), 550 //rootPart.PhysActor =phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z),
551 // new Axiom.Math.Quaternion()); 551 // new Axiom.Math.Quaternion());
552 } 552 }
553 553
@@ -626,11 +626,11 @@ namespace OpenSim.Region.Environment.Scenes
626 AddEntity(obj); 626 AddEntity(obj);
627 627
628 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); 628 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
629 //rootPart.PhysActor = phyScene.AddPrim( 629 //rootPart.PhysActor = phyScene.AddPrim(
630 // new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z), 630 // new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z),
631 // new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), 631 // new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
632 // new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, 632 // new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
633 // rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); 633 // rootPart.RotationOffset.Y, rootPart.RotationOffset.Z));
634 primCount++; 634 primCount++;
635 } 635 }
636 } 636 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 7e34637..f787190 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -717,6 +717,13 @@ namespace OpenSim.Region.Environment.Scenes
717 if (part != null) 717 if (part != null)
718 { 718 {
719 part.Resize(scale); 719 part.Resize(scale);
720 if (part.UUID == this.m_rootPart.UUID)
721 {
722 if (m_rootPart.PhysActor != null)
723 {
724 m_rootPart.PhysActor.Size = new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z);
725 }
726 }
720 } 727 }
721 } 728 }
722 #endregion 729 #endregion
@@ -789,6 +796,10 @@ namespace OpenSim.Region.Environment.Scenes
789 public void UpdateGroupRotation(LLQuaternion rot) 796 public void UpdateGroupRotation(LLQuaternion rot)
790 { 797 {
791 this.m_rootPart.UpdateRotation(rot); 798 this.m_rootPart.UpdateRotation(rot);
799 if (m_rootPart.PhysActor != null)
800 {
801 m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z);
802 }
792 this.ScheduleGroupForTerseUpdate(); 803 this.ScheduleGroupForTerseUpdate();
793 } 804 }
794 805
@@ -800,6 +811,10 @@ namespace OpenSim.Region.Environment.Scenes
800 public void UpdateGroupRotation(LLVector3 pos, LLQuaternion rot) 811 public void UpdateGroupRotation(LLVector3 pos, LLQuaternion rot)
801 { 812 {
802 this.m_rootPart.UpdateRotation(rot); 813 this.m_rootPart.UpdateRotation(rot);
814 if (m_rootPart.PhysActor != null)
815 {
816 m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z);
817 }
803 this.AbsolutePosition = pos; 818 this.AbsolutePosition = pos;
804 this.ScheduleGroupForTerseUpdate(); 819 this.ScheduleGroupForTerseUpdate();
805 } 820 }
@@ -832,6 +847,10 @@ namespace OpenSim.Region.Environment.Scenes
832 private void UpdateRootRotation(LLQuaternion rot) 847 private void UpdateRootRotation(LLQuaternion rot)
833 { 848 {
834 this.m_rootPart.UpdateRotation(rot); 849 this.m_rootPart.UpdateRotation(rot);
850 if (m_rootPart.PhysActor != null)
851 {
852 m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z);
853 }
835 Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); 854 Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
836 Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z); 855 Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
837 856