diff options
author | MW | 2007-07-04 19:07:27 +0000 |
---|---|---|
committer | MW | 2007-07-04 19:07:27 +0000 |
commit | beb3073bec9438a439e13eaec40a8320a9279adc (patch) | |
tree | 04ad41c83427605d910a0d4ed2cfa560a30a8066 /OpenSim | |
parent | * re-fixed the utf-16 bug in xmlRpcResponse serialization (diff) | |
download | opensim-SC-beb3073bec9438a439e13eaec40a8320a9279adc.zip opensim-SC-beb3073bec9438a439e13eaec40a8320a9279adc.tar.gz opensim-SC-beb3073bec9438a439e13eaec40a8320a9279adc.tar.bz2 opensim-SC-beb3073bec9438a439e13eaec40a8320a9279adc.tar.xz |
A bit more work on Building tools/support.
updated Axiom.MathLib.dll.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/General/Interfaces/IClientAPI.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Capabilities/Caps.cs | 52 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/Environment/OpenSim.Region.Environment.csproj | 58 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/EntityBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Primitive.cs | 124 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/PrimitiveOld.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 60 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObject.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | 2 |
16 files changed, 276 insertions, 67 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index c3291c4..2c7e143 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs | |||
@@ -56,6 +56,7 @@ namespace OpenSim.Framework.Interfaces | |||
56 | public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient); | 56 | public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient); |
57 | public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient); | 57 | public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient); |
58 | public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); | 58 | public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); |
59 | public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); | ||
59 | public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient); | 60 | public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient); |
60 | public delegate void StatusChange(bool status); | 61 | public delegate void StatusChange(bool status); |
61 | public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status); | 62 | public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status); |
@@ -100,7 +101,9 @@ namespace OpenSim.Framework.Interfaces | |||
100 | event UpdatePrimFlags OnUpdatePrimFlags; | 101 | event UpdatePrimFlags OnUpdatePrimFlags; |
101 | event UpdatePrimTexture OnUpdatePrimTexture; | 102 | event UpdatePrimTexture OnUpdatePrimTexture; |
102 | event UpdateVector OnUpdatePrimPosition; | 103 | event UpdateVector OnUpdatePrimPosition; |
104 | event UpdateVector OnUpdatePrimSinglePosition; | ||
103 | event UpdatePrimRotation OnUpdatePrimRotation; | 105 | event UpdatePrimRotation OnUpdatePrimRotation; |
106 | event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; | ||
104 | event UpdatePrimGroupRotation OnUpdatePrimGroupRotation; | 107 | event UpdatePrimGroupRotation OnUpdatePrimGroupRotation; |
105 | event UpdateVector OnUpdatePrimScale; | 108 | event UpdateVector OnUpdatePrimScale; |
106 | event StatusChange OnChildAgentStatus; | 109 | event StatusChange OnChildAgentStatus; |
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 | |||
73 | Console.WriteLine("registering CAPS handlers"); | 73 | Console.WriteLine("registering CAPS handlers"); |
74 | string capsBase = "/CAPS/" + m_capsObjectPath; | 74 | string capsBase = "/CAPS/" + m_capsObjectPath; |
75 | 75 | ||
76 | |||
76 | AddLegacyCapsHandler( httpListener, m_mapLayerPath, MapLayer); | 77 | AddLegacyCapsHandler( httpListener, m_mapLayerPath, MapLayer); |
77 | 78 | ||
78 | //httpListener.AddStreamHandler( | 79 | //httpListener.AddStreamHandler( |
@@ -82,6 +83,7 @@ namespace OpenSim.Region.Capabilities | |||
82 | AddLegacyCapsHandler(httpListener, m_newInventory, NewAgentInventory); | 83 | AddLegacyCapsHandler(httpListener, m_newInventory, NewAgentInventory); |
83 | AddLegacyCapsHandler( httpListener, eventQueue, ProcessEventQueue); | 84 | AddLegacyCapsHandler( httpListener, eventQueue, ProcessEventQueue); |
84 | AddLegacyCapsHandler( httpListener, m_requestTexture, RequestTexture); | 85 | AddLegacyCapsHandler( httpListener, m_requestTexture, RequestTexture); |
86 | |||
85 | } | 87 | } |
86 | 88 | ||
87 | public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq) | 89 | public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq) |
@@ -153,6 +155,20 @@ namespace OpenSim.Region.Capabilities | |||
153 | /// <summary> | 155 | /// <summary> |
154 | /// | 156 | /// |
155 | /// </summary> | 157 | /// </summary> |
158 | /// <returns></returns> | ||
159 | protected LLSDMapLayer BuildLLSDMapLayerResponse() | ||
160 | { | ||
161 | LLSDMapLayer mapLayer = new LLSDMapLayer(); | ||
162 | mapLayer.Right = 5000; | ||
163 | mapLayer.Top = 5000; | ||
164 | mapLayer.ImageID = new LLUUID("00000000-0000-0000-9999-000000000006"); | ||
165 | |||
166 | return mapLayer; | ||
167 | } | ||
168 | |||
169 | /// <summary> | ||
170 | /// | ||
171 | /// </summary> | ||
156 | /// <param name="request"></param> | 172 | /// <param name="request"></param> |
157 | /// <param name="path"></param> | 173 | /// <param name="path"></param> |
158 | /// <param name="param"></param> | 174 | /// <param name="param"></param> |
@@ -166,17 +182,10 @@ namespace OpenSim.Region.Capabilities | |||
166 | /// <summary> | 182 | /// <summary> |
167 | /// | 183 | /// |
168 | /// </summary> | 184 | /// </summary> |
185 | /// <param name="request"></param> | ||
186 | /// <param name="path"></param> | ||
187 | /// <param name="param"></param> | ||
169 | /// <returns></returns> | 188 | /// <returns></returns> |
170 | protected LLSDMapLayer BuildLLSDMapLayerResponse() | ||
171 | { | ||
172 | LLSDMapLayer mapLayer = new LLSDMapLayer(); | ||
173 | mapLayer.Right = 5000; | ||
174 | mapLayer.Top = 5000; | ||
175 | mapLayer.ImageID = new LLUUID("00000000-0000-0000-9999-000000000006"); | ||
176 | |||
177 | return mapLayer; | ||
178 | } | ||
179 | |||
180 | public string ProcessEventQueue(string request, string path, string param) | 189 | public string ProcessEventQueue(string request, string path, string param) |
181 | { | 190 | { |
182 | string res = ""; | 191 | string res = ""; |
@@ -196,6 +205,12 @@ namespace OpenSim.Region.Capabilities | |||
196 | return res; | 205 | return res; |
197 | } | 206 | } |
198 | 207 | ||
208 | /// <summary> | ||
209 | /// | ||
210 | /// </summary> | ||
211 | /// <param name="caps"></param> | ||
212 | /// <param name="ipAddressPort"></param> | ||
213 | /// <returns></returns> | ||
199 | public string CreateEstablishAgentComms(string caps, string ipAddressPort) | 214 | public string CreateEstablishAgentComms(string caps, string ipAddressPort) |
200 | { | 215 | { |
201 | LLSDCapEvent eventItem = new LLSDCapEvent(); | 216 | LLSDCapEvent eventItem = new LLSDCapEvent(); |
@@ -209,6 +224,10 @@ namespace OpenSim.Region.Capabilities | |||
209 | return res; | 224 | return res; |
210 | } | 225 | } |
211 | 226 | ||
227 | /// <summary> | ||
228 | /// | ||
229 | /// </summary> | ||
230 | /// <returns></returns> | ||
212 | public string CreateEmptyEventResponse() | 231 | public string CreateEmptyEventResponse() |
213 | { | 232 | { |
214 | LLSDCapEvent eventItem = new LLSDCapEvent(); | 233 | LLSDCapEvent eventItem = new LLSDCapEvent(); |
@@ -219,6 +238,13 @@ namespace OpenSim.Region.Capabilities | |||
219 | return res; | 238 | return res; |
220 | } | 239 | } |
221 | 240 | ||
241 | /// <summary> | ||
242 | /// | ||
243 | /// </summary> | ||
244 | /// <param name="request"></param> | ||
245 | /// <param name="path"></param> | ||
246 | /// <param name="param"></param> | ||
247 | /// <returns></returns> | ||
222 | public string NewAgentInventory(string request, string path, string param) | 248 | public string NewAgentInventory(string request, string path, string param) |
223 | { | 249 | { |
224 | //Console.WriteLine("received upload request:"+ request); | 250 | //Console.WriteLine("received upload request:"+ request); |
@@ -241,6 +267,12 @@ namespace OpenSim.Region.Capabilities | |||
241 | return res; | 267 | return res; |
242 | } | 268 | } |
243 | 269 | ||
270 | /// <summary> | ||
271 | /// | ||
272 | /// </summary> | ||
273 | /// <param name="assetID"></param> | ||
274 | /// <param name="inventoryItem"></param> | ||
275 | /// <param name="data"></param> | ||
244 | public void UploadHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data) | 276 | public void UploadHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data) |
245 | { | 277 | { |
246 | // Console.WriteLine("upload handler called"); | 278 | // 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; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Text; | 31 | using System.Text; |
32 | using Axiom.MathLib; | 32 | using Axiom.Math; |
33 | using libsecondlife; | 33 | using libsecondlife; |
34 | using libsecondlife.Packets; | 34 | using libsecondlife.Packets; |
35 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
@@ -63,7 +63,9 @@ namespace OpenSim.Region.ClientStack | |||
63 | public event UpdatePrimFlags OnUpdatePrimFlags; | 63 | public event UpdatePrimFlags OnUpdatePrimFlags; |
64 | public event UpdatePrimTexture OnUpdatePrimTexture; | 64 | public event UpdatePrimTexture OnUpdatePrimTexture; |
65 | public event UpdateVector OnUpdatePrimPosition; | 65 | public event UpdateVector OnUpdatePrimPosition; |
66 | public event UpdateVector OnUpdatePrimSinglePosition; | ||
66 | public event UpdatePrimRotation OnUpdatePrimRotation; | 67 | public event UpdatePrimRotation OnUpdatePrimRotation; |
68 | public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; | ||
67 | public event UpdatePrimGroupRotation OnUpdatePrimGroupRotation; | 69 | public event UpdatePrimGroupRotation OnUpdatePrimGroupRotation; |
68 | public event UpdateVector OnUpdatePrimScale; | 70 | public event UpdateVector OnUpdatePrimScale; |
69 | public event StatusChange OnChildAgentStatus; | 71 | 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 | |||
101 | protected bool MultipleObjUpdate(ClientView simClient, Packet packet) | 101 | protected bool MultipleObjUpdate(ClientView simClient, Packet packet) |
102 | { | 102 | { |
103 | MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; | 103 | MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; |
104 | // Console.WriteLine("new multi update packet " + multipleupdate.ToString()); | 104 | //System.Console.WriteLine("new multi update packet " + multipleupdate.ToString()); |
105 | for (int i = 0; i < multipleupdate.ObjectData.Length; i++) | 105 | for (int i = 0; i < multipleupdate.ObjectData.Length; i++) |
106 | { | 106 | { |
107 | #region position | 107 | #region position |
@@ -116,30 +116,31 @@ namespace OpenSim.Region.ClientStack | |||
116 | } | 116 | } |
117 | else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position | 117 | else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position |
118 | { | 118 | { |
119 | if (OnUpdatePrimPosition != null) | 119 | if (OnUpdatePrimSinglePosition != null) |
120 | { | 120 | { |
121 | // libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); | 121 | libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); |
122 | //OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); | 122 | // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); |
123 | OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); | ||
123 | } | 124 | } |
124 | } | 125 | } |
125 | #endregion position | 126 | #endregion position |
126 | #region rotation | 127 | #region rotation |
127 | else if (multipleupdate.ObjectData[i].Type == 2)// single item of group rotation from tab | 128 | else if (multipleupdate.ObjectData[i].Type == 2)// single item of group rotation from tab |
128 | { | 129 | { |
129 | if (OnUpdatePrimRotation != null) | 130 | if (OnUpdatePrimSingleRotation != null) |
130 | { | 131 | { |
131 | LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); | 132 | LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); |
132 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 133 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
133 | OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); | 134 | OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); |
134 | } | 135 | } |
135 | } | 136 | } |
136 | else if (multipleupdate.ObjectData[i].Type == 3)// single item of group rotation from mouse | 137 | else if (multipleupdate.ObjectData[i].Type == 3)// single item of group rotation from mouse |
137 | { | 138 | { |
138 | if (OnUpdatePrimRotation != null) | 139 | if (OnUpdatePrimSingleRotation != null) |
139 | { | 140 | { |
140 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); | 141 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); |
141 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 142 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
142 | OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); | 143 | OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); |
143 | } | 144 | } |
144 | } | 145 | } |
145 | else if (multipleupdate.ObjectData[i].Type == 10)//group rotation from object tab | 146 | else if (multipleupdate.ObjectData[i].Type == 10)//group rotation from object tab |
@@ -182,7 +183,7 @@ namespace OpenSim.Region.ClientStack | |||
182 | // OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); | 183 | // OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); |
183 | } | 184 | } |
184 | } | 185 | } |
185 | else if (multipleupdate.ObjectData[i].Type == 5)//single scale from object tab | 186 | else if (multipleupdate.ObjectData[i].Type == 5)//single prim scale from object tab |
186 | { | 187 | { |
187 | if (OnUpdatePrimScale != null) | 188 | if (OnUpdatePrimScale != null) |
188 | { | 189 | { |
@@ -191,7 +192,7 @@ namespace OpenSim.Region.ClientStack | |||
191 | OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); | 192 | OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); |
192 | } | 193 | } |
193 | } | 194 | } |
194 | else if (multipleupdate.ObjectData[i].Type == 21)//single scale from mouse | 195 | else if (multipleupdate.ObjectData[i].Type == 21)//single prim scale from mouse |
195 | { | 196 | { |
196 | if (OnUpdatePrimScale != null) | 197 | if (OnUpdatePrimScale != null) |
197 | { | 198 | { |
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 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
2 | <PropertyGroup> | 2 | <PropertyGroup> |
3 | <ProjectType>Local</ProjectType> | 3 | <ProjectType>Local</ProjectType> |
4 | <ProductVersion>8.0.50727</ProductVersion> | 4 | <ProductVersion>8.0.50727</ProductVersion> |
@@ -6,7 +6,8 @@ | |||
6 | <ProjectGuid>{DCBA491C-0000-0000-0000-000000000000}</ProjectGuid> | 6 | <ProjectGuid>{DCBA491C-0000-0000-0000-000000000000}</ProjectGuid> |
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | 7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | 8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
9 | <ApplicationIcon></ApplicationIcon> | 9 | <ApplicationIcon> |
10 | </ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | 11 | <AssemblyKeyContainerName> |
11 | </AssemblyKeyContainerName> | 12 | </AssemblyKeyContainerName> |
12 | <AssemblyName>OpenSim.Region.Environment</AssemblyName> | 13 | <AssemblyName>OpenSim.Region.Environment</AssemblyName> |
@@ -15,9 +16,11 @@ | |||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | 16 | <DefaultTargetSchema>IE50</DefaultTargetSchema> |
16 | <DelaySign>false</DelaySign> | 17 | <DelaySign>false</DelaySign> |
17 | <OutputType>Library</OutputType> | 18 | <OutputType>Library</OutputType> |
18 | <AppDesignerFolder></AppDesignerFolder> | 19 | <AppDesignerFolder> |
20 | </AppDesignerFolder> | ||
19 | <RootNamespace>OpenSim.Region.Environment</RootNamespace> | 21 | <RootNamespace>OpenSim.Region.Environment</RootNamespace> |
20 | <StartupObject></StartupObject> | 22 | <StartupObject> |
23 | </StartupObject> | ||
21 | <FileUpgradeFlags> | 24 | <FileUpgradeFlags> |
22 | </FileUpgradeFlags> | 25 | </FileUpgradeFlags> |
23 | </PropertyGroup> | 26 | </PropertyGroup> |
@@ -28,7 +31,8 @@ | |||
28 | <ConfigurationOverrideFile> | 31 | <ConfigurationOverrideFile> |
29 | </ConfigurationOverrideFile> | 32 | </ConfigurationOverrideFile> |
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | 33 | <DefineConstants>TRACE;DEBUG</DefineConstants> |
31 | <DocumentationFile></DocumentationFile> | 34 | <DocumentationFile> |
35 | </DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | 36 | <DebugSymbols>True</DebugSymbols> |
33 | <FileAlignment>4096</FileAlignment> | 37 | <FileAlignment>4096</FileAlignment> |
34 | <Optimize>False</Optimize> | 38 | <Optimize>False</Optimize> |
@@ -37,7 +41,8 @@ | |||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 41 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 42 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
39 | <WarningLevel>4</WarningLevel> | 43 | <WarningLevel>4</WarningLevel> |
40 | <NoWarn></NoWarn> | 44 | <NoWarn> |
45 | </NoWarn> | ||
41 | </PropertyGroup> | 46 | </PropertyGroup> |
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | 47 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | 48 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
@@ -46,7 +51,8 @@ | |||
46 | <ConfigurationOverrideFile> | 51 | <ConfigurationOverrideFile> |
47 | </ConfigurationOverrideFile> | 52 | </ConfigurationOverrideFile> |
48 | <DefineConstants>TRACE</DefineConstants> | 53 | <DefineConstants>TRACE</DefineConstants> |
49 | <DocumentationFile></DocumentationFile> | 54 | <DocumentationFile> |
55 | </DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | 56 | <DebugSymbols>False</DebugSymbols> |
51 | <FileAlignment>4096</FileAlignment> | 57 | <FileAlignment>4096</FileAlignment> |
52 | <Optimize>True</Optimize> | 58 | <Optimize>True</Optimize> |
@@ -55,34 +61,36 @@ | |||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 61 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 62 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
57 | <WarningLevel>4</WarningLevel> | 63 | <WarningLevel>4</WarningLevel> |
58 | <NoWarn></NoWarn> | 64 | <NoWarn> |
65 | </NoWarn> | ||
59 | </PropertyGroup> | 66 | </PropertyGroup> |
60 | <ItemGroup> | 67 | <ItemGroup> |
61 | <Reference Include="Axiom.MathLib.dll" > | 68 | <Reference Include="Axiom.MathLib.dll"> |
62 | <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath> | 69 | <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath> |
63 | <Private>False</Private> | 70 | <Private>False</Private> |
64 | </Reference> | 71 | </Reference> |
65 | <Reference Include="Db4objects.Db4o.dll" > | 72 | <Reference Include="Db4objects.Db4o.dll"> |
66 | <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath> | 73 | <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath> |
67 | <Private>False</Private> | 74 | <Private>False</Private> |
68 | </Reference> | 75 | </Reference> |
69 | <Reference Include="libsecondlife.dll" > | 76 | <Reference Include="libsecondlife.dll"> |
70 | <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> | 77 | <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> |
71 | <Private>False</Private> | 78 | <Private>False</Private> |
72 | </Reference> | 79 | </Reference> |
73 | <Reference Include="Microsoft.JScript" > | 80 | <Reference Include="Microsoft.JScript"> |
74 | <HintPath>Microsoft.JScript.dll</HintPath> | 81 | <HintPath>Microsoft.JScript.dll</HintPath> |
75 | <Private>False</Private> | 82 | <Private>False</Private> |
76 | </Reference> | 83 | </Reference> |
77 | <Reference Include="System" > | 84 | <Reference Include="System"> |
78 | <HintPath>System.dll</HintPath> | 85 | <HintPath>System.dll</HintPath> |
79 | <Private>False</Private> | 86 | <Private>False</Private> |
80 | </Reference> | 87 | </Reference> |
81 | <Reference Include="System.Xml" > | 88 | <Reference Include="System.Data" /> |
89 | <Reference Include="System.Xml"> | ||
82 | <HintPath>System.Xml.dll</HintPath> | 90 | <HintPath>System.Xml.dll</HintPath> |
83 | <Private>False</Private> | 91 | <Private>False</Private> |
84 | </Reference> | 92 | </Reference> |
85 | <Reference Include="XMLRPC.dll" > | 93 | <Reference Include="XMLRPC.dll"> |
86 | <HintPath>..\..\..\bin\XMLRPC.dll</HintPath> | 94 | <HintPath>..\..\..\bin\XMLRPC.dll</HintPath> |
87 | <Private>False</Private> | 95 | <Private>False</Private> |
88 | </Reference> | 96 | </Reference> |
@@ -92,55 +100,55 @@ | |||
92 | <Name>OpenSim.Framework</Name> | 100 | <Name>OpenSim.Framework</Name> |
93 | <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> | 101 | <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> |
94 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 102 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
95 | <Private>False</Private> | 103 | <Private>False</Private> |
96 | </ProjectReference> | 104 | </ProjectReference> |
97 | <ProjectReference Include="..\..\Framework\Communications\OpenSim.Framework.Communications.csproj"> | 105 | <ProjectReference Include="..\..\Framework\Communications\OpenSim.Framework.Communications.csproj"> |
98 | <Name>OpenSim.Framework.Communications</Name> | 106 | <Name>OpenSim.Framework.Communications</Name> |
99 | <Project>{CB52B7E7-0000-0000-0000-000000000000}</Project> | 107 | <Project>{CB52B7E7-0000-0000-0000-000000000000}</Project> |
100 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 108 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
101 | <Private>False</Private> | 109 | <Private>False</Private> |
102 | </ProjectReference> | 110 | </ProjectReference> |
103 | <ProjectReference Include="..\..\Framework\Console\OpenSim.Framework.Console.csproj"> | 111 | <ProjectReference Include="..\..\Framework\Console\OpenSim.Framework.Console.csproj"> |
104 | <Name>OpenSim.Framework.Console</Name> | 112 | <Name>OpenSim.Framework.Console</Name> |
105 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> | 113 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> |
106 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 114 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
107 | <Private>False</Private> | 115 | <Private>False</Private> |
108 | </ProjectReference> | 116 | </ProjectReference> |
109 | <ProjectReference Include="..\..\Framework\GenericConfig\Xml\OpenSim.Framework.GenericConfig.Xml.csproj"> | 117 | <ProjectReference Include="..\..\Framework\GenericConfig\Xml\OpenSim.Framework.GenericConfig.Xml.csproj"> |
110 | <Name>OpenSim.Framework.GenericConfig.Xml</Name> | 118 | <Name>OpenSim.Framework.GenericConfig.Xml</Name> |
111 | <Project>{C74E4A30-0000-0000-0000-000000000000}</Project> | 119 | <Project>{C74E4A30-0000-0000-0000-000000000000}</Project> |
112 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 120 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
113 | <Private>False</Private> | 121 | <Private>False</Private> |
114 | </ProjectReference> | 122 | </ProjectReference> |
115 | <ProjectReference Include="..\..\Framework\Servers\OpenSim.Framework.Servers.csproj"> | 123 | <ProjectReference Include="..\..\Framework\Servers\OpenSim.Framework.Servers.csproj"> |
116 | <Name>OpenSim.Framework.Servers</Name> | 124 | <Name>OpenSim.Framework.Servers</Name> |
117 | <Project>{2CC71860-0000-0000-0000-000000000000}</Project> | 125 | <Project>{2CC71860-0000-0000-0000-000000000000}</Project> |
118 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 126 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
119 | <Private>False</Private> | 127 | <Private>False</Private> |
120 | </ProjectReference> | 128 | </ProjectReference> |
121 | <ProjectReference Include="..\Caches\OpenSim.Region.Caches.csproj"> | 129 | <ProjectReference Include="..\Caches\OpenSim.Region.Caches.csproj"> |
122 | <Name>OpenSim.Region.Caches</Name> | 130 | <Name>OpenSim.Region.Caches</Name> |
123 | <Project>{61FCCDB3-0000-0000-0000-000000000000}</Project> | 131 | <Project>{61FCCDB3-0000-0000-0000-000000000000}</Project> |
124 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 132 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
125 | <Private>False</Private> | 133 | <Private>False</Private> |
126 | </ProjectReference> | 134 | </ProjectReference> |
127 | <ProjectReference Include="..\Capabilities\OpenSim.Region.Capabilities.csproj"> | 135 | <ProjectReference Include="..\Capabilities\OpenSim.Region.Capabilities.csproj"> |
128 | <Name>OpenSim.Region.Capabilities</Name> | 136 | <Name>OpenSim.Region.Capabilities</Name> |
129 | <Project>{39038E85-0000-0000-0000-000000000000}</Project> | 137 | <Project>{39038E85-0000-0000-0000-000000000000}</Project> |
130 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 138 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
131 | <Private>False</Private> | 139 | <Private>False</Private> |
132 | </ProjectReference> | 140 | </ProjectReference> |
133 | <ProjectReference Include="..\Physics\Manager\OpenSim.Region.Physics.Manager.csproj"> | 141 | <ProjectReference Include="..\Physics\Manager\OpenSim.Region.Physics.Manager.csproj"> |
134 | <Name>OpenSim.Region.Physics.Manager</Name> | 142 | <Name>OpenSim.Region.Physics.Manager</Name> |
135 | <Project>{F4FF31EB-0000-0000-0000-000000000000}</Project> | 143 | <Project>{F4FF31EB-0000-0000-0000-000000000000}</Project> |
136 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 144 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
137 | <Private>False</Private> | 145 | <Private>False</Private> |
138 | </ProjectReference> | 146 | </ProjectReference> |
139 | <ProjectReference Include="..\Terrain.BasicTerrain\OpenSim.Region.Terrain.BasicTerrain.csproj"> | 147 | <ProjectReference Include="..\Terrain.BasicTerrain\OpenSim.Region.Terrain.BasicTerrain.csproj"> |
140 | <Name>OpenSim.Region.Terrain.BasicTerrain</Name> | 148 | <Name>OpenSim.Region.Terrain.BasicTerrain</Name> |
141 | <Project>{C9E0F891-0000-0000-0000-000000000000}</Project> | 149 | <Project>{C9E0F891-0000-0000-0000-000000000000}</Project> |
142 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 150 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
143 | <Private>False</Private> | 151 | <Private>False</Private> |
144 | </ProjectReference> | 152 | </ProjectReference> |
145 | </ItemGroup> | 153 | </ItemGroup> |
146 | <ItemGroup> | 154 | <ItemGroup> |
@@ -215,4 +223,4 @@ | |||
215 | <PostBuildEvent> | 223 | <PostBuildEvent> |
216 | </PostBuildEvent> | 224 | </PostBuildEvent> |
217 | </PropertyGroup> | 225 | </PropertyGroup> |
218 | </Project> | 226 | </Project> \ 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 @@ | |||
1 | using System.Collections.Generic; | 1 | using System.Collections.Generic; |
2 | using Axiom.MathLib; | 2 | using Axiom.Math; |
3 | using libsecondlife; | 3 | using libsecondlife; |
4 | 4 | ||
5 | namespace OpenSim.Region.Environment.Scenes | 5 | 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 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using Axiom.MathLib; | 3 | using Axiom.Math; |
4 | using libsecondlife; | 4 | using libsecondlife; |
5 | using libsecondlife.Packets; | 5 | using libsecondlife.Packets; |
6 | using OpenSim.Framework.Interfaces; | 6 | using OpenSim.Framework.Interfaces; |
@@ -45,6 +45,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
45 | public bool isRootPrim; | 45 | public bool isRootPrim; |
46 | public EntityBase m_Parent; | 46 | public EntityBase m_Parent; |
47 | 47 | ||
48 | #region Properties | ||
48 | public override LLVector3 Pos | 49 | public override LLVector3 Pos |
49 | { | 50 | { |
50 | get | 51 | get |
@@ -69,6 +70,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
69 | 70 | ||
70 | } | 71 | } |
71 | 72 | ||
73 | public LLVector3 WorldPos | ||
74 | { | ||
75 | get | ||
76 | { | ||
77 | if (!this.isRootPrim) | ||
78 | { | ||
79 | Primitive parentPrim = (Primitive)this.m_Parent; | ||
80 | return this.m_pos + parentPrim.WorldPos; | ||
81 | } | ||
82 | else | ||
83 | { | ||
84 | return this.Pos; | ||
85 | } | ||
86 | } | ||
87 | } | ||
88 | |||
72 | public string Description | 89 | public string Description |
73 | { | 90 | { |
74 | get | 91 | get |
@@ -92,7 +109,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
92 | return this.m_Shape.Scale; | 109 | return this.m_Shape.Scale; |
93 | } | 110 | } |
94 | } | 111 | } |
112 | #endregion | ||
95 | 113 | ||
114 | #region Constructors | ||
96 | public Primitive(ulong regionHandle, Scene world, ObjectAddPacket addPacket, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, SceneObject rootObject) | 115 | public Primitive(ulong regionHandle, Scene world, ObjectAddPacket addPacket, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, SceneObject rootObject) |
97 | { | 116 | { |
98 | m_regionHandle = regionHandle; | 117 | m_regionHandle = regionHandle; |
@@ -102,9 +121,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
102 | this.isRootPrim = isRoot; | 121 | this.isRootPrim = isRoot; |
103 | this.m_RootParent = rootObject; | 122 | this.m_RootParent = rootObject; |
104 | this.CreateFromPacket(addPacket, ownerID, localID); | 123 | this.CreateFromPacket(addPacket, ownerID, localID); |
105 | this.rotation = Axiom.MathLib.Quaternion.Identity; | 124 | this.rotation = Axiom.Math.Quaternion.Identity; |
106 | } | 125 | } |
126 | #endregion | ||
107 | 127 | ||
128 | #region Override from EntityBase | ||
108 | /// <summary> | 129 | /// <summary> |
109 | /// | 130 | /// |
110 | /// </summary> | 131 | /// </summary> |
@@ -126,7 +147,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
126 | child.update(); | 147 | child.update(); |
127 | } | 148 | } |
128 | } | 149 | } |
150 | #endregion | ||
129 | 151 | ||
152 | #region Setup | ||
130 | /// <summary> | 153 | /// <summary> |
131 | /// | 154 | /// |
132 | /// </summary> | 155 | /// </summary> |
@@ -169,7 +192,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
169 | 192 | ||
170 | this.updateFlag = 1; | 193 | this.updateFlag = 1; |
171 | } | 194 | } |
195 | #endregion | ||
172 | 196 | ||
197 | #region Linking / unlinking | ||
173 | /// <summary> | 198 | /// <summary> |
174 | /// | 199 | /// |
175 | /// </summary> | 200 | /// </summary> |
@@ -196,28 +221,49 @@ namespace OpenSim.Region.Environment.Scenes | |||
196 | this.isRootPrim = false; | 221 | this.isRootPrim = false; |
197 | this.m_Parent = newParent; | 222 | this.m_Parent = newParent; |
198 | this.ParentID = newParent.LocalId; | 223 | this.ParentID = newParent.LocalId; |
199 | this.SetRootParent(rootParent); | 224 | this.m_RootParent = rootParent; |
225 | this.m_RootParent.AddChildToList(this); | ||
200 | this.Pos = oldPos; | 226 | this.Pos = oldPos; |
201 | Axiom.MathLib.Vector3 axPos = new Axiom.MathLib.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); | 227 | Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); |
202 | axPos = this.m_Parent.rotation.Inverse() * axPos; | 228 | axPos = this.m_Parent.rotation.Inverse() * axPos; |
203 | this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); | 229 | this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); |
204 | this.rotation = this.rotation * this.m_Parent.rotation.Inverse(); | 230 | this.rotation = this.rotation * this.m_Parent.rotation.Inverse(); |
205 | this.updateFlag = 1; | 231 | this.updateFlag = 1; |
206 | 232 | ||
233 | foreach (Primitive child in children) | ||
234 | { | ||
235 | child.SetRootParent(rootParent, newParent, oldPos); | ||
236 | } | ||
237 | children.Clear(); | ||
238 | |||
239 | |||
207 | } | 240 | } |
208 | 241 | ||
209 | /// <summary> | 242 | /// <summary> |
210 | /// | 243 | /// |
211 | /// </summary> | 244 | /// </summary> |
212 | /// <param name="newRoot"></param> | 245 | /// <param name="newRoot"></param> |
213 | public void SetRootParent(SceneObject newRoot) | 246 | public void SetRootParent(SceneObject newRoot , Primitive newParent, LLVector3 oldParentPosition) |
214 | { | 247 | { |
248 | LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); | ||
249 | oldPos += oldParentPosition; | ||
250 | this.isRootPrim = false; | ||
251 | this.m_Parent = newParent; | ||
252 | this.ParentID = newParent.LocalId; | ||
253 | newParent.AddToChildrenList(this); | ||
215 | this.m_RootParent = newRoot; | 254 | this.m_RootParent = newRoot; |
216 | this.m_RootParent.AddChildToList(this); | 255 | this.m_RootParent.AddChildToList(this); |
256 | this.Pos = oldPos; | ||
257 | Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); | ||
258 | axPos = this.m_Parent.rotation.Inverse() * axPos; | ||
259 | this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); | ||
260 | this.rotation = this.rotation * this.m_Parent.rotation.Inverse(); | ||
261 | this.updateFlag = 1; | ||
217 | foreach (Primitive child in children) | 262 | foreach (Primitive child in children) |
218 | { | 263 | { |
219 | child.SetRootParent(newRoot); | 264 | child.SetRootParent(newRoot, newParent, oldPos); |
220 | } | 265 | } |
266 | children.Clear(); | ||
221 | } | 267 | } |
222 | 268 | ||
223 | public void AddOffsetToChildren(LLVector3 offset) | 269 | public void AddOffsetToChildren(LLVector3 offset) |
@@ -229,6 +275,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
229 | } | 275 | } |
230 | } | 276 | } |
231 | 277 | ||
278 | public void AddToChildrenList(Primitive prim) | ||
279 | { | ||
280 | this.children.Add(prim); | ||
281 | } | ||
282 | #endregion | ||
283 | |||
232 | #region Resizing/Scale | 284 | #region Resizing/Scale |
233 | public void ResizeGoup(LLVector3 scale) | 285 | public void ResizeGoup(LLVector3 scale) |
234 | { | 286 | { |
@@ -252,6 +304,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
252 | } | 304 | } |
253 | #endregion | 305 | #endregion |
254 | 306 | ||
307 | #region Position | ||
255 | /// <summary> | 308 | /// <summary> |
256 | /// | 309 | /// |
257 | /// </summary> | 310 | /// </summary> |
@@ -264,19 +317,73 @@ namespace OpenSim.Region.Environment.Scenes | |||
264 | this.updateFlag = 2; | 317 | this.updateFlag = 2; |
265 | } | 318 | } |
266 | 319 | ||
320 | public void UpdateSinglePosition(LLVector3 pos) | ||
321 | { | ||
322 | //Console.WriteLine("updating single prim position"); | ||
323 | if (this.isRootPrim) | ||
324 | { | ||
325 | LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); | ||
326 | LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); | ||
327 | LLVector3 diff = oldPos - newPos; | ||
328 | Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z); | ||
329 | axDiff = this.rotation.Inverse() * axDiff; | ||
330 | diff.X = axDiff.x; | ||
331 | diff.Y = axDiff.y; | ||
332 | diff.Z = axDiff.z; | ||
333 | this.Pos = newPos; | ||
334 | |||
335 | foreach (Primitive prim in this.children) | ||
336 | { | ||
337 | prim.m_pos += diff; | ||
338 | prim.updateFlag = 2; | ||
339 | } | ||
340 | this.updateFlag = 2; | ||
341 | } | ||
342 | else | ||
343 | { | ||
344 | LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); | ||
345 | this.m_pos = newPos; | ||
346 | this.updateFlag = 2; | ||
347 | } | ||
348 | } | ||
349 | |||
350 | #endregion | ||
351 | |||
352 | #region Rotation | ||
267 | public void UpdateRotation(LLQuaternion rot) | 353 | public void UpdateRotation(LLQuaternion rot) |
268 | { | 354 | { |
269 | this.rotation = new Axiom.MathLib.Quaternion(rot.W, rot.X, rot.Y, rot.Z); | 355 | this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); |
356 | this.updateFlag = 2; | ||
357 | } | ||
358 | |||
359 | public void UpdateSingleRotation(LLQuaternion rot) | ||
360 | { | ||
361 | Axiom.Math.Quaternion axRot = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); | ||
362 | Axiom.Math.Quaternion oldParentRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); | ||
363 | this.rotation = axRot; | ||
364 | foreach (Primitive prim in this.children) | ||
365 | { | ||
366 | Axiom.Math.Vector3 axPos = new Vector3(prim.m_pos.X, prim.m_pos.Y, prim.m_pos.Z); | ||
367 | axPos = oldParentRot * axPos; | ||
368 | axPos = axRot.Inverse() * axPos; | ||
369 | prim.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); | ||
370 | prim.rotation = prim.rotation * oldParentRot; | ||
371 | prim.rotation = prim.rotation * axRot.Inverse(); | ||
372 | prim.updateFlag = 2; | ||
373 | } | ||
270 | this.updateFlag = 2; | 374 | this.updateFlag = 2; |
271 | } | 375 | } |
272 | 376 | ||
273 | public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot) | 377 | public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot) |
274 | { | 378 | { |
275 | this.rotation = new Axiom.MathLib.Quaternion(rot.W, rot.X, rot.Y, rot.Z); | 379 | this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); |
276 | this.Pos = pos; | 380 | this.Pos = pos; |
277 | this.updateFlag = 2; | 381 | this.updateFlag = 2; |
278 | } | 382 | } |
279 | 383 | ||
384 | #endregion | ||
385 | |||
386 | #region Shape | ||
280 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock) | 387 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock) |
281 | { | 388 | { |
282 | this.m_Shape.PathBegin = shapeBlock.PathBegin; | 389 | this.m_Shape.PathBegin = shapeBlock.PathBegin; |
@@ -299,6 +406,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
299 | this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin; | 406 | this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin; |
300 | this.updateFlag = 1; | 407 | this.updateFlag = 1; |
301 | } | 408 | } |
409 | #endregion | ||
302 | 410 | ||
303 | #region Client Update Methods | 411 | #region Client Update Methods |
304 | 412 | ||
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 @@ | |||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | 31 | using System.Text; |
32 | using Axiom.MathLib; | 32 | using Axiom.Math; |
33 | using libsecondlife; | 33 | using libsecondlife; |
34 | using libsecondlife.Packets; | 34 | using libsecondlife.Packets; |
35 | using OpenSim.Framework.Interfaces; | 35 | 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 | |||
107 | /// <param name="fromAgentID"></param> | 107 | /// <param name="fromAgentID"></param> |
108 | public void SimChat(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) | 108 | public void SimChat(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) |
109 | { | 109 | { |
110 | Console.WriteLine("Chat message"); | 110 | // Console.WriteLine("Chat message"); |
111 | ScenePresence avatar = null; | 111 | ScenePresence avatar = null; |
112 | foreach (IClientAPI client in m_clientThreads.Values) | 112 | foreach (IClientAPI client in m_clientThreads.Values) |
113 | { | 113 | { |
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
118 | avatar = this.Avatars[client.AgentId]; | 118 | avatar = this.Avatars[client.AgentId]; |
119 | // int dis = Util.fast_distance2d((int)(client.ClientAvatar.Pos.X - simClient.ClientAvatar.Pos.X), (int)(client.ClientAvatar.Pos.Y - simClient.ClientAvatar.Pos.Y)); | 119 | // int dis = Util.fast_distance2d((int)(client.ClientAvatar.Pos.X - simClient.ClientAvatar.Pos.X), (int)(client.ClientAvatar.Pos.Y - simClient.ClientAvatar.Pos.Y)); |
120 | dis= (int)avatar.Pos.GetDistanceTo(fromPos); | 120 | dis= (int)avatar.Pos.GetDistanceTo(fromPos); |
121 | Console.WriteLine("found avatar at " +dis); | 121 | //Console.WriteLine("found avatar at " +dis); |
122 | 122 | ||
123 | } | 123 | } |
124 | 124 | ||
@@ -314,13 +314,27 @@ namespace OpenSim.Region.Environment.Scenes | |||
314 | 314 | ||
315 | public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) | 315 | public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) |
316 | { | 316 | { |
317 | Primitive prim = null; | ||
318 | foreach (EntityBase ent in Entities.Values) | ||
319 | { | ||
320 | if (ent is SceneObject) | ||
321 | { | ||
322 | prim = ((SceneObject)ent).HasChildPrim(objectID); | ||
323 | if (prim != null) | ||
324 | { | ||
325 | ((SceneObject)ent).GrapMovement(offset, pos, remoteClient); | ||
326 | break; | ||
327 | } | ||
328 | } | ||
329 | } | ||
330 | /* | ||
317 | if (this.Entities.ContainsKey(objectID)) | 331 | if (this.Entities.ContainsKey(objectID)) |
318 | { | 332 | { |
319 | if (this.Entities[objectID] is SceneObject) | 333 | if (this.Entities[objectID] is SceneObject) |
320 | { | 334 | { |
321 | ((SceneObject)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient); | 335 | ((SceneObject)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient); |
322 | } | 336 | } |
323 | } | 337 | }*/ |
324 | } | 338 | } |
325 | 339 | ||
326 | /// <summary> | 340 | /// <summary> |
@@ -368,6 +382,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
368 | } | 382 | } |
369 | } | 383 | } |
370 | 384 | ||
385 | public void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) | ||
386 | { | ||
387 | Primitive prim = null; | ||
388 | foreach (EntityBase ent in Entities.Values) | ||
389 | { | ||
390 | if (ent is SceneObject) | ||
391 | { | ||
392 | prim = ((SceneObject)ent).HasChildPrim(localID); | ||
393 | if (prim != null) | ||
394 | { | ||
395 | prim.UpdateSinglePosition(pos); | ||
396 | break; | ||
397 | } | ||
398 | } | ||
399 | } | ||
400 | } | ||
401 | |||
371 | /// <summary> | 402 | /// <summary> |
372 | /// | 403 | /// |
373 | /// </summary> | 404 | /// </summary> |
@@ -419,6 +450,29 @@ namespace OpenSim.Region.Environment.Scenes | |||
419 | /// | 450 | /// |
420 | /// </summary> | 451 | /// </summary> |
421 | /// <param name="localID"></param> | 452 | /// <param name="localID"></param> |
453 | /// <param name="rot"></param> | ||
454 | /// <param name="remoteClient"></param> | ||
455 | public void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) | ||
456 | { | ||
457 | Primitive prim = null; | ||
458 | foreach (EntityBase ent in Entities.Values) | ||
459 | { | ||
460 | if (ent is SceneObject) | ||
461 | { | ||
462 | prim = ((SceneObject)ent).HasChildPrim(localID); | ||
463 | if (prim != null) | ||
464 | { | ||
465 | prim.UpdateSingleRotation(rot); | ||
466 | break; | ||
467 | } | ||
468 | } | ||
469 | } | ||
470 | } | ||
471 | |||
472 | /// <summary> | ||
473 | /// | ||
474 | /// </summary> | ||
475 | /// <param name="localID"></param> | ||
422 | /// <param name="scale"></param> | 476 | /// <param name="scale"></param> |
423 | /// <param name="remoteClient"></param> | 477 | /// <param name="remoteClient"></param> |
424 | public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient) | 478 | 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 | |||
453 | client.OnRequestWearables += this.InformClientOfNeighbours; | 453 | client.OnRequestWearables += this.InformClientOfNeighbours; |
454 | client.OnAddPrim += this.AddNewPrim; | 454 | client.OnAddPrim += this.AddNewPrim; |
455 | client.OnUpdatePrimPosition += this.UpdatePrimPosition; | 455 | client.OnUpdatePrimPosition += this.UpdatePrimPosition; |
456 | client.OnUpdatePrimSinglePosition += this.UpdatePrimSinglePosition; | ||
456 | client.OnUpdatePrimRotation += this.UpdatePrimRotation; | 457 | client.OnUpdatePrimRotation += this.UpdatePrimRotation; |
457 | client.OnUpdatePrimGroupRotation += this.UpdatePrimRotation; | 458 | client.OnUpdatePrimGroupRotation += this.UpdatePrimRotation; |
459 | client.OnUpdatePrimSingleRotation += this.UpdatePrimSingleRotation; | ||
458 | client.OnUpdatePrimScale += this.UpdatePrimScale; | 460 | client.OnUpdatePrimScale += this.UpdatePrimScale; |
459 | client.OnUpdatePrimShape += this.UpdatePrimShape; | 461 | client.OnUpdatePrimShape += this.UpdatePrimShape; |
460 | client.OnRequestMapBlocks += this.RequestMapBlocks; | 462 | 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 | |||
178 | /// <param name="remoteClient"></param> | 178 | /// <param name="remoteClient"></param> |
179 | public void GrapMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) | 179 | public void GrapMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) |
180 | { | 180 | { |
181 | //this.Pos = pos; | 181 | this.rootPrimitive.Pos = pos ; |
182 | this.rootPrimitive.Pos = pos; | ||
183 | this.rootPrimitive.SendTerseUpdateForAllChildren(remoteClient); | 182 | this.rootPrimitive.SendTerseUpdateForAllChildren(remoteClient); |
184 | } | 183 | } |
185 | 184 | ||
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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | 30 | using System.IO; |
31 | using Axiom.MathLib; | 31 | using Axiom.Math; |
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using libsecondlife.Packets; | 33 | using libsecondlife.Packets; |
34 | using OpenSim.Framework.Console; | 34 | 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 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using Axiom.MathLib; | 29 | using Axiom.Math; |
30 | using OpenSim.Physics.Manager; | 30 | using OpenSim.Physics.Manager; |
31 | 31 | ||
32 | namespace OpenSim.Region.Physics.BasicPhysicsPlugin | 32 | 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 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using Axiom.MathLib; | 28 | using Axiom.Math; |
29 | 29 | ||
30 | namespace OpenSim.Physics.Manager | 30 | namespace OpenSim.Physics.Manager |
31 | { | 31 | { |
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 @@ | |||
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using Axiom.MathLib; | 30 | using Axiom.Math; |
31 | using Ode.NET; | 31 | using Ode.NET; |
32 | using OpenSim.Physics.Manager; | 32 | using OpenSim.Physics.Manager; |
33 | 33 | ||
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
197 | 197 | ||
198 | Quaternion q1 =Quaternion.FromAngleAxis(1.5707f, new Vector3(1,0,0)); | 198 | Quaternion q1 =Quaternion.FromAngleAxis(1.5707f, new Vector3(1,0,0)); |
199 | Quaternion q2 =Quaternion.FromAngleAxis(1.5707f, new Vector3(0,1,0)); | 199 | Quaternion q2 =Quaternion.FromAngleAxis(1.5707f, new Vector3(0,1,0)); |
200 | //Axiom.MathLib.Quaternion q3 = Axiom.MathLib.Quaternion.FromAngleAxis(3.14f, new Axiom.MathLib.Vector3(0, 0, 1)); | 200 | //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1)); |
201 | 201 | ||
202 | q1 = q1 * q2; | 202 | q1 = q1 * q2; |
203 | //q1 = q1 * q3; | 203 | //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; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using OpenSim.Physics.Manager; | 30 | using OpenSim.Physics.Manager; |
31 | using PhysXWrapper; | 31 | using PhysXWrapper; |
32 | using Quaternion=Axiom.MathLib.Quaternion; | 32 | using Quaternion=Axiom.Math.Quaternion; |
33 | 33 | ||
34 | namespace OpenSim.Region.Physics.PhysXPlugin | 34 | namespace OpenSim.Region.Physics.PhysXPlugin |
35 | { | 35 | { |