From beb3073bec9438a439e13eaec40a8320a9279adc Mon Sep 17 00:00:00 2001
From: MW
Date: Wed, 4 Jul 2007 19:07:27 +0000
Subject: A bit more work on Building tools/support. updated Axiom.MathLib.dll.
---
OpenSim/Region/Capabilities/Caps.cs | 52 +++++++--
OpenSim/Region/ClientStack/ClientView.API.cs | 4 +-
.../ClientStack/ClientView.PacketHandlers.cs | 21 ++--
.../Environment/OpenSim.Region.Environment.csproj | 58 +++++-----
OpenSim/Region/Environment/Scenes/EntityBase.cs | 2 +-
OpenSim/Region/Environment/Scenes/Primitive.cs | 124 +++++++++++++++++++--
OpenSim/Region/Environment/Scenes/PrimitiveOld.cs | 2 +-
.../Environment/Scenes/Scene.PacketHandlers.cs | 60 +++++++++-
OpenSim/Region/Environment/Scenes/Scene.cs | 2 +
OpenSim/Region/Environment/Scenes/SceneObject.cs | 3 +-
OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 +-
.../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +-
OpenSim/Region/Physics/Manager/PhysicsActor.cs | 2 +-
OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 4 +-
OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | 2 +-
15 files changed, 273 insertions(+), 67 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Capabilities/Caps.cs b/OpenSim/Region/Capabilities/Caps.cs
index 70d601f..6206f65 100644
--- a/OpenSim/Region/Capabilities/Caps.cs
+++ b/OpenSim/Region/Capabilities/Caps.cs
@@ -73,6 +73,7 @@ namespace OpenSim.Region.Capabilities
Console.WriteLine("registering CAPS handlers");
string capsBase = "/CAPS/" + m_capsObjectPath;
+
AddLegacyCapsHandler( httpListener, m_mapLayerPath, MapLayer);
//httpListener.AddStreamHandler(
@@ -82,6 +83,7 @@ namespace OpenSim.Region.Capabilities
AddLegacyCapsHandler(httpListener, m_newInventory, NewAgentInventory);
AddLegacyCapsHandler( httpListener, eventQueue, ProcessEventQueue);
AddLegacyCapsHandler( httpListener, m_requestTexture, RequestTexture);
+
}
public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq)
@@ -153,6 +155,20 @@ namespace OpenSim.Region.Capabilities
///
///
///
+ ///
+ protected LLSDMapLayer BuildLLSDMapLayerResponse()
+ {
+ LLSDMapLayer mapLayer = new LLSDMapLayer();
+ mapLayer.Right = 5000;
+ mapLayer.Top = 5000;
+ mapLayer.ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
+
+ return mapLayer;
+ }
+
+ ///
+ ///
+ ///
///
///
///
@@ -166,17 +182,10 @@ namespace OpenSim.Region.Capabilities
///
///
///
+ ///
+ ///
+ ///
///
- protected LLSDMapLayer BuildLLSDMapLayerResponse()
- {
- LLSDMapLayer mapLayer = new LLSDMapLayer();
- mapLayer.Right = 5000;
- mapLayer.Top = 5000;
- mapLayer.ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
-
- return mapLayer;
- }
-
public string ProcessEventQueue(string request, string path, string param)
{
string res = "";
@@ -196,6 +205,12 @@ namespace OpenSim.Region.Capabilities
return res;
}
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
public string CreateEstablishAgentComms(string caps, string ipAddressPort)
{
LLSDCapEvent eventItem = new LLSDCapEvent();
@@ -209,6 +224,10 @@ namespace OpenSim.Region.Capabilities
return res;
}
+ ///
+ ///
+ ///
+ ///
public string CreateEmptyEventResponse()
{
LLSDCapEvent eventItem = new LLSDCapEvent();
@@ -219,6 +238,13 @@ namespace OpenSim.Region.Capabilities
return res;
}
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
public string NewAgentInventory(string request, string path, string param)
{
//Console.WriteLine("received upload request:"+ request);
@@ -241,6 +267,12 @@ namespace OpenSim.Region.Capabilities
return res;
}
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
public void UploadHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data)
{
// Console.WriteLine("upload handler called");
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 6de6af6..9e7117f 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -29,7 +29,7 @@ using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
-using Axiom.MathLib;
+using Axiom.Math;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Console;
@@ -63,7 +63,9 @@ namespace OpenSim.Region.ClientStack
public event UpdatePrimFlags OnUpdatePrimFlags;
public event UpdatePrimTexture OnUpdatePrimTexture;
public event UpdateVector OnUpdatePrimPosition;
+ public event UpdateVector OnUpdatePrimSinglePosition;
public event UpdatePrimRotation OnUpdatePrimRotation;
+ public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
public event UpdatePrimGroupRotation OnUpdatePrimGroupRotation;
public event UpdateVector OnUpdatePrimScale;
public event StatusChange OnChildAgentStatus;
diff --git a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
index 0b6c4f6..5cea28a 100644
--- a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
+++ b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ClientStack
protected bool MultipleObjUpdate(ClientView simClient, Packet packet)
{
MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet;
- // Console.WriteLine("new multi update packet " + multipleupdate.ToString());
+ //System.Console.WriteLine("new multi update packet " + multipleupdate.ToString());
for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
{
#region position
@@ -116,30 +116,31 @@ namespace OpenSim.Region.ClientStack
}
else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
{
- if (OnUpdatePrimPosition != null)
+ if (OnUpdatePrimSinglePosition != null)
{
- // libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
- //OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
+ libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
+ // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
+ OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
}
}
#endregion position
#region rotation
else if (multipleupdate.ObjectData[i].Type == 2)// single item of group rotation from tab
{
- if (OnUpdatePrimRotation != null)
+ if (OnUpdatePrimSingleRotation != null)
{
LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
- OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
+ OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
}
}
else if (multipleupdate.ObjectData[i].Type == 3)// single item of group rotation from mouse
{
- if (OnUpdatePrimRotation != null)
+ if (OnUpdatePrimSingleRotation != null)
{
libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
- OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
+ OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
}
}
else if (multipleupdate.ObjectData[i].Type == 10)//group rotation from object tab
@@ -182,7 +183,7 @@ namespace OpenSim.Region.ClientStack
// OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
}
}
- else if (multipleupdate.ObjectData[i].Type == 5)//single scale from object tab
+ else if (multipleupdate.ObjectData[i].Type == 5)//single prim scale from object tab
{
if (OnUpdatePrimScale != null)
{
@@ -191,7 +192,7 @@ namespace OpenSim.Region.ClientStack
OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
}
}
- else if (multipleupdate.ObjectData[i].Type == 21)//single scale from mouse
+ else if (multipleupdate.ObjectData[i].Type == 21)//single prim scale from mouse
{
if (OnUpdatePrimScale != null)
{
diff --git a/OpenSim/Region/Environment/OpenSim.Region.Environment.csproj b/OpenSim/Region/Environment/OpenSim.Region.Environment.csproj
index 9e9405e..f5724dd 100644
--- a/OpenSim/Region/Environment/OpenSim.Region.Environment.csproj
+++ b/OpenSim/Region/Environment/OpenSim.Region.Environment.csproj
@@ -1,4 +1,4 @@
-
+
Local
8.0.50727
@@ -6,7 +6,8 @@
{DCBA491C-0000-0000-0000-000000000000}
Debug
AnyCPU
-
+
+
OpenSim.Region.Environment
@@ -15,9 +16,11 @@
IE50
false
Library
-
+
+
OpenSim.Region.Environment
-
+
+
@@ -28,7 +31,8 @@
TRACE;DEBUG
-
+
+
True
4096
False
@@ -37,7 +41,8 @@
False
False
4
-
+
+
False
@@ -46,7 +51,8 @@
TRACE
-
+
+
False
4096
True
@@ -55,34 +61,36 @@
False
False
4
-
+
+
-
+
..\..\..\bin\Axiom.MathLib.dll
False
-
+
..\..\..\bin\Db4objects.Db4o.dll
False
-
+
..\..\..\bin\libsecondlife.dll
False
-
+
Microsoft.JScript.dll
False
-
+
System.dll
False
-
+
+
System.Xml.dll
False
-
+
..\..\..\bin\XMLRPC.dll
False
@@ -92,55 +100,55 @@
OpenSim.Framework
{8ACA2445-0000-0000-0000-000000000000}
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
+ False
OpenSim.Framework.Communications
{CB52B7E7-0000-0000-0000-000000000000}
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
+ False
OpenSim.Framework.Console
{A7CD0630-0000-0000-0000-000000000000}
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
+ False
OpenSim.Framework.GenericConfig.Xml
{C74E4A30-0000-0000-0000-000000000000}
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
+ False
OpenSim.Framework.Servers
{2CC71860-0000-0000-0000-000000000000}
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
+ False
OpenSim.Region.Caches
{61FCCDB3-0000-0000-0000-000000000000}
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
+ False
OpenSim.Region.Capabilities
{39038E85-0000-0000-0000-000000000000}
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
+ False
OpenSim.Region.Physics.Manager
{F4FF31EB-0000-0000-0000-000000000000}
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
+ False
OpenSim.Region.Terrain.BasicTerrain
{C9E0F891-0000-0000-0000-000000000000}
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
+ False
@@ -215,4 +223,4 @@
-
+
\ No newline at end of file
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs
index 2874ae2..99ca021 100644
--- a/OpenSim/Region/Environment/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs
@@ -1,5 +1,5 @@
using System.Collections.Generic;
-using Axiom.MathLib;
+using Axiom.Math;
using libsecondlife;
namespace OpenSim.Region.Environment.Scenes
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs
index 803bd28..24dc115 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive.cs
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
-using Axiom.MathLib;
+using Axiom.Math;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Interfaces;
@@ -45,6 +45,7 @@ namespace OpenSim.Region.Environment.Scenes
public bool isRootPrim;
public EntityBase m_Parent;
+ #region Properties
public override LLVector3 Pos
{
get
@@ -69,6 +70,22 @@ namespace OpenSim.Region.Environment.Scenes
}
+ public LLVector3 WorldPos
+ {
+ get
+ {
+ if (!this.isRootPrim)
+ {
+ Primitive parentPrim = (Primitive)this.m_Parent;
+ return this.m_pos + parentPrim.WorldPos;
+ }
+ else
+ {
+ return this.Pos;
+ }
+ }
+ }
+
public string Description
{
get
@@ -92,7 +109,9 @@ namespace OpenSim.Region.Environment.Scenes
return this.m_Shape.Scale;
}
}
+ #endregion
+ #region Constructors
public Primitive(ulong regionHandle, Scene world, ObjectAddPacket addPacket, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, SceneObject rootObject)
{
m_regionHandle = regionHandle;
@@ -102,9 +121,11 @@ namespace OpenSim.Region.Environment.Scenes
this.isRootPrim = isRoot;
this.m_RootParent = rootObject;
this.CreateFromPacket(addPacket, ownerID, localID);
- this.rotation = Axiom.MathLib.Quaternion.Identity;
+ this.rotation = Axiom.Math.Quaternion.Identity;
}
+ #endregion
+ #region Override from EntityBase
///
///
///
@@ -126,7 +147,9 @@ namespace OpenSim.Region.Environment.Scenes
child.update();
}
}
+ #endregion
+ #region Setup
///
///
///
@@ -169,7 +192,9 @@ namespace OpenSim.Region.Environment.Scenes
this.updateFlag = 1;
}
+ #endregion
+ #region Linking / unlinking
///
///
///
@@ -196,28 +221,49 @@ namespace OpenSim.Region.Environment.Scenes
this.isRootPrim = false;
this.m_Parent = newParent;
this.ParentID = newParent.LocalId;
- this.SetRootParent(rootParent);
+ this.m_RootParent = rootParent;
+ this.m_RootParent.AddChildToList(this);
this.Pos = oldPos;
- Axiom.MathLib.Vector3 axPos = new Axiom.MathLib.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z);
+ Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z);
axPos = this.m_Parent.rotation.Inverse() * axPos;
this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
this.rotation = this.rotation * this.m_Parent.rotation.Inverse();
this.updateFlag = 1;
+ foreach (Primitive child in children)
+ {
+ child.SetRootParent(rootParent, newParent, oldPos);
+ }
+ children.Clear();
+
+
}
///
///
///
///
- public void SetRootParent(SceneObject newRoot)
+ public void SetRootParent(SceneObject newRoot , Primitive newParent, LLVector3 oldParentPosition)
{
+ LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z);
+ oldPos += oldParentPosition;
+ this.isRootPrim = false;
+ this.m_Parent = newParent;
+ this.ParentID = newParent.LocalId;
+ newParent.AddToChildrenList(this);
this.m_RootParent = newRoot;
this.m_RootParent.AddChildToList(this);
+ this.Pos = oldPos;
+ Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z);
+ axPos = this.m_Parent.rotation.Inverse() * axPos;
+ this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
+ this.rotation = this.rotation * this.m_Parent.rotation.Inverse();
+ this.updateFlag = 1;
foreach (Primitive child in children)
{
- child.SetRootParent(newRoot);
+ child.SetRootParent(newRoot, newParent, oldPos);
}
+ children.Clear();
}
public void AddOffsetToChildren(LLVector3 offset)
@@ -229,6 +275,12 @@ namespace OpenSim.Region.Environment.Scenes
}
}
+ public void AddToChildrenList(Primitive prim)
+ {
+ this.children.Add(prim);
+ }
+ #endregion
+
#region Resizing/Scale
public void ResizeGoup(LLVector3 scale)
{
@@ -252,6 +304,7 @@ namespace OpenSim.Region.Environment.Scenes
}
#endregion
+ #region Position
///
///
///
@@ -264,19 +317,73 @@ namespace OpenSim.Region.Environment.Scenes
this.updateFlag = 2;
}
+ public void UpdateSinglePosition(LLVector3 pos)
+ {
+ //Console.WriteLine("updating single prim position");
+ if (this.isRootPrim)
+ {
+ LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
+ LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z);
+ LLVector3 diff = oldPos - newPos;
+ Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z);
+ axDiff = this.rotation.Inverse() * axDiff;
+ diff.X = axDiff.x;
+ diff.Y = axDiff.y;
+ diff.Z = axDiff.z;
+ this.Pos = newPos;
+
+ foreach (Primitive prim in this.children)
+ {
+ prim.m_pos += diff;
+ prim.updateFlag = 2;
+ }
+ this.updateFlag = 2;
+ }
+ else
+ {
+ LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
+ this.m_pos = newPos;
+ this.updateFlag = 2;
+ }
+ }
+
+ #endregion
+
+ #region Rotation
public void UpdateRotation(LLQuaternion rot)
{
- this.rotation = new Axiom.MathLib.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
+ this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
+ this.updateFlag = 2;
+ }
+
+ public void UpdateSingleRotation(LLQuaternion rot)
+ {
+ Axiom.Math.Quaternion axRot = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
+ Axiom.Math.Quaternion oldParentRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z);
+ this.rotation = axRot;
+ foreach (Primitive prim in this.children)
+ {
+ Axiom.Math.Vector3 axPos = new Vector3(prim.m_pos.X, prim.m_pos.Y, prim.m_pos.Z);
+ axPos = oldParentRot * axPos;
+ axPos = axRot.Inverse() * axPos;
+ prim.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
+ prim.rotation = prim.rotation * oldParentRot;
+ prim.rotation = prim.rotation * axRot.Inverse();
+ prim.updateFlag = 2;
+ }
this.updateFlag = 2;
}
public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot)
{
- this.rotation = new Axiom.MathLib.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
+ this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
this.Pos = pos;
this.updateFlag = 2;
}
+ #endregion
+
+ #region Shape
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock)
{
this.m_Shape.PathBegin = shapeBlock.PathBegin;
@@ -299,6 +406,7 @@ namespace OpenSim.Region.Environment.Scenes
this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin;
this.updateFlag = 1;
}
+ #endregion
#region Client Update Methods
diff --git a/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs b/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs
index 4213a18..247ff87 100644
--- a/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs
+++ b/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs
@@ -29,7 +29,7 @@
using System;
using System.Collections.Generic;
using System.Text;
-using Axiom.MathLib;
+using Axiom.Math;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Interfaces;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 0927903..b3d9d15 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void SimChat(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
{
- Console.WriteLine("Chat message");
+ // Console.WriteLine("Chat message");
ScenePresence avatar = null;
foreach (IClientAPI client in m_clientThreads.Values)
{
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Scenes
avatar = this.Avatars[client.AgentId];
// int dis = Util.fast_distance2d((int)(client.ClientAvatar.Pos.X - simClient.ClientAvatar.Pos.X), (int)(client.ClientAvatar.Pos.Y - simClient.ClientAvatar.Pos.Y));
dis= (int)avatar.Pos.GetDistanceTo(fromPos);
- Console.WriteLine("found avatar at " +dis);
+ //Console.WriteLine("found avatar at " +dis);
}
@@ -314,13 +314,27 @@ namespace OpenSim.Region.Environment.Scenes
public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
{
+ Primitive prim = null;
+ foreach (EntityBase ent in Entities.Values)
+ {
+ if (ent is SceneObject)
+ {
+ prim = ((SceneObject)ent).HasChildPrim(objectID);
+ if (prim != null)
+ {
+ ((SceneObject)ent).GrapMovement(offset, pos, remoteClient);
+ break;
+ }
+ }
+ }
+ /*
if (this.Entities.ContainsKey(objectID))
{
if (this.Entities[objectID] is SceneObject)
{
((SceneObject)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient);
}
- }
+ }*/
}
///
@@ -368,6 +382,23 @@ namespace OpenSim.Region.Environment.Scenes
}
}
+ public void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient)
+ {
+ Primitive prim = null;
+ foreach (EntityBase ent in Entities.Values)
+ {
+ if (ent is SceneObject)
+ {
+ prim = ((SceneObject)ent).HasChildPrim(localID);
+ if (prim != null)
+ {
+ prim.UpdateSinglePosition(pos);
+ break;
+ }
+ }
+ }
+ }
+
///
///
///
@@ -419,6 +450,29 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
+ ///
+ ///
+ public void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient)
+ {
+ Primitive prim = null;
+ foreach (EntityBase ent in Entities.Values)
+ {
+ if (ent is SceneObject)
+ {
+ prim = ((SceneObject)ent).HasChildPrim(localID);
+ if (prim != null)
+ {
+ prim.UpdateSingleRotation(rot);
+ break;
+ }
+ }
+ }
+ }
+
+ ///
+ ///
+ ///
+ ///
///
///
public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 838d722..0797566 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -453,8 +453,10 @@ namespace OpenSim.Region.Environment.Scenes
client.OnRequestWearables += this.InformClientOfNeighbours;
client.OnAddPrim += this.AddNewPrim;
client.OnUpdatePrimPosition += this.UpdatePrimPosition;
+ client.OnUpdatePrimSinglePosition += this.UpdatePrimSinglePosition;
client.OnUpdatePrimRotation += this.UpdatePrimRotation;
client.OnUpdatePrimGroupRotation += this.UpdatePrimRotation;
+ client.OnUpdatePrimSingleRotation += this.UpdatePrimSingleRotation;
client.OnUpdatePrimScale += this.UpdatePrimScale;
client.OnUpdatePrimShape += this.UpdatePrimShape;
client.OnRequestMapBlocks += this.RequestMapBlocks;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs
index 9a46fbf..00d7c63 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObject.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs
@@ -178,8 +178,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void GrapMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
{
- //this.Pos = pos;
- this.rootPrimitive.Pos = pos;
+ this.rootPrimitive.Pos = pos ;
this.rootPrimitive.SendTerseUpdateForAllChildren(remoteClient);
}
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 98fa2ed..14b7b2f 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -28,7 +28,7 @@
using System;
using System.Collections.Generic;
using System.IO;
-using Axiom.MathLib;
+using Axiom.Math;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Console;
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index 393796f..f133045 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -26,7 +26,7 @@
*
*/
using System.Collections.Generic;
-using Axiom.MathLib;
+using Axiom.Math;
using OpenSim.Physics.Manager;
namespace OpenSim.Region.Physics.BasicPhysicsPlugin
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index 8c286e0..da3b560 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-using Axiom.MathLib;
+using Axiom.Math;
namespace OpenSim.Physics.Manager
{
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index b85c052..2780188 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -27,7 +27,7 @@
*/
using System;
using System.Collections.Generic;
-using Axiom.MathLib;
+using Axiom.Math;
using Ode.NET;
using OpenSim.Physics.Manager;
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Physics.OdePlugin
Quaternion q1 =Quaternion.FromAngleAxis(1.5707f, new Vector3(1,0,0));
Quaternion q2 =Quaternion.FromAngleAxis(1.5707f, new Vector3(0,1,0));
- //Axiom.MathLib.Quaternion q3 = Axiom.MathLib.Quaternion.FromAngleAxis(3.14f, new Axiom.MathLib.Vector3(0, 0, 1));
+ //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1));
q1 = q1 * q2;
//q1 = q1 * q3;
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
index a75e5c7..4c82549 100644
--- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
@@ -29,7 +29,7 @@ using System;
using System.Collections.Generic;
using OpenSim.Physics.Manager;
using PhysXWrapper;
-using Quaternion=Axiom.MathLib.Quaternion;
+using Quaternion=Axiom.Math.Quaternion;
namespace OpenSim.Region.Physics.PhysXPlugin
{
--
cgit v1.1