From 3384f643ebbc377ecbaae885941a08484bf259f5 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Thu, 14 Oct 2010 02:19:42 -0400 Subject: * Partially complete stuff for Mesh support that Melanie wanted to see before it was done. * Shouldn't break the build. * Doesn't work yet either. --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 452df38..ba8c194 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -1474,7 +1474,8 @@ namespace OpenSim.Framework.Servers.HttpServer if (!(contentType.Contains("image") || contentType.Contains("x-shockwave-flash") - || contentType.Contains("application/x-oar"))) + || contentType.Contains("application/x-oar") + || contentType.Contains("application/vnd.ll.mesh"))) { // Text buffer = Encoding.UTF8.GetBytes(responseString); -- cgit v1.1 From 6ac6ca057d087c7563ab1660881011d711f30911 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 14 Oct 2010 07:28:20 +0100 Subject: Kill some magic numbers in the caps module --- OpenSim/Framework/Capabilities/Caps.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index 6f32adf..72283de 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs @@ -962,10 +962,10 @@ namespace OpenSim.Framework.Capabilities item.AssetType = assType; item.InvType = inType; item.Folder = parentFolder; - item.CurrentPermissions = 2147483647; - item.BasePermissions = 2147483647; + item.CurrentPermissions = (uint)PermissionMask.All; + item.BasePermissions = (uint)PermissionMask.All; item.EveryOnePermissions = 0; - item.NextPermissions = 2147483647; + item.NextPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer); item.CreationDate = Util.UnixTimeSinceEpoch(); if (AddNewInventoryItem != null) -- cgit v1.1 From 7e363b79c7894b8c393ec38ae60ea19f8cb65d5e Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Thu, 14 Oct 2010 09:24:15 -0400 Subject: * Tweaked the upload response and now at least uploading the mesh works. * Binary error on downloading the mesh though.. so still not yet working. --- OpenSim/Framework/Capabilities/LLSDAssetUploadResponse.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Capabilities/LLSDAssetUploadResponse.cs b/OpenSim/Framework/Capabilities/LLSDAssetUploadResponse.cs index 08f14e3..0d6f7f9 100644 --- a/OpenSim/Framework/Capabilities/LLSDAssetUploadResponse.cs +++ b/OpenSim/Framework/Capabilities/LLSDAssetUploadResponse.cs @@ -39,4 +39,18 @@ namespace OpenSim.Framework.Capabilities { } } + + [OSDMap] + public class LLSDNewFileAngentInventoryVariablePriceReplyResponse + { + public int resource_cost; + public string state; + public int upload_price; + public string rsvp; + + public LLSDNewFileAngentInventoryVariablePriceReplyResponse() + { + state = "confirm_upload"; + } + } } \ No newline at end of file -- cgit v1.1 From dd1058e6b3f6e922712a4acd5744ef3ff0b9170d Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 15 Oct 2010 09:01:20 -0400 Subject: Adding projected light filters to prim propeties Requires the LL Mesh Beta viewer Signed-off-by: Teravus Ovares (Dan Olivares) --- OpenSim/Framework/PrimitiveBaseShape.cs | 80 +++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 0a81363..ff7eaef 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -136,6 +136,13 @@ namespace OpenSim.Framework [XmlIgnore] private bool _lightEntry; [XmlIgnore] private bool _sculptEntry; + // Light Projection Filter + [XmlIgnore] private bool _projectionEntry; + [XmlIgnore] private UUID _projectionTextureID; + [XmlIgnore] private float _projectionFOV; + [XmlIgnore] private float _projectionFocus; + [XmlIgnore] private float _projectionAmb; + public byte ProfileCurve { get { return (byte)((byte)HollowShape | (byte)ProfileShape); } @@ -800,6 +807,7 @@ namespace OpenSim.Framework ushort FlexiEP = 0x10; ushort LightEP = 0x20; ushort SculptEP = 0x30; + ushort ProjectionEP = 0x40; int i = 0; uint TotalBytesLength = 1; // ExtraParamsNum @@ -823,6 +831,12 @@ namespace OpenSim.Framework TotalBytesLength += 17;// data TotalBytesLength += 2 + 4; // type } + if (_projectionEntry) + { + ExtraParamsNum++; + TotalBytesLength += 28;// data + TotalBytesLength += 2 + 4;// type + } byte[] returnbytes = new byte[TotalBytesLength]; @@ -874,7 +888,19 @@ namespace OpenSim.Framework Array.Copy(SculptData, 0, returnbytes, i, SculptData.Length); i += SculptData.Length; } + if (_projectionEntry) + { + byte[] ProjectionData = GetProjectionBytes(); + returnbytes[i++] = (byte)(ProjectionEP % 256); + returnbytes[i++] = (byte)((ProjectionEP >> 8) % 256); + returnbytes[i++] = (byte)((ProjectionData.Length) % 256); + returnbytes[i++] = (byte)((ProjectionData.Length >> 16) % 256); + returnbytes[i++] = (byte)((ProjectionData.Length >> 20) % 256); + returnbytes[i++] = (byte)((ProjectionData.Length >> 24) % 256); + Array.Copy(ProjectionData, 0, returnbytes, i, ProjectionData.Length); + i += ProjectionData.Length; + } if (!_flexiEntry && !_lightEntry && !_sculptEntry) { byte[] returnbyte = new byte[1]; @@ -893,6 +919,7 @@ namespace OpenSim.Framework const ushort FlexiEP = 0x10; const ushort LightEP = 0x20; const ushort SculptEP = 0x30; + const ushort ProjectionEP = 0x40; switch (type) { @@ -922,6 +949,14 @@ namespace OpenSim.Framework } ReadSculptData(data, 0); break; + case ProjectionEP: + if (!inUse) + { + _projectionEntry = false; + return; + } + ReadProjectionData(data, 0); + break; } } @@ -933,10 +968,12 @@ namespace OpenSim.Framework const ushort FlexiEP = 0x10; const ushort LightEP = 0x20; const ushort SculptEP = 0x30; + const ushort ProjectionEP = 0x40; bool lGotFlexi = false; bool lGotLight = false; bool lGotSculpt = false; + bool lGotFilter = false; int i = 0; byte extraParamCount = 0; @@ -973,6 +1010,11 @@ namespace OpenSim.Framework i += 17; lGotSculpt = true; break; + case ProjectionEP: + ReadProjectionData(data, i); + i += 28; + lGotFilter = true; + break; } } @@ -982,6 +1024,8 @@ namespace OpenSim.Framework _lightEntry = false; if (!lGotSculpt) _sculptEntry = false; + if (!lGotFilter) + _projectionEntry = false; } @@ -1121,6 +1165,42 @@ namespace OpenSim.Framework return data; } + public void ReadProjectionData(byte[] data, int pos) + { + byte[] ProjectionTextureUUID = new byte[16]; + + if (data.Length - pos >= 28) + { + _projectionEntry = true; + Array.Copy(data, pos, ProjectionTextureUUID,0, 16); + _projectionTextureID = new UUID(ProjectionTextureUUID, 0); + + _projectionFocus = Utils.BytesToFloat(data, pos + 16); + _projectionFOV = Utils.BytesToFloat(data, pos + 20); + _projectionAmb = Utils.BytesToFloat(data, pos + 24); + } + else + { + _projectionEntry = false; + _projectionTextureID = UUID.Zero; + _projectionFocus = 0f; + _projectionFOV = 0f; + _projectionAmb = 0f; + } + } + + public byte[] GetProjectionBytes() + { + byte[] data = new byte[28]; + + _projectionTextureID.GetBytes().CopyTo(data, 0); + Utils.FloatToBytes(_projectionFocus).CopyTo(data, 16); + Utils.FloatToBytes(_projectionFOV).CopyTo(data, 20); + Utils.FloatToBytes(_projectionAmb).CopyTo(data, 24); + + return data; + } + /// /// Creates a OpenMetaverse.Primitive and populates it with converted PrimitiveBaseShape values -- cgit v1.1 From 9e421868e3685990b040dc7202fc5cc9d51ca48d Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sat, 16 Oct 2010 05:03:01 -0400 Subject: Add missing check for !_projectionEntry Signed-off-by: Teravus Ovares (Dan Olivares) --- OpenSim/Framework/PrimitiveBaseShape.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index ff7eaef..c5eb40b 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -901,7 +901,7 @@ namespace OpenSim.Framework Array.Copy(ProjectionData, 0, returnbytes, i, ProjectionData.Length); i += ProjectionData.Length; } - if (!_flexiEntry && !_lightEntry && !_sculptEntry) + if (!_flexiEntry && !_lightEntry && !_sculptEntry && !_projectionEntry) { byte[] returnbyte = new byte[1]; returnbyte[0] = 0; -- cgit v1.1 From 06b61b68c768b040894158199816bd11b0fd5f52 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sun, 17 Oct 2010 01:47:07 -0400 Subject: Adding osFunctions for light projection Set the projection parameters in the host prim ... osSetProjectionParam(bool Enabled, key TextureMaskUUID, float FOV, float Focus, float Ambiance); Set the projection parameters in a target prim ... osSetProjectionParam(ikey target uuid, bool Enabled, key TextureMaskUUID, float FOV, float Focus, float Ambiance); Threat Level very high Signed-off-by: Melanie --- OpenSim/Framework/PrimitiveBaseShape.cs | 55 ++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 5 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index c5eb40b..927415e 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -802,6 +802,51 @@ namespace OpenSim.Framework } } + public bool ProjectionEntry { + get { + return _projectionEntry; + } + set { + _projectionEntry = value; + } + } + + public UUID ProjectionTextureUUID { + get { + return _projectionTextureID; + } + set { + _projectionTextureID = value; + } + } + + public float ProjectionFOV { + get { + return _projectionFOV; + } + set { + _projectionFOV = value; + } + } + + public float ProjectionFocus { + get { + return _projectionFocus; + } + set { + _projectionFocus = value; + } + } + + public float ProjectionAmbiance { + get { + return _projectionAmb; + } + set { + _projectionAmb = value; + } + } + public byte[] ExtraParamsToBytes() { ushort FlexiEP = 0x10; @@ -1175,16 +1220,16 @@ namespace OpenSim.Framework Array.Copy(data, pos, ProjectionTextureUUID,0, 16); _projectionTextureID = new UUID(ProjectionTextureUUID, 0); - _projectionFocus = Utils.BytesToFloat(data, pos + 16); - _projectionFOV = Utils.BytesToFloat(data, pos + 20); + _projectionFOV = Utils.BytesToFloat(data, pos + 16); + _projectionFocus = Utils.BytesToFloat(data, pos + 20); _projectionAmb = Utils.BytesToFloat(data, pos + 24); } else { _projectionEntry = false; _projectionTextureID = UUID.Zero; - _projectionFocus = 0f; _projectionFOV = 0f; + _projectionFocus = 0f; _projectionAmb = 0f; } } @@ -1194,8 +1239,8 @@ namespace OpenSim.Framework byte[] data = new byte[28]; _projectionTextureID.GetBytes().CopyTo(data, 0); - Utils.FloatToBytes(_projectionFocus).CopyTo(data, 16); - Utils.FloatToBytes(_projectionFOV).CopyTo(data, 20); + Utils.FloatToBytes(_projectionFOV).CopyTo(data, 16); + Utils.FloatToBytes(_projectionFocus).CopyTo(data, 20); Utils.FloatToBytes(_projectionAmb).CopyTo(data, 24); return data; -- cgit v1.1