aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorlbsa712007-12-27 14:00:30 +0000
committerlbsa712007-12-27 14:00:30 +0000
commit87e2a694e200f5774f71d38041247912b5ccf98d (patch)
treee5669eb91e90e378442353242821ba3dad0f1ab2 /OpenSim/Framework
parent* Fixed the matching logic error on the LLQuat to axiom quat :P (diff)
downloadopensim-SC_OLD-87e2a694e200f5774f71d38041247912b5ccf98d.zip
opensim-SC_OLD-87e2a694e200f5774f71d38041247912b5ccf98d.tar.gz
opensim-SC_OLD-87e2a694e200f5774f71d38041247912b5ccf98d.tar.bz2
opensim-SC_OLD-87e2a694e200f5774f71d38041247912b5ccf98d.tar.xz
* AssetServerBase: _ProcessRequest is now called GetAsset
* PrimitiveBaseShape: The textures are now exposed as a 'TextureEntry Textures'; all serialization still using the 'byte[] TextureEntry' for backwards compatibility. * Scene: Re-added AddTree, since the Tree type isn't gone from libsl, merely relocated.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServer.cs2
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs8
-rw-r--r--OpenSim/Framework/Communications/Cache/GridAssetClient.cs2
-rw-r--r--OpenSim/Framework/Communications/Cache/SQLAssetServer.cs2
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLDataStore.cs5
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs42
6 files changed, 48 insertions, 13 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetServer.cs b/OpenSim/Framework/Communications/Cache/AssetServer.cs
index 4ad0f60..ae6494f 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServer.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServer.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Cache
72 } 72 }
73 } 73 }
74 74
75 protected override AssetBase _ProcessRequest(AssetRequest req) 75 protected override AssetBase GetAsset(AssetRequest req)
76 { 76 {
77 byte[] idata = null; 77 byte[] idata = null;
78 bool found = false; 78 bool found = false;
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index f5ebab7..43d3dd9 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -54,16 +54,16 @@ namespace OpenSim.Framework.Communications.Cache
54 /// </summary> 54 /// </summary>
55 /// <param name="req"></param> 55 /// <param name="req"></param>
56 /// <returns></returns> 56 /// <returns></returns>
57 protected abstract AssetBase _ProcessRequest(AssetRequest req); 57 protected abstract AssetBase GetAsset(AssetRequest req);
58 58
59 /// <summary> 59 /// <summary>
60 /// Process an asset request. This method will call _ProcessRequest(AssetRequest req) 60 /// Process an asset request. This method will call GetAsset(AssetRequest req)
61 /// on the subclass. 61 /// on the subclass.
62 /// </summary> 62 /// </summary>
63 /// <param name="req"></param> 63 /// <param name="req"></param>
64 protected void ProcessRequest(AssetRequest req) 64 protected virtual void ProcessRequest(AssetRequest req)
65 { 65 {
66 AssetBase asset = _ProcessRequest(req); 66 AssetBase asset = GetAsset(req);
67 67
68 if (asset != null) 68 if (asset != null)
69 { 69 {
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
index 5801aa8..9c460c7 100644
--- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
+++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Cache
47 47
48 #region IAssetServer Members 48 #region IAssetServer Members
49 49
50 protected override AssetBase _ProcessRequest(AssetRequest req) 50 protected override AssetBase GetAsset(AssetRequest req)
51 { 51 {
52 Stream s = null; 52 Stream s = null;
53 try 53 try
diff --git a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
index 4fa7684..7fcff10 100644
--- a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
+++ b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Framework.Communications.Cache
77 m_assetProviderPlugin.CommitAssets(); 77 m_assetProviderPlugin.CommitAssets();
78 } 78 }
79 79
80 protected override AssetBase _ProcessRequest(AssetRequest req) 80 protected override AssetBase GetAsset(AssetRequest req)
81 { 81 {
82 AssetBase asset; 82 AssetBase asset;
83 lock (syncLock) 83 lock (syncLock)
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
index 61b22a0..06a5814 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
@@ -916,7 +916,10 @@ namespace OpenSim.Framework.Data.MySQL
916 s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]); 916 s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]);
917 s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); 917 s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]);
918 s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); 918 s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]);
919 s.TextureEntry = (byte[])row["Texture"]; 919
920 byte[] textureEntry = (byte[])row["Texture"];
921 s.TextureEntry = textureEntry;
922
920 s.ExtraParams = (byte[])row["ExtraParams"]; 923 s.ExtraParams = (byte[])row["ExtraParams"];
921 924
922 return s; 925 return s;
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index b06a885..98e583e 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -28,6 +28,7 @@
28 28
29using System.Xml.Serialization; 29using System.Xml.Serialization;
30using libsecondlife; 30using libsecondlife;
31using System;
31 32
32namespace OpenSim.Framework 33namespace OpenSim.Framework
33{ 34{
@@ -63,9 +64,10 @@ namespace OpenSim.Framework
63 Flexible = 128 64 Flexible = 128
64 } 65 }
65 66
67 [Serializable]
66 public class PrimitiveBaseShape 68 public class PrimitiveBaseShape
67 { 69 {
68 private static readonly byte[] m_defaultTextureEntry; 70 private static readonly LLObject.TextureEntry m_defaultTexture;
69 71
70 public byte State; 72 public byte State;
71 public byte PCode; 73 public byte PCode;
@@ -88,7 +90,35 @@ namespace OpenSim.Framework
88 public sbyte PathTaperY; 90 public sbyte PathTaperY;
89 public sbyte PathTwist; 91 public sbyte PathTwist;
90 public sbyte PathTwistBegin; 92 public sbyte PathTwistBegin;
91 public byte[] TextureEntry; // a LL textureEntry in byte[] format 93
94 [XmlIgnore]
95 public LLObject.TextureEntry Textures
96 {
97 get
98 {
99 return new LLObject.TextureEntry(m_textureEntry, 0, m_textureEntry.Length);
100 }
101
102 set
103 {
104 m_textureEntry = value.ToBytes();
105 }
106 }
107
108 private byte[] m_textureEntry;
109 public byte[] TextureEntry
110 {
111 get
112 {
113 return m_textureEntry;
114 }
115
116 set
117 {
118 m_textureEntry = value;
119 }
120 }
121
92 public byte[] ExtraParams; 122 public byte[] ExtraParams;
93 123
94 public ProfileShape ProfileShape 124 public ProfileShape ProfileShape
@@ -117,17 +147,19 @@ namespace OpenSim.Framework
117 get { return Scale; } 147 get { return Scale; }
118 } 148 }
119 149
150
151
120 static PrimitiveBaseShape() 152 static PrimitiveBaseShape()
121 { 153 {
122 m_defaultTextureEntry = 154 m_defaultTexture =
123 new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); 155 new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
124 } 156 }
125 157
126 public PrimitiveBaseShape() 158 public PrimitiveBaseShape()
127 { 159 {
128 PCode = (byte) PCodeEnum.Primitive; 160 PCode = (byte) PCodeEnum.Primitive;
129 ExtraParams = new byte[1]; 161 ExtraParams = new byte[1];
130 TextureEntry = m_defaultTextureEntry; 162 Textures = m_defaultTexture;
131 } 163 }
132 164
133 public static PrimitiveBaseShape Create() 165 public static PrimitiveBaseShape Create()