parent
5c32b33a66
commit
beb3073bec
85
OpenSim.sln
85
OpenSim.sln
|
@ -1,5 +1,5 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
# Visual C# Express 2005
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim", "OpenSim\Region\Application\OpenSim.csproj", "{438A9556-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework", "OpenSim\Framework\General\OpenSim.Framework.csproj", "{8ACA2445-0000-0000-0000-000000000000}"
|
||||
|
@ -57,89 +57,6 @@ Global
|
|||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectDependencies) = postSolution
|
||||
({438A9556-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).4 = ({CB52B7E7-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).6 = ({36B72A9B-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).7 = ({C74E4A30-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).8 = ({2CC71860-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).9 = ({586E2916-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).10 = ({61FCCDB3-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).11 = ({DC3698B2-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).12 = ({BFB5D807-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).13 = ({4806E378-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).14 = ({DCBA491C-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).15 = ({F4FF31EB-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).16 = ({C9E0F891-0000-0000-0000-000000000000})
|
||||
({8ACA2445-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({CB52B7E7-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({CB52B7E7-0000-0000-0000-000000000000}).2 = ({36B72A9B-0000-0000-0000-000000000000})
|
||||
({FD2D303D-0000-0000-0000-000000000000}).2 = ({36B72A9B-0000-0000-0000-000000000000})
|
||||
({C74E4A30-0000-0000-0000-000000000000}).0 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({2CC71860-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({2CC71860-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({586E2916-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({586E2916-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({586E2916-0000-0000-0000-000000000000}).4 = ({36B72A9B-0000-0000-0000-000000000000})
|
||||
({586E2916-0000-0000-0000-000000000000}).5 = ({C74E4A30-0000-0000-0000-000000000000})
|
||||
({586E2916-0000-0000-0000-000000000000}).6 = ({2CC71860-0000-0000-0000-000000000000})
|
||||
({61FCCDB3-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({39038E85-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({39038E85-0000-0000-0000-000000000000}).2 = ({2CC71860-0000-0000-0000-000000000000})
|
||||
({39038E85-0000-0000-0000-000000000000}).3 = ({61FCCDB3-0000-0000-0000-000000000000})
|
||||
({DC3698B2-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({DC3698B2-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({DC3698B2-0000-0000-0000-000000000000}).5 = ({2CC71860-0000-0000-0000-000000000000})
|
||||
({DC3698B2-0000-0000-0000-000000000000}).6 = ({61FCCDB3-0000-0000-0000-000000000000})
|
||||
({DC3698B2-0000-0000-0000-000000000000}).7 = ({F4FF31EB-0000-0000-0000-000000000000})
|
||||
({DC3698B2-0000-0000-0000-000000000000}).8 = ({C9E0F891-0000-0000-0000-000000000000})
|
||||
({BFB5D807-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({BFB5D807-0000-0000-0000-000000000000}).2 = ({CB52B7E7-0000-0000-0000-000000000000})
|
||||
({BFB5D807-0000-0000-0000-000000000000}).3 = ({36B72A9B-0000-0000-0000-000000000000})
|
||||
({BFB5D807-0000-0000-0000-000000000000}).4 = ({586E2916-0000-0000-0000-000000000000})
|
||||
({4806E378-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({4806E378-0000-0000-0000-000000000000}).2 = ({CB52B7E7-0000-0000-0000-000000000000})
|
||||
({4806E378-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({4806E378-0000-0000-0000-000000000000}).4 = ({36B72A9B-0000-0000-0000-000000000000})
|
||||
({4806E378-0000-0000-0000-000000000000}).5 = ({2CC71860-0000-0000-0000-000000000000})
|
||||
({DCBA491C-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({DCBA491C-0000-0000-0000-000000000000}).5 = ({CB52B7E7-0000-0000-0000-000000000000})
|
||||
({DCBA491C-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({DCBA491C-0000-0000-0000-000000000000}).7 = ({C74E4A30-0000-0000-0000-000000000000})
|
||||
({DCBA491C-0000-0000-0000-000000000000}).8 = ({2CC71860-0000-0000-0000-000000000000})
|
||||
({DCBA491C-0000-0000-0000-000000000000}).9 = ({61FCCDB3-0000-0000-0000-000000000000})
|
||||
({DCBA491C-0000-0000-0000-000000000000}).10 = ({39038E85-0000-0000-0000-000000000000})
|
||||
({DCBA491C-0000-0000-0000-000000000000}).11 = ({F4FF31EB-0000-0000-0000-000000000000})
|
||||
({DCBA491C-0000-0000-0000-000000000000}).12 = ({C9E0F891-0000-0000-0000-000000000000})
|
||||
({241A8CDD-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({241A8CDD-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({98C7B681-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({98C7B681-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({15B4FEF3-0000-0000-0000-000000000000}).1 = ({F4FF31EB-0000-0000-0000-000000000000})
|
||||
({F4FF31EB-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({F4FF31EB-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({90620634-0000-0000-0000-000000000000}).2 = ({F4FF31EB-0000-0000-0000-000000000000})
|
||||
({A6D191D8-0000-0000-0000-000000000000}).1 = ({F4FF31EB-0000-0000-0000-000000000000})
|
||||
({A4691E59-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({A4691E59-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({43DB702D-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({43DB702D-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({477B9270-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({477B9270-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).2 = ({CB52B7E7-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).4 = ({2CC71860-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).5 = ({586E2916-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).6 = ({61FCCDB3-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).7 = ({39038E85-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).8 = ({DC3698B2-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).9 = ({BFB5D807-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).10 = ({DCBA491C-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).11 = ({241A8CDD-0000-0000-0000-000000000000})
|
||||
({24B12448-0000-0000-0000-000000000000}).12 = ({F4FF31EB-0000-0000-0000-000000000000})
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
|
|
|
@ -56,6 +56,7 @@ namespace OpenSim.Framework.Interfaces
|
|||
public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
|
||||
public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient);
|
||||
public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
|
||||
public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
|
||||
public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient);
|
||||
public delegate void StatusChange(bool status);
|
||||
public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
|
||||
|
@ -100,7 +101,9 @@ namespace OpenSim.Framework.Interfaces
|
|||
event UpdatePrimFlags OnUpdatePrimFlags;
|
||||
event UpdatePrimTexture OnUpdatePrimTexture;
|
||||
event UpdateVector OnUpdatePrimPosition;
|
||||
event UpdateVector OnUpdatePrimSinglePosition;
|
||||
event UpdatePrimRotation OnUpdatePrimRotation;
|
||||
event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
|
||||
event UpdatePrimGroupRotation OnUpdatePrimGroupRotation;
|
||||
event UpdateVector OnUpdatePrimScale;
|
||||
event StatusChange OnChildAgentStatus;
|
||||
|
|
|
@ -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)
|
||||
|
@ -150,6 +152,20 @@ namespace OpenSim.Region.Capabilities
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected LLSDMapLayer BuildLLSDMapLayerResponse()
|
||||
{
|
||||
LLSDMapLayer mapLayer = new LLSDMapLayer();
|
||||
mapLayer.Right = 5000;
|
||||
mapLayer.Top = 5000;
|
||||
mapLayer.ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
|
||||
|
||||
return mapLayer;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -166,17 +182,10 @@ namespace OpenSim.Region.Capabilities
|
|||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="caps"></param>
|
||||
/// <param name="ipAddressPort"></param>
|
||||
/// <returns></returns>
|
||||
public string CreateEstablishAgentComms(string caps, string ipAddressPort)
|
||||
{
|
||||
LLSDCapEvent eventItem = new LLSDCapEvent();
|
||||
|
@ -209,6 +224,10 @@ namespace OpenSim.Region.Capabilities
|
|||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CreateEmptyEventResponse()
|
||||
{
|
||||
LLSDCapEvent eventItem = new LLSDCapEvent();
|
||||
|
@ -219,6 +238,13 @@ namespace OpenSim.Region.Capabilities
|
|||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="assetID"></param>
|
||||
/// <param name="inventoryItem"></param>
|
||||
/// <param name="data"></param>
|
||||
public void UploadHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data)
|
||||
{
|
||||
// Console.WriteLine("upload handler called");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
|
@ -6,7 +6,8 @@
|
|||
<ProjectGuid>{DCBA491C-0000-0000-0000-000000000000}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon></ApplicationIcon>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>OpenSim.Region.Environment</AssemblyName>
|
||||
|
@ -15,9 +16,11 @@
|
|||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder></AppDesignerFolder>
|
||||
<AppDesignerFolder>
|
||||
</AppDesignerFolder>
|
||||
<RootNamespace>OpenSim.Region.Environment</RootNamespace>
|
||||
<StartupObject></StartupObject>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
</PropertyGroup>
|
||||
|
@ -28,7 +31,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>False</Optimize>
|
||||
|
@ -37,7 +41,8 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
|
@ -46,7 +51,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
|
@ -55,34 +61,36 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Axiom.MathLib.dll" >
|
||||
<Reference Include="Axiom.MathLib.dll">
|
||||
<HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Db4objects.Db4o.dll" >
|
||||
<Reference Include="Db4objects.Db4o.dll">
|
||||
<HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="libsecondlife.dll" >
|
||||
<Reference Include="libsecondlife.dll">
|
||||
<HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.JScript" >
|
||||
<Reference Include="Microsoft.JScript">
|
||||
<HintPath>Microsoft.JScript.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" >
|
||||
<Reference Include="System">
|
||||
<HintPath>System.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" >
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml">
|
||||
<HintPath>System.Xml.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="XMLRPC.dll" >
|
||||
<Reference Include="XMLRPC.dll">
|
||||
<HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using Axiom.MathLib;
|
||||
using Axiom.Math;
|
||||
using libsecondlife;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes
|
||||
|
|
|
@ -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
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -126,7 +147,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
child.update();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Setup
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -169,7 +192,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
this.updateFlag = 1;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Linking / unlinking
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -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();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="newRoot"></param>
|
||||
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
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// <param name="fromAgentID"></param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -415,6 +446,29 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <param name="rot"></param>
|
||||
/// <param name="remoteClient"></param>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -178,8 +178,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// <param name="remoteClient"></param>
|
||||
public void GrapMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
|
||||
{
|
||||
//this.Pos = pos;
|
||||
this.rootPrimitive.Pos = pos;
|
||||
this.rootPrimitive.Pos = pos ;
|
||||
this.rootPrimitive.SendTerseUpdateForAllChildren(remoteClient);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
*
|
||||
*/
|
||||
using System.Collections.Generic;
|
||||
using Axiom.MathLib;
|
||||
using Axiom.Math;
|
||||
using OpenSim.Physics.Manager;
|
||||
|
||||
namespace OpenSim.Region.Physics.BasicPhysicsPlugin
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
using Axiom.MathLib;
|
||||
using Axiom.Math;
|
||||
|
||||
namespace OpenSim.Physics.Manager
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue