diff options
author | John Hurliman | 2009-09-16 15:45:40 -0700 |
---|---|---|
committer | John Hurliman | 2009-09-16 17:17:40 -0700 |
commit | 39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0 (patch) | |
tree | 328265a2202540bc42941fcb87393d9534509a73 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | SceneObjectGroup cleanup. Removes the default constructor and unnecessary nul... (diff) | |
download | opensim-SC-39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0.zip opensim-SC-39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0.tar.gz opensim-SC-39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0.tar.bz2 opensim-SC-39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0.tar.xz |
* Adding Scale to EntityBase * Fixing the incorrect initialization of EntityBase.Rotation * Removed SceneObjectGroup.GroupRotation and added overrides for Scale/Rotation/Velocity
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3c17bbe..0cf08b5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -204,9 +204,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
204 | get { return m_parts.Count; } | 204 | get { return m_parts.Count; } |
205 | } | 205 | } |
206 | 206 | ||
207 | public Quaternion GroupRotation | 207 | public override Quaternion Rotation |
208 | { | 208 | { |
209 | get { return m_rootPart.RotationOffset; } | 209 | get { return m_rootPart.RotationOffset; } |
210 | set { m_rootPart.RotationOffset = value; } | ||
211 | } | ||
212 | |||
213 | public override Vector3 Scale | ||
214 | { | ||
215 | get { return m_rootPart.Scale; } | ||
216 | set { m_rootPart.Scale = value; } | ||
217 | } | ||
218 | |||
219 | public override Vector3 Velocity | ||
220 | { | ||
221 | get { return m_rootPart.Velocity; } | ||
222 | set { m_rootPart.Velocity = value; } | ||
210 | } | 223 | } |
211 | 224 | ||
212 | public UUID GroupID | 225 | public UUID GroupID |
@@ -523,7 +536,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
523 | // Temporary commented to stop compiler warning | 536 | // Temporary commented to stop compiler warning |
524 | //Vector3 partPosition = | 537 | //Vector3 partPosition = |
525 | // new Vector3(part.AbsolutePosition.X, part.AbsolutePosition.Y, part.AbsolutePosition.Z); | 538 | // new Vector3(part.AbsolutePosition.X, part.AbsolutePosition.Y, part.AbsolutePosition.Z); |
526 | Quaternion parentrotation = GroupRotation; | 539 | Quaternion parentrotation = Rotation; |
527 | 540 | ||
528 | // Telling the prim to raytrace. | 541 | // Telling the prim to raytrace. |
529 | //EntityIntersection inter = part.TestIntersection(hRay, parentrotation); | 542 | //EntityIntersection inter = part.TestIntersection(hRay, parentrotation); |
@@ -1866,14 +1879,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
1866 | 1879 | ||
1867 | checkAtTargets(); | 1880 | checkAtTargets(); |
1868 | 1881 | ||
1869 | if (UsePhysics && ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) | 1882 | Quaternion rot = Rotation; |
1870 | || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) | 1883 | |
1871 | || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1) | 1884 | if (UsePhysics && |
1872 | || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1))) | 1885 | ((Math.Abs(lastPhysGroupRot.W - rot.W) > 0.1f) |
1886 | || (Math.Abs(lastPhysGroupRot.X - rot.X) > 0.1f) | ||
1887 | || (Math.Abs(lastPhysGroupRot.Y - rot.Y) > 0.1f) | ||
1888 | || (Math.Abs(lastPhysGroupRot.Z - rot.Z) > 0.1f))) | ||
1873 | { | 1889 | { |
1874 | m_rootPart.UpdateFlag = 1; | 1890 | m_rootPart.UpdateFlag = 1; |
1875 | 1891 | ||
1876 | lastPhysGroupRot = GroupRotation; | 1892 | lastPhysGroupRot = rot; |
1877 | } | 1893 | } |
1878 | 1894 | ||
1879 | foreach (SceneObjectPart part in m_parts.Values) | 1895 | foreach (SceneObjectPart part in m_parts.Values) |