From 827b0fb1993c6f9b1289931a1ac38ff2b810952c Mon Sep 17 00:00:00 2001
From: opensim
Date: Wed, 30 Sep 2009 18:51:02 +0200
Subject: Commit initial version of KittoFlora's vehicle changes
---
.../Region/Framework/Scenes/SceneObjectGroup.cs | 42 ++++++++++++++--------
1 file changed, 27 insertions(+), 15 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 3c17bbe..4bd10bd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -368,6 +368,13 @@ namespace OpenSim.Region.Framework.Scenes
#region Constructors
///
+ /// Constructor
+ ///
+ public SceneObjectGroup()
+ {
+ }
+
+ ///
/// This constructor creates a SceneObjectGroup using a pre-existing SceneObjectPart.
/// The original SceneObjectPart will be used rather than a copy, preserving
/// its existing localID and UUID.
@@ -2953,8 +2960,9 @@ namespace OpenSim.Region.Framework.Scenes
///
///
///
- public void UpdateGroupRotation(Quaternion rot)
+ public void UpdateGroupRotationR(Quaternion rot)
{
+
m_rootPart.UpdateRotation(rot);
if (m_rootPart.PhysActor != null)
{
@@ -2971,7 +2979,7 @@ namespace OpenSim.Region.Framework.Scenes
///
///
///
- public void UpdateGroupRotation(Vector3 pos, Quaternion rot)
+ public void UpdateGroupRotationPR(Vector3 pos, Quaternion rot)
{
m_rootPart.UpdateRotation(rot);
if (m_rootPart.PhysActor != null)
@@ -3079,22 +3087,26 @@ namespace OpenSim.Region.Framework.Scenes
int yaxis = 4;
int zaxis = 8;
- setX = ((axis & xaxis) != 0) ? true : false;
- setY = ((axis & yaxis) != 0) ? true : false;
- setZ = ((axis & zaxis) != 0) ? true : false;
+ if (m_rootPart != null)
+ {
+ setX = ((axis & xaxis) != 0) ? true : false;
+ setY = ((axis & yaxis) != 0) ? true : false;
+ setZ = ((axis & zaxis) != 0) ? true : false;
- float setval = (rotate10 > 0) ? 1f : 0f;
+ float setval = (rotate10 > 0) ? 1f : 0f;
- if (setX)
- m_rootPart.RotationAxis.X = setval;
- if (setY)
- m_rootPart.RotationAxis.Y = setval;
- if (setZ)
- m_rootPart.RotationAxis.Z = setval;
+ if (setX)
+ m_rootPart.RotationAxis.X = setval;
+ if (setY)
+ m_rootPart.RotationAxis.Y = setval;
+ if (setZ)
+ m_rootPart.RotationAxis.Z = setval;
+
+ if (setX || setY || setZ)
+ {
+ m_rootPart.SetPhysicsAxisRotation();
+ }
- if (setX || setY || setZ)
- {
- m_rootPart.SetPhysicsAxisRotation();
}
}
--
cgit v1.1
From 212e132e79f868fd3bb9bcf9ef2c13eb12f8c14e Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 2 Oct 2009 00:47:01 +0100
Subject: Revert "* Adding Scale to EntityBase * Fixing the incorrect
initialization of EntityBase.Rotation * Removed
SceneObjectGroup.GroupRotation and added overrides for
Scale/Rotation/Velocity"
This reverts commit 39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0.
---
.../Region/Framework/Scenes/SceneObjectGroup.cs | 30 +++++-----------------
1 file changed, 7 insertions(+), 23 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 6b4cc0d..9f44f92 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -204,22 +204,9 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_parts.Count; }
}
- public override Quaternion Rotation
+ public Quaternion GroupRotation
{
get { return m_rootPart.RotationOffset; }
- set { m_rootPart.RotationOffset = value; }
- }
-
- public override Vector3 Scale
- {
- get { return m_rootPart.Scale; }
- set { m_rootPart.Scale = value; }
- }
-
- public override Vector3 Velocity
- {
- get { return m_rootPart.Velocity; }
- set { m_rootPart.Velocity = value; }
}
public UUID GroupID
@@ -548,7 +535,7 @@ namespace OpenSim.Region.Framework.Scenes
// Temporary commented to stop compiler warning
//Vector3 partPosition =
// new Vector3(part.AbsolutePosition.X, part.AbsolutePosition.Y, part.AbsolutePosition.Z);
- Quaternion parentrotation = Rotation;
+ Quaternion parentrotation = GroupRotation;
// Telling the prim to raytrace.
//EntityIntersection inter = part.TestIntersection(hRay, parentrotation);
@@ -1891,17 +1878,14 @@ namespace OpenSim.Region.Framework.Scenes
checkAtTargets();
- Quaternion rot = Rotation;
-
- if (UsePhysics &&
- ((Math.Abs(lastPhysGroupRot.W - rot.W) > 0.1f)
- || (Math.Abs(lastPhysGroupRot.X - rot.X) > 0.1f)
- || (Math.Abs(lastPhysGroupRot.Y - rot.Y) > 0.1f)
- || (Math.Abs(lastPhysGroupRot.Z - rot.Z) > 0.1f)))
+ if (UsePhysics && ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
+ || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
+ || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1)
+ || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1)))
{
m_rootPart.UpdateFlag = 1;
- lastPhysGroupRot = rot;
+ lastPhysGroupRot = GroupRotation;
}
foreach (SceneObjectPart part in m_parts.Values)
--
cgit v1.1