From ef4122213c440c55d32c097c08e52170f4b4346a Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Mon, 6 Aug 2012 15:35:40 +0100
Subject: enables configurable minimum sizes for physical & non-physical prims
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 4c87639..cd75224 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2368,17 +2368,16 @@ namespace OpenSim.Region.Framework.Scenes
///
public void Resize(Vector3 scale)
{
- scale.X = Math.Min(scale.X, ParentGroup.Scene.m_maxNonphys);
- scale.Y = Math.Min(scale.Y, ParentGroup.Scene.m_maxNonphys);
- scale.Z = Math.Min(scale.Z, ParentGroup.Scene.m_maxNonphys);
+ scale.X = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.X));
+ scale.Y = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Y));
+ scale.Z = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Z));
PhysicsActor pa = PhysActor;
-
if (pa != null && pa.IsPhysical)
{
- scale.X = Math.Min(scale.X, ParentGroup.Scene.m_maxPhys);
- scale.Y = Math.Min(scale.Y, ParentGroup.Scene.m_maxPhys);
- scale.Z = Math.Min(scale.Z, ParentGroup.Scene.m_maxPhys);
+ scale.X = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.X));
+ scale.Y = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Y));
+ scale.Z = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Z));
}
// m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale);
--
cgit v1.1
From 57a98796693cdd34efefbc9235b5d0aa765db095 Mon Sep 17 00:00:00 2001
From: Robert Adams
Date: Wed, 15 Aug 2012 16:39:00 -0700
Subject: Correct an exception report in SceneObjectPart so it outputs the
stack.
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index cd75224..bd6369c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -733,7 +733,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
- m_log.Error("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message);
+ m_log.ErrorFormat("[SCENEOBJECTPART]: GROUP POSITION. {0}", e);
}
}
--
cgit v1.1
From 466d684fbe26b4ea24a0003120d7a875fbbca037 Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Wed, 1 Aug 2012 15:18:02 +0100
Subject: implemented
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 50 ++++++++++++++++++++++
1 file changed, 50 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index bd6369c..e84ab05 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4236,6 +4236,56 @@ namespace OpenSim.Region.Framework.Scenes
ScheduleFullUpdate();
}
+ public void UpdateSlice(float begin, float end)
+ {
+ if (end < begin)
+ {
+ float temp = begin;
+ begin = end;
+ end = temp;
+ }
+ end = Math.Min(1f, Math.Max(0f, end));
+ begin = Math.Min(Math.Min(1f, Math.Max(0f, begin)), end - 0.02f);
+ if (begin < 0.02f && end < 0.02f)
+ {
+ begin = 0f;
+ end = 0.02f;
+ }
+
+ ushort uBegin = (ushort)(50000.0 * begin);
+ ushort uEnd = (ushort)(50000.0 * (1f - end));
+ bool updatePossiblyNeeded = false;
+ if (GetPrimType() == PrimType.SPHERE)
+ {
+ if (m_shape.ProfileBegin != uBegin || m_shape.ProfileEnd != uEnd)
+ {
+ m_shape.ProfileBegin = uBegin;
+ m_shape.ProfileEnd = uEnd;
+ updatePossiblyNeeded = true;
+ }
+ }
+ else if (m_shape.PathBegin != uBegin || m_shape.PathEnd != uEnd)
+ {
+ m_shape.PathBegin = uBegin;
+ m_shape.PathEnd = uEnd;
+ updatePossiblyNeeded = true;
+ }
+
+ if (updatePossiblyNeeded && ParentGroup != null)
+ {
+ ParentGroup.HasGroupChanged = true;
+ }
+ if (updatePossiblyNeeded && PhysActor != null)
+ {
+ PhysActor.Shape = m_shape;
+ ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
+ }
+ if (updatePossiblyNeeded)
+ {
+ ScheduleFullUpdate();
+ }
+ }
+
///
/// If the part is a sculpt/mesh, retrieve the mesh data and reinsert it into the shape so that the physics
/// engine can use it.
--
cgit v1.1
From 7068fddd2fffe356869171ed67be473f7a701470 Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Thu, 2 Aug 2012 09:28:32 +0100
Subject: fixing bug that get/set the wrong property for prim types other than
sphere & box
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index e84ab05..53b4f7e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4255,7 +4255,8 @@ namespace OpenSim.Region.Framework.Scenes
ushort uBegin = (ushort)(50000.0 * begin);
ushort uEnd = (ushort)(50000.0 * (1f - end));
bool updatePossiblyNeeded = false;
- if (GetPrimType() == PrimType.SPHERE)
+ PrimType primType = GetPrimType();
+ if (primType == PrimType.SPHERE || primType == PrimType.TORUS || primType == PrimType.TUBE || primType == PrimType.RING)
{
if (m_shape.ProfileBegin != uBegin || m_shape.ProfileEnd != uEnd)
{
--
cgit v1.1