aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-04-20 18:51:32 +0100
committerUbitUmarov2012-04-20 18:51:32 +0100
commit3b56c4445390461ea6cdef7bc9ad8f8b26fc97c1 (patch)
tree2ec58b80052a22550c1ddbc2527f9f20fd0e6914 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parentubitODE: - Change triangles used in terrain height estimation (diff)
downloadopensim-SC-3b56c4445390461ea6cdef7bc9ad8f8b26fc97c1.zip
opensim-SC-3b56c4445390461ea6cdef7bc9ad8f8b26fc97c1.tar.gz
opensim-SC-3b56c4445390461ea6cdef7bc9ad8f8b26fc97c1.tar.bz2
opensim-SC-3b56c4445390461ea6cdef7bc9ad8f8b26fc97c1.tar.xz
changed seletion code. SOP now knows about parts selection. UI actions are sent to SOP and this reports to SOG. Group is selected if any part is selected.sop.isSelect get() is only used in SOG. Will need to be improved for better performance on largelinksets. *UNTESTED* NEEDS CHECKING for side efects
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs48
1 files changed, 39 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 47020af..0100ab3 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -726,6 +726,11 @@ namespace OpenSim.Region.Framework.Scenes
726 m_isSelected = value; 726 m_isSelected = value;
727 // Tell physics engine that group is selected 727 // Tell physics engine that group is selected
728 728
729 // this is not right
730 // but ode engines should only really need to know about root part
731 // so they can put entire object simulation on hold and not colliding
732 // keep as was for now
733
729 PhysicsActor pa = m_rootPart.PhysActor; 734 PhysicsActor pa = m_rootPart.PhysActor;
730 if (pa != null) 735 if (pa != null)
731 { 736 {
@@ -747,6 +752,40 @@ namespace OpenSim.Region.Framework.Scenes
747 } 752 }
748 } 753 }
749 754
755 public void PartSelectChanged(bool partSelect)
756 {
757 // any part selected makes group selected
758 if (m_isSelected == partSelect)
759 return;
760
761 if (partSelect)
762 {
763 IsSelected = partSelect;
764// if (!IsAttachment)
765// ScheduleGroupForFullUpdate();
766 }
767 else
768 {
769 // bad bad bad 2 heavy for large linksets
770 // since viewer does send lot of (un)selects
771 // this needs to be replaced by a specific list or count ?
772 // but that will require extra code in several places
773
774 SceneObjectPart[] parts = m_parts.GetArray();
775 for (int i = 0; i < parts.Length; i++)
776 {
777 SceneObjectPart part = parts[i];
778 if (part.IsSelected)
779 return;
780 }
781 IsSelected = partSelect;
782 if (!IsAttachment)
783 {
784 ScheduleGroupForFullUpdate();
785 }
786 }
787 }
788
750 private SceneObjectPart m_PlaySoundMasterPrim = null; 789 private SceneObjectPart m_PlaySoundMasterPrim = null;
751 public SceneObjectPart PlaySoundMasterPrim 790 public SceneObjectPart PlaySoundMasterPrim
752 { 791 {
@@ -3139,14 +3178,6 @@ namespace OpenSim.Region.Framework.Scenes
3139 } 3178 }
3140 } 3179 }
3141 3180
3142/*
3143 RootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect);
3144 for (int i = 0; i < parts.Length; i++)
3145 {
3146 if (parts[i] != RootPart)
3147 parts[i].UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect);
3148 }
3149*/
3150 if (parts.Length > 1) 3181 if (parts.Length > 1)
3151 { 3182 {
3152 m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true); 3183 m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true);
@@ -3163,7 +3194,6 @@ namespace OpenSim.Region.Framework.Scenes
3163 } 3194 }
3164 else 3195 else
3165 m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, false); 3196 m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, false);
3166
3167 } 3197 }
3168 } 3198 }
3169 3199