aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorMelanie2012-03-13 20:06:39 +0100
committerMelanie2012-03-13 20:06:39 +0100
commitf415eb84e17772a997e8b40ec2d7469cac40b55d (patch)
treeb3baee99bf46087c93802bf190ac55f877c43c2c /OpenSim/Region/ClientStack
parentEnsure child prims of a phantom prim are marked as phantom (diff)
downloadopensim-SC_OLD-f415eb84e17772a997e8b40ec2d7469cac40b55d.zip
opensim-SC_OLD-f415eb84e17772a997e8b40ec2d7469cac40b55d.tar.gz
opensim-SC_OLD-f415eb84e17772a997e8b40ec2d7469cac40b55d.tar.bz2
opensim-SC_OLD-f415eb84e17772a997e8b40ec2d7469cac40b55d.tar.xz
Implement the cap to send extra physics params to the viewer. Not functional
yet because the parameters are not actually stored anywhere yet.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 35cb575..2974058 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -96,6 +96,7 @@ namespace OpenSim.Region.ClientStack.Linden
96 // private static readonly string m_fetchInventoryPath = "0006/"; 96 // private static readonly string m_fetchInventoryPath = "0006/";
97 private static readonly string m_copyFromNotecardPath = "0007/"; 97 private static readonly string m_copyFromNotecardPath = "0007/";
98 // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. 98 // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule.
99 private static readonly string m_getObjectPhysicsDataPath = "0101/";
99 100
100 101
101 // These are callbacks which will be setup by the scene so that we can update scene data when we 102 // These are callbacks which will be setup by the scene so that we can update scene data when we
@@ -182,6 +183,8 @@ namespace OpenSim.Region.ClientStack.Linden
182 m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); 183 m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req);
183 m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); 184 m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req);
184 m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard)); 185 m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard));
186 IRequestHandler getObjectPhysicsDataHandler = new RestStreamHandler("POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData);
187 m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler);
185 188
186 // As of RC 1.22.9 of the Linden client this is 189 // As of RC 1.22.9 of the Linden client this is
187 // supported 190 // supported
@@ -799,6 +802,41 @@ namespace OpenSim.Region.ClientStack.Linden
799 response["int_response_code"] = 200; 802 response["int_response_code"] = 200;
800 return LLSDHelpers.SerialiseLLSDReply(response); 803 return LLSDHelpers.SerialiseLLSDReply(response);
801 } 804 }
805
806 public string GetObjectPhysicsData(string request, string path,
807 string param, IOSHttpRequest httpRequest,
808 IOSHttpResponse httpResponse)
809 {
810 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
811 OSDMap resp = new OSDMap();
812 OSDArray object_ids = (OSDArray)req["object_ids"];
813
814 for (int i = 0 ; i < object_ids.Count ; i++)
815 {
816 UUID uuid = object_ids[i].AsUUID();
817
818 SceneObjectPart obj = m_Scene.GetSceneObjectPart(uuid);
819 if (obj != null)
820 {
821 OSDMap object_data = new OSDMap();
822
823 object_data["PhysicsShapeType"] = OSD.FromInteger(1);
824 if (false) // Check whether to include the rest
825 {
826 object_data["Density"] = OSD.FromReal(1);
827 object_data["Friction"] = OSD.FromReal(1);
828 object_data["Restitution"] = OSD.FromReal(1);
829 object_data["GravityMultiplier"] = OSD.FromReal(1);
830 }
831
832 resp[uuid.ToString()] = object_data;
833 }
834 }
835
836 string response = OSDParser.SerializeLLSDXmlString(resp);
837 Console.WriteLine(response);
838 return response;
839 }
802 } 840 }
803 841
804 public class AssetUploader 842 public class AssetUploader