aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Types
diff options
context:
space:
mode:
authorlbsa712007-09-19 00:30:55 +0000
committerlbsa712007-09-19 00:30:55 +0000
commit8f0b03597b0bc8ea6873af9a55495407fae1ec56 (patch)
treef9f4de38379aebf2223ad4cb10a3d9ebcfa52a4f /OpenSim/Region/Environment/Types
parent* Moved SendLogoutPacket back to IClientAPI. (diff)
downloadopensim-SC_OLD-8f0b03597b0bc8ea6873af9a55495407fae1ec56.zip
opensim-SC_OLD-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.gz
opensim-SC_OLD-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.bz2
opensim-SC_OLD-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.xz
* Modernized ScriptManager to new interface-based module calls.
* 'remove redundant this qualifier' ftw
Diffstat (limited to 'OpenSim/Region/Environment/Types')
-rw-r--r--OpenSim/Region/Environment/Types/BasicQuadTreeNode.cs45
-rw-r--r--OpenSim/Region/Environment/Types/UpdateQueue.cs15
2 files changed, 32 insertions, 28 deletions
diff --git a/OpenSim/Region/Environment/Types/BasicQuadTreeNode.cs b/OpenSim/Region/Environment/Types/BasicQuadTreeNode.cs
index 3b4dd9a..0b815ba 100644
--- a/OpenSim/Region/Environment/Types/BasicQuadTreeNode.cs
+++ b/OpenSim/Region/Environment/Types/BasicQuadTreeNode.cs
@@ -1,8 +1,6 @@
1using System; 1using System.Collections.Generic;
2using System.Collections.Generic; 2using OpenSim.Region.Environment.Scenes;
3using System.Text; 3
4using OpenSim.Region.Environment.Scenes;
5
6namespace OpenSim.Region.Environment.Types 4namespace OpenSim.Region.Environment.Types
7{ 5{
8 public class BasicQuadTreeNode 6 public class BasicQuadTreeNode
@@ -36,9 +34,9 @@ namespace OpenSim.Region.Environment.Types
36 } 34 }
37 else 35 else
38 { 36 {
39 if (obj.AbsolutePosition.X < (m_leftX + (m_width / 2))) 37 if (obj.AbsolutePosition.X < (m_leftX + (m_width/2)))
40 { 38 {
41 if (obj.AbsolutePosition.Y < (m_leftY + (m_height / 2))) 39 if (obj.AbsolutePosition.Y < (m_leftY + (m_height/2)))
42 { 40 {
43 m_childNodes[0].AddObject(obj); 41 m_childNodes[0].AddObject(obj);
44 } 42 }
@@ -49,7 +47,7 @@ namespace OpenSim.Region.Environment.Types
49 } 47 }
50 else 48 else
51 { 49 {
52 if (obj.AbsolutePosition.Y < (m_leftY + (m_height / 2))) 50 if (obj.AbsolutePosition.Y < (m_leftY + (m_height/2)))
53 { 51 {
54 m_childNodes[1].AddObject(obj); 52 m_childNodes[1].AddObject(obj);
55 } 53 }
@@ -66,10 +64,17 @@ namespace OpenSim.Region.Environment.Types
66 if (m_childNodes == null) 64 if (m_childNodes == null)
67 { 65 {
68 m_childNodes = new BasicQuadTreeNode[4]; 66 m_childNodes = new BasicQuadTreeNode[4];
69 m_childNodes[0] = new BasicQuadTreeNode(this, m_leftX, m_leftY,(short) (m_width / 2), (short)( m_height / 2)); 67 m_childNodes[0] =
70 m_childNodes[1] = new BasicQuadTreeNode(this,(short)( m_leftX + (m_width / 2)), m_leftY,(short)( m_width / 2),(short) (m_height / 2)); 68 new BasicQuadTreeNode(this, m_leftX, m_leftY, (short) (m_width/2), (short) (m_height/2));
71 m_childNodes[2] = new BasicQuadTreeNode(this, m_leftX, (short)( m_leftY + (m_height / 2)), (short)(m_width / 2),(short)( m_height / 2)); 69 m_childNodes[1] =
72 m_childNodes[3] = new BasicQuadTreeNode(this, (short)( m_leftX + (m_width / 2)),(short)( m_height + (m_height / 2)),(short)( m_width / 2), (short)(m_height / 2)); 70 new BasicQuadTreeNode(this, (short) (m_leftX + (m_width/2)), m_leftY, (short) (m_width/2),
71 (short) (m_height/2));
72 m_childNodes[2] =
73 new BasicQuadTreeNode(this, m_leftX, (short) (m_leftY + (m_height/2)), (short) (m_width/2),
74 (short) (m_height/2));
75 m_childNodes[3] =
76 new BasicQuadTreeNode(this, (short) (m_leftX + (m_width/2)), (short) (m_height + (m_height/2)),
77 (short) (m_width/2), (short) (m_height/2));
73 } 78 }
74 else 79 else
75 { 80 {
@@ -88,9 +93,9 @@ namespace OpenSim.Region.Environment.Types
88 } 93 }
89 else 94 else
90 { 95 {
91 if (x < (m_leftX + (m_width / 2))) 96 if (x < (m_leftX + (m_width/2)))
92 { 97 {
93 if (y < (m_leftY + (m_height / 2))) 98 if (y < (m_leftY + (m_height/2)))
94 { 99 {
95 return m_childNodes[0].GetObjectsFrom(x, y); 100 return m_childNodes[0].GetObjectsFrom(x, y);
96 } 101 }
@@ -101,7 +106,7 @@ namespace OpenSim.Region.Environment.Types
101 } 106 }
102 else 107 else
103 { 108 {
104 if (y < (m_leftY + (m_height / 2))) 109 if (y < (m_leftY + (m_height/2)))
105 { 110 {
106 return m_childNodes[1].GetObjectsFrom(x, y); 111 return m_childNodes[1].GetObjectsFrom(x, y);
107 } 112 }
@@ -127,7 +132,8 @@ namespace OpenSim.Region.Environment.Types
127 List<SceneObjectGroup> outBounds = new List<SceneObjectGroup>(); 132 List<SceneObjectGroup> outBounds = new List<SceneObjectGroup>();
128 foreach (SceneObjectGroup group in m_objects) 133 foreach (SceneObjectGroup group in m_objects)
129 { 134 {
130 if (((group.AbsolutePosition.X > m_leftX) && (group.AbsolutePosition.X < (m_leftX + m_width))) && ((group.AbsolutePosition.Y > m_leftY) && (group.AbsolutePosition.Y < (m_leftY + m_height)))) 135 if (((group.AbsolutePosition.X > m_leftX) && (group.AbsolutePosition.X < (m_leftX + m_width))) &&
136 ((group.AbsolutePosition.Y > m_leftY) && (group.AbsolutePosition.Y < (m_leftY + m_height))))
131 { 137 {
132 //still in bounds 138 //still in bounds
133 } 139 }
@@ -151,9 +157,10 @@ namespace OpenSim.Region.Environment.Types
151 157
152 public void PassUp(SceneObjectGroup group) 158 public void PassUp(SceneObjectGroup group)
153 { 159 {
154 if (((group.AbsolutePosition.X > m_leftX) && (group.AbsolutePosition.X < (m_leftX + m_width))) && ((group.AbsolutePosition.Y > m_leftY) && (group.AbsolutePosition.Y < (m_leftY + m_height)))) 160 if (((group.AbsolutePosition.X > m_leftX) && (group.AbsolutePosition.X < (m_leftX + m_width))) &&
161 ((group.AbsolutePosition.Y > m_leftY) && (group.AbsolutePosition.Y < (m_leftY + m_height))))
155 { 162 {
156 this.AddObject(group); 163 AddObject(group);
157 } 164 }
158 else 165 else
159 { 166 {
@@ -164,4 +171,4 @@ namespace OpenSim.Region.Environment.Types
164 } 171 }
165 } 172 }
166 } 173 }
167} 174} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Types/UpdateQueue.cs b/OpenSim/Region/Environment/Types/UpdateQueue.cs
index 3b7c182..6e26aaf 100644
--- a/OpenSim/Region/Environment/Types/UpdateQueue.cs
+++ b/OpenSim/Region/Environment/Types/UpdateQueue.cs
@@ -1,9 +1,7 @@
1using System; 1using System.Collections.Generic;
2using System.Collections.Generic; 2using libsecondlife;
3using System.Text; 3using OpenSim.Region.Environment.Scenes;
4using OpenSim.Region.Environment.Scenes; 4
5using libsecondlife;
6
7namespace OpenSim.Region.Environment.Types 5namespace OpenSim.Region.Environment.Types
8{ 6{
9 public class UpdateQueue 7 public class UpdateQueue
@@ -48,7 +46,6 @@ namespace OpenSim.Region.Environment.Types
48 } 46 }
49 47
50 return part; 48 return part;
51 } 49 }
52
53 } 50 }
54} 51} \ No newline at end of file