| 15 |
public class DefaultDataControl:IPrimitiveData |
public class DefaultDataControl:IPrimitiveData |
| 16 |
{ |
{ |
| 17 |
|
|
| 18 |
public event OnNewPrimitive onNewPrimitive; |
// public event OnNewPrimitive onNewPrimitive; |
| 19 |
|
|
| 20 |
private readonly Dictionary<uint, Visual3D> m_models = new Dictionary<uint, Visual3D>(); |
private readonly Dictionary<uint, Visual3D> m_models = new Dictionary<uint, Visual3D>(); |
| 21 |
|
|
| 201 |
unAttachedTextures.Add(model, textureID); |
unAttachedTextures.Add(model, textureID); |
| 202 |
} |
} |
| 203 |
} |
} |
| 204 |
|
public void RemoveUnAttachedTexture(uint model) |
| 205 |
|
{ |
| 206 |
|
lock (unAttachedTextures) |
| 207 |
|
{ |
| 208 |
|
if(unAttachedTextures.ContainsKey(model)) |
| 209 |
|
unAttachedTextures.Remove(model); |
| 210 |
|
} |
| 211 |
|
} |
| 212 |
|
|
| 213 |
public List<Visual3D> GetVisualByTextureID(UUID textureID) |
public List<Visual3D> GetVisualByTextureID(UUID textureID) |
| 214 |
{ |
{ |
| 237 |
return list; |
return list; |
| 238 |
} |
} |
| 239 |
|
|
|
public void CacheDownloadedTexture(ImageDownload image) |
|
|
{ |
|
|
if (image.Success == true) |
|
|
{ |
|
|
lock (downloadedTextures) |
|
|
{ |
|
|
if (downloadedTextures.ContainsKey(image.ID) == true) |
|
|
downloadedTextures.Remove(image.ID); |
|
|
downloadedTextures.Add(image.ID, image.AssetData); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
public byte[] RetireveTextureData(UUID textureID) |
|
|
{ |
|
|
byte[] bytes = null; |
|
|
lock (downloadedTextures) |
|
|
{ |
|
|
if (downloadedTextures.ContainsKey(textureID) == true) |
|
|
bytes = downloadedTextures[textureID]; |
|
|
} |
|
|
return bytes; |
|
|
} |
|
| 240 |
|
|
| 241 |
|
|
| 242 |
|
|