diff options
author | Justin Clark-Casey (justincc) | 2011-10-29 00:39:01 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-29 00:39:01 +0100 |
commit | 61e97ee4c85d79098731eb7ddc074af388c61380 (patch) | |
tree | e6a56e53e5754e9e36e600aebe5e7e8eb09bba3e /OpenSim/Region | |
parent | set grp.RootPart.GroupPosition for code consistency (and readability) rather ... (diff) | |
download | opensim-SC-61e97ee4c85d79098731eb7ddc074af388c61380.zip opensim-SC-61e97ee4c85d79098731eb7ddc074af388c61380.tar.gz opensim-SC-61e97ee4c85d79098731eb7ddc074af388c61380.tar.bz2 opensim-SC-61e97ee4c85d79098731eb7ddc074af388c61380.tar.xz |
Remove completely unused SOG.Rotation parameter
We always use SOP.Rotation instead
Diffstat (limited to 'OpenSim/Region')
3 files changed, 10 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 64810d2..2ea9854 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -281,14 +281,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
281 | get { return m_parts.Count; } | 281 | get { return m_parts.Count; } |
282 | } | 282 | } |
283 | 283 | ||
284 | protected Quaternion m_rotation = Quaternion.Identity; | ||
285 | |||
286 | public virtual Quaternion Rotation | ||
287 | { | ||
288 | get { return m_rotation; } | ||
289 | set { m_rotation = value; } | ||
290 | } | ||
291 | |||
292 | public Quaternion GroupRotation | 284 | public Quaternion GroupRotation |
293 | { | 285 | { |
294 | get { return m_rootPart.RotationOffset; } | 286 | get { return m_rootPart.RotationOffset; } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index 2912a46..90cdd7b 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -62,9 +62,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
62 | 62 | ||
63 | grp1.AbsolutePosition = new Vector3(10, 10, 10); | 63 | grp1.AbsolutePosition = new Vector3(10, 10, 10); |
64 | grp2.AbsolutePosition = Vector3.Zero; | 64 | grp2.AbsolutePosition = Vector3.Zero; |
65 | 65 | ||
66 | // <90,0,0> | 66 | // <90,0,0> |
67 | grp1.Rotation = (Quaternion.CreateFromEulers(90 * Utils.DEG_TO_RAD, 0, 0)); | 67 | // grp1.UpdateGroupRotationR(Quaternion.CreateFromEulers(90 * Utils.DEG_TO_RAD, 0, 0)); |
68 | 68 | ||
69 | // <180,0,0> | 69 | // <180,0,0> |
70 | grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0)); | 70 | grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0)); |
@@ -85,7 +85,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
85 | if (debugtest) | 85 | if (debugtest) |
86 | { | 86 | { |
87 | m_log.Debug("parts: " + grp1.Parts.Length); | 87 | m_log.Debug("parts: " + grp1.Parts.Length); |
88 | m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation); | 88 | m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.GroupRotation); |
89 | m_log.Debug("Group1: Prim1: OffsetPosition:"+ part1.OffsetPosition+", OffsetRotation:"+part1.RotationOffset); | 89 | m_log.Debug("Group1: Prim1: OffsetPosition:"+ part1.OffsetPosition+", OffsetRotation:"+part1.RotationOffset); |
90 | m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+part2.RotationOffset); | 90 | m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+part2.RotationOffset); |
91 | } | 91 | } |
@@ -152,13 +152,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
152 | grp4.AbsolutePosition = new Vector3(40, 40, 40); | 152 | grp4.AbsolutePosition = new Vector3(40, 40, 40); |
153 | 153 | ||
154 | // <90,0,0> | 154 | // <90,0,0> |
155 | grp1.Rotation = (Quaternion.CreateFromEulers(90 * Utils.DEG_TO_RAD, 0, 0)); | 155 | // grp1.UpdateGroupRotationR(Quaternion.CreateFromEulers(90 * Utils.DEG_TO_RAD, 0, 0)); |
156 | 156 | ||
157 | // <180,0,0> | 157 | // <180,0,0> |
158 | grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0)); | 158 | grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0)); |
159 | 159 | ||
160 | // <270,0,0> | 160 | // <270,0,0> |
161 | grp3.Rotation = (Quaternion.CreateFromEulers(270 * Utils.DEG_TO_RAD, 0, 0)); | 161 | // grp3.UpdateGroupRotationR(Quaternion.CreateFromEulers(270 * Utils.DEG_TO_RAD, 0, 0)); |
162 | 162 | ||
163 | // <0,90,0> | 163 | // <0,90,0> |
164 | grp4.UpdateGroupRotationR(Quaternion.CreateFromEulers(0, 90 * Utils.DEG_TO_RAD, 0)); | 164 | grp4.UpdateGroupRotationR(Quaternion.CreateFromEulers(0, 90 * Utils.DEG_TO_RAD, 0)); |
@@ -187,12 +187,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
187 | { | 187 | { |
188 | m_log.Debug("--------After Link-------"); | 188 | m_log.Debug("--------After Link-------"); |
189 | m_log.Debug("Group1: parts:" + grp1.Parts.Length); | 189 | m_log.Debug("Group1: parts:" + grp1.Parts.Length); |
190 | m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation); | 190 | m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.GroupRotation); |
191 | m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset); | 191 | m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset); |
192 | m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+ part2.RotationOffset); | 192 | m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+ part2.RotationOffset); |
193 | 193 | ||
194 | m_log.Debug("Group3: parts:" + grp3.Parts.Length); | 194 | m_log.Debug("Group3: parts:" + grp3.Parts.Length); |
195 | m_log.Debug("Group3: Pos:"+grp3.AbsolutePosition+", Rot:"+grp3.Rotation); | 195 | m_log.Debug("Group3: Pos:"+grp3.AbsolutePosition+", Rot:"+grp3.GroupRotation); |
196 | m_log.Debug("Group3: Prim1: OffsetPosition:"+part3.OffsetPosition+", OffsetRotation:"+part3.RotationOffset); | 196 | m_log.Debug("Group3: Prim1: OffsetPosition:"+part3.OffsetPosition+", OffsetRotation:"+part3.RotationOffset); |
197 | m_log.Debug("Group3: Prim2: OffsetPosition:"+part4.OffsetPosition+", OffsetRotation:"+part4.RotationOffset); | 197 | m_log.Debug("Group3: Prim2: OffsetPosition:"+part4.OffsetPosition+", OffsetRotation:"+part4.RotationOffset); |
198 | } | 198 | } |
@@ -240,12 +240,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
240 | { | 240 | { |
241 | m_log.Debug("--------After De-Link-------"); | 241 | m_log.Debug("--------After De-Link-------"); |
242 | m_log.Debug("Group1: parts:" + grp1.Parts.Length); | 242 | m_log.Debug("Group1: parts:" + grp1.Parts.Length); |
243 | m_log.Debug("Group1: Pos:" + grp1.AbsolutePosition + ", Rot:" + grp1.Rotation); | 243 | m_log.Debug("Group1: Pos:" + grp1.AbsolutePosition + ", Rot:" + grp1.GroupRotation); |
244 | m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset); | 244 | m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset); |
245 | m_log.Debug("Group1: Prim2: OffsetPosition:" + part2.OffsetPosition + ", OffsetRotation:" + part2.RotationOffset); | 245 | m_log.Debug("Group1: Prim2: OffsetPosition:" + part2.OffsetPosition + ", OffsetRotation:" + part2.RotationOffset); |
246 | 246 | ||
247 | m_log.Debug("Group3: parts:" + grp3.Parts.Length); | 247 | m_log.Debug("Group3: parts:" + grp3.Parts.Length); |
248 | m_log.Debug("Group3: Pos:" + grp3.AbsolutePosition + ", Rot:" + grp3.Rotation); | 248 | m_log.Debug("Group3: Pos:" + grp3.AbsolutePosition + ", Rot:" + grp3.GroupRotation); |
249 | m_log.Debug("Group3: Prim1: OffsetPosition:" + part3.OffsetPosition + ", OffsetRotation:" + part3.RotationOffset); | 249 | m_log.Debug("Group3: Prim1: OffsetPosition:" + part3.OffsetPosition + ", OffsetRotation:" + part3.RotationOffset); |
250 | m_log.Debug("Group3: Prim2: OffsetPosition:" + part4.OffsetPosition + ", OffsetRotation:" + part4.RotationOffset); | 250 | m_log.Debug("Group3: Prim2: OffsetPosition:" + part4.OffsetPosition + ", OffsetRotation:" + part4.RotationOffset); |
251 | } | 251 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 654f168..f3206ac 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -541,7 +541,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
541 | if (World.Entities.TryGetValue(target, out entity)) | 541 | if (World.Entities.TryGetValue(target, out entity)) |
542 | { | 542 | { |
543 | if (entity is SceneObjectGroup) | 543 | if (entity is SceneObjectGroup) |
544 | ((SceneObjectGroup)entity).Rotation = rotation; | 544 | ((SceneObjectGroup)entity).UpdateGroupRotationR(rotation); |
545 | else if (entity is ScenePresence) | 545 | else if (entity is ScenePresence) |
546 | ((ScenePresence)entity).Rotation = rotation; | 546 | ((ScenePresence)entity).Rotation = rotation; |
547 | } | 547 | } |