aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
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/Scenes/SceneObjectGroup.cs
parentAdded a PhysicsActor PhysActor member to SceneObjectPart, and made it so this... (diff)
downloadopensim-SC_OLD-edd50f2e8ea384e1fe9f9dc0ed5903477cb383f3.zip
opensim-SC_OLD-edd50f2e8ea384e1fe9f9dc0ed5903477cb383f3.tar.gz
opensim-SC_OLD-edd50f2e8ea384e1fe9f9dc0ed5903477cb383f3.tar.bz2
opensim-SC_OLD-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 '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs19
1 files changed, 19 insertions, 0 deletions
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