From 9988558ec16144f1a69b666d39428cda4c0849c3 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Wed, 3 Oct 2012 23:14:56 +0100
Subject: meshworker basic replacement of SOP CheckSculptAndLoad ( for now
disabled for all physics engines)
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index e6ad89c..1bddf22 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4902,6 +4902,8 @@ namespace OpenSim.Region.Framework.Scenes
{
// m_log.DebugFormat("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId);
+ return;
+
if (ParentGroup.IsDeleted)
return;
--
cgit v1.1
From 78ce7a0a04dc5ce3212acfb0e88a3a5a1b876100 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sun, 7 Oct 2012 01:20:52 +0100
Subject: [DANGER UNTESTED] ODE mesh assets. Other plugins will not do
meshs/sculpts now
---
.../Region/Framework/Scenes/SceneObjectGroup.cs | 4 +--
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 38 ++++++++++++----------
2 files changed, 23 insertions(+), 19 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 4798481..4b22ebe 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -4299,8 +4299,8 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectPart[] parts = m_parts.GetArray();
- for (int i = 0; i < parts.Length; i++)
- parts[i].CheckSculptAndLoad();
+// for (int i = 0; i < parts.Length; i++)
+// parts[i].CheckSculptAndLoad();
}
///
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 1bddf22..633cd3b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1095,9 +1095,9 @@ namespace OpenSim.Region.Framework.Scenes
{
actor.Size = m_shape.Scale;
- if (Shape.SculptEntry)
- CheckSculptAndLoad();
- else
+// if (Shape.SculptEntry)
+// CheckSculptAndLoad();
+// else
ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
}
}
@@ -1654,8 +1654,8 @@ namespace OpenSim.Region.Framework.Scenes
else
{
PhysActor.PhysicsShapeType = m_physicsShapeType;
- if (Shape.SculptEntry)
- CheckSculptAndLoad();
+// if (Shape.SculptEntry)
+// CheckSculptAndLoad();
}
if (ParentGroup != null)
@@ -2115,12 +2115,13 @@ namespace OpenSim.Region.Framework.Scenes
if (userExposed)
{
+/*
if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != UUID.Zero)
{
ParentGroup.Scene.AssetService.Get(
dupe.m_shape.SculptTexture.ToString(), dupe, dupe.AssetReceived);
}
-
+*/
bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0);
dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
// dupe.UpdatePhysicsSubscribedEvents(); // not sure...
@@ -2142,6 +2143,7 @@ namespace OpenSim.Region.Framework.Scenes
/// ID of asset received
/// Register
///
+/*
protected void AssetReceived(string id, Object sender, AssetBase asset)
{
if (asset != null)
@@ -2151,7 +2153,7 @@ namespace OpenSim.Region.Framework.Scenes
// "[SCENE OBJECT PART]: Part {0} {1} requested mesh/sculpt data for asset id {2} from asset service but received no data",
// Name, UUID, id);
}
-
+*/
///
/// Do a physics property update for a NINJA joint.
///
@@ -2341,9 +2343,9 @@ namespace OpenSim.Region.Framework.Scenes
// If this part is a sculpt then delay the physics update until we've asynchronously loaded the
// mesh data.
- if (Shape.SculptEntry)
- CheckSculptAndLoad();
- else
+// if (Shape.SculptEntry)
+// CheckSculptAndLoad();
+// else
ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
}
}
@@ -3125,6 +3127,7 @@ namespace OpenSim.Region.Framework.Scenes
/// Set sculpt and mesh data, and tell the physics engine to process the change.
///
/// The mesh itself.
+/*
public void SculptTextureCallback(AssetBase texture)
{
if (m_shape.SculptEntry)
@@ -3152,7 +3155,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
-
+*/
///
/// Send a full update to the client for the given part
///
@@ -4377,7 +4380,7 @@ namespace OpenSim.Region.Framework.Scenes
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
{
m_shape.ReadInUpdateExtraParam(type, inUse, data);
-
+/*
if (type == 0x30)
{
if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero)
@@ -4385,7 +4388,7 @@ namespace OpenSim.Region.Framework.Scenes
ParentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived);
}
}
-
+*/
if (ParentGroup != null)
{
ParentGroup.HasGroupChanged = true;
@@ -4793,9 +4796,9 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- if (Shape.SculptEntry)
- CheckSculptAndLoad();
- else
+// if (Shape.SculptEntry)
+// CheckSculptAndLoad();
+// else
ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
if (!building)
@@ -4898,6 +4901,7 @@ namespace OpenSim.Region.Framework.Scenes
///
/// When the physics engine has finished with it, the sculpt data is discarded to save memory.
///
+/*
public void CheckSculptAndLoad()
{
// m_log.DebugFormat("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId);
@@ -4925,7 +4929,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
-
+*/
///
/// Update the texture entry for this part.
///
--
cgit v1.1
From 48d8fbc9aedb3247a1dfd25be1b7dfbdd8719790 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sun, 7 Oct 2012 08:53:55 +0100
Subject: bug fix + make costs visible for testing
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 633cd3b..66d85c4 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1583,7 +1583,9 @@ namespace OpenSim.Region.Framework.Scenes
float cost = 0.1f;
if (PhysActor != null)
-// cost += PhysActor.Cost;
+ cost = PhysActor.PhysicsCost;
+ else
+ cost = 0.1f;
if ((Flags & PrimFlags.Physics) != 0)
cost *= (1.0f + 0.01333f * Scale.LengthSquared()); // 0.01333 == 0.04/3
@@ -1596,9 +1598,12 @@ namespace OpenSim.Region.Framework.Scenes
{
get
{
-
-
- return 0.1f;
+ float cost;
+ if (PhysActor != null)
+ cost = PhysActor.StreamCost;
+ else
+ cost = 1.0f;
+ return 1.0f;
}
}
--
cgit v1.1
From d554c0d574f9c4763df0bbff931de0f944db53a5 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Wed, 10 Oct 2012 01:37:59 +0100
Subject: normalize quaternion.Slerp outputs
---
OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 1 +
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 1 +
2 files changed, 2 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
index 233e559..edf2bef 100644
--- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
+++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
@@ -575,6 +575,7 @@ namespace OpenSim.Region.Framework.Scenes
Quaternion current = m_group.GroupRotation;
Quaternion step = Quaternion.Slerp(m_currentFrame.StartRotation, (Quaternion)m_currentFrame.Rotation, complete);
+ step.Normalize();
/* use simpler change detection
* float angle = 0;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 66d85c4..1857757 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -5202,6 +5202,7 @@ namespace OpenSim.Region.Framework.Scenes
}
Quaternion rot = Quaternion.Slerp(RotationOffset,APIDTarget,1.0f/(float)m_APIDIterations);
+ rot.Normalize();
UpdateRotation(rot);
m_APIDIterations--;
--
cgit v1.1