aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/PrimitiveBaseShape.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs48
1 files changed, 24 insertions, 24 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index f244b51..56e566b 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using System.Xml.Serialization; 30using System.Xml.Serialization;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33 33
34namespace OpenSim.Framework 34namespace OpenSim.Framework
@@ -74,7 +74,7 @@ namespace OpenSim.Framework
74 { 74 {
75 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 75 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
76 76
77 private static readonly LLObject.TextureEntry m_defaultTexture; 77 private static readonly Primitive.TextureEntry m_defaultTexture;
78 78
79 private byte[] m_textureEntry; 79 private byte[] m_textureEntry;
80 80
@@ -96,13 +96,13 @@ namespace OpenSim.Framework
96 private ushort _profileBegin; 96 private ushort _profileBegin;
97 private ushort _profileEnd; 97 private ushort _profileEnd;
98 private ushort _profileHollow; 98 private ushort _profileHollow;
99 private LLVector3 _scale; 99 private Vector3 _scale;
100 private byte _state; 100 private byte _state;
101 private ProfileShape _profileShape; 101 private ProfileShape _profileShape;
102 private HollowShape _hollowShape; 102 private HollowShape _hollowShape;
103 103
104 // Sculpted 104 // Sculpted
105 [XmlIgnore] private LLUUID _sculptTexture = LLUUID.Zero; 105 [XmlIgnore] private UUID _sculptTexture = UUID.Zero;
106 [XmlIgnore] private byte _sculptType = (byte)0; 106 [XmlIgnore] private byte _sculptType = (byte)0;
107 [XmlIgnore] private byte[] _sculptData = new byte[0]; 107 [XmlIgnore] private byte[] _sculptData = new byte[0];
108 108
@@ -172,7 +172,7 @@ namespace OpenSim.Framework
172 static PrimitiveBaseShape() 172 static PrimitiveBaseShape()
173 { 173 {
174 m_defaultTexture = 174 m_defaultTexture =
175 new LLObject.TextureEntry(new LLUUID("89556747-24cb-43ed-920b-47caed15465f")); 175 new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f"));
176 } 176 }
177 177
178 public PrimitiveBaseShape() 178 public PrimitiveBaseShape()
@@ -183,12 +183,12 @@ namespace OpenSim.Framework
183 } 183 }
184 184
185 [XmlIgnore] 185 [XmlIgnore]
186 public LLObject.TextureEntry Textures 186 public Primitive.TextureEntry Textures
187 { 187 {
188 get 188 get
189 { 189 {
190 //m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: get m_textureEntry length {0}", m_textureEntry.Length); 190 //m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: get m_textureEntry length {0}", m_textureEntry.Length);
191 return new LLObject.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); 191 return new Primitive.TextureEntry(m_textureEntry, 0, m_textureEntry.Length);
192 } 192 }
193 193
194 set { m_textureEntry = value.ToBytes(); } 194 set { m_textureEntry = value.ToBytes(); }
@@ -252,7 +252,7 @@ namespace OpenSim.Framework
252 252
253 public void SetScale(float side) 253 public void SetScale(float side)
254 { 254 {
255 _scale = new LLVector3(side, side, side); 255 _scale = new Vector3(side, side, side);
256 } 256 }
257 257
258 public void SetHeigth(float heigth) 258 public void SetHeigth(float heigth)
@@ -285,22 +285,22 @@ namespace OpenSim.Framework
285 return shape; 285 return shape;
286 } 286 }
287 287
288 public void SetPathRange(LLVector3 pathRange) 288 public void SetPathRange(Vector3 pathRange)
289 { 289 {
290 _pathBegin = LLObject.PackBeginCut(pathRange.X); 290 _pathBegin = Primitive.PackBeginCut(pathRange.X);
291 _pathEnd = LLObject.PackEndCut(pathRange.Y); 291 _pathEnd = Primitive.PackEndCut(pathRange.Y);
292 } 292 }
293 293
294 public void SetSculptData(byte sculptType, LLUUID SculptTextureUUID) 294 public void SetSculptData(byte sculptType, UUID SculptTextureUUID)
295 { 295 {
296 _sculptType = sculptType; 296 _sculptType = sculptType;
297 _sculptTexture = SculptTextureUUID; 297 _sculptTexture = SculptTextureUUID;
298 } 298 }
299 299
300 public void SetProfileRange(LLVector3 profileRange) 300 public void SetProfileRange(Vector3 profileRange)
301 { 301 {
302 _profileBegin = LLObject.PackBeginCut(profileRange.X); 302 _profileBegin = Primitive.PackBeginCut(profileRange.X);
303 _profileEnd = LLObject.PackEndCut(profileRange.Y); 303 _profileEnd = Primitive.PackEndCut(profileRange.Y);
304 } 304 }
305 305
306 public byte[] ExtraParams 306 public byte[] ExtraParams
@@ -477,7 +477,7 @@ namespace OpenSim.Framework
477 } 477 }
478 } 478 }
479 479
480 public LLVector3 Scale { 480 public Vector3 Scale {
481 get { 481 get {
482 return _scale; 482 return _scale;
483 } 483 }
@@ -513,7 +513,7 @@ namespace OpenSim.Framework
513 } 513 }
514 } 514 }
515 515
516 public LLUUID SculptTexture { 516 public UUID SculptTexture {
517 get { 517 get {
518 return _sculptTexture; 518 return _sculptTexture;
519 } 519 }
@@ -904,7 +904,7 @@ namespace OpenSim.Framework
904 public void ReadSculptData(byte[] data, int pos) 904 public void ReadSculptData(byte[] data, int pos)
905 { 905 {
906 byte[] SculptTextureUUID = new byte[16]; 906 byte[] SculptTextureUUID = new byte[16];
907 LLUUID SculptUUID = LLUUID.Zero; 907 UUID SculptUUID = UUID.Zero;
908 byte SculptTypel = data[16+pos]; 908 byte SculptTypel = data[16+pos];
909 909
910 if (data.Length+pos >= 17) 910 if (data.Length+pos >= 17)
@@ -913,12 +913,12 @@ namespace OpenSim.Framework
913 SculptTextureUUID = new byte[16]; 913 SculptTextureUUID = new byte[16];
914 SculptTypel = data[16 + pos]; 914 SculptTypel = data[16 + pos];
915 Array.Copy(data, pos, SculptTextureUUID,0, 16); 915 Array.Copy(data, pos, SculptTextureUUID,0, 16);
916 SculptUUID = new LLUUID(SculptTextureUUID, 0); 916 SculptUUID = new UUID(SculptTextureUUID, 0);
917 } 917 }
918 else 918 else
919 { 919 {
920 _sculptEntry = false; 920 _sculptEntry = false;
921 SculptUUID = LLUUID.Zero; 921 SculptUUID = UUID.Zero;
922 SculptTypel = 0x00; 922 SculptTypel = 0x00;
923 } 923 }
924 924
@@ -953,7 +953,7 @@ namespace OpenSim.Framework
953 _flexiDrag = (float)(data[pos++] & 0x7F) / 10.0f; 953 _flexiDrag = (float)(data[pos++] & 0x7F) / 10.0f;
954 _flexiGravity = (float)(data[pos++] / 10.0f) - 10.0f; 954 _flexiGravity = (float)(data[pos++] / 10.0f) - 10.0f;
955 _flexiWind = (float)data[pos++] / 10.0f; 955 _flexiWind = (float)data[pos++] / 10.0f;
956 LLVector3 lForce = new LLVector3(data, pos); 956 Vector3 lForce = new Vector3(data, pos);
957 _flexiForceX = lForce.X; 957 _flexiForceX = lForce.X;
958 _flexiForceY = lForce.Y; 958 _flexiForceY = lForce.Y;
959 _flexiForceZ = lForce.Z; 959 _flexiForceZ = lForce.Z;
@@ -986,7 +986,7 @@ namespace OpenSim.Framework
986 data[i++] |= (byte)((byte)(_flexiDrag * 10.01f) & 0x7F); 986 data[i++] |= (byte)((byte)(_flexiDrag * 10.01f) & 0x7F);
987 data[i++] = (byte)((_flexiGravity + 10.0f) * 10.01f); 987 data[i++] = (byte)((_flexiGravity + 10.0f) * 10.01f);
988 data[i++] = (byte)(_flexiWind * 10.01f); 988 data[i++] = (byte)(_flexiWind * 10.01f);
989 LLVector3 lForce = new LLVector3(_flexiForceX, _flexiForceY, _flexiForceZ); 989 Vector3 lForce = new Vector3(_flexiForceX, _flexiForceY, _flexiForceZ);
990 lForce.GetBytes().CopyTo(data, i); 990 lForce.GetBytes().CopyTo(data, i);
991 991
992 return data; 992 return data;
@@ -997,7 +997,7 @@ namespace OpenSim.Framework
997 if (data.Length - pos >= 16) 997 if (data.Length - pos >= 16)
998 { 998 {
999 _lightEntry = true; 999 _lightEntry = true;
1000 LLColor lColor = new LLColor(data, pos, false); 1000 Color4 lColor = new Color4(data, pos, false);
1001 _lightIntensity = lColor.A; 1001 _lightIntensity = lColor.A;
1002 _lightColorA = 1f; 1002 _lightColorA = 1f;
1003 _lightColorR = lColor.R; 1003 _lightColorR = lColor.R;
@@ -1027,7 +1027,7 @@ namespace OpenSim.Framework
1027 byte[] data = new byte[16]; 1027 byte[] data = new byte[16];
1028 1028
1029 // Alpha channel in color is intensity 1029 // Alpha channel in color is intensity
1030 LLColor tmpColor = new LLColor(_lightColorR,_lightColorG,_lightColorB,_lightIntensity); 1030 Color4 tmpColor = new Color4(_lightColorR,_lightColorG,_lightColorB,_lightIntensity);
1031 1031
1032 tmpColor.GetBytes().CopyTo(data, 0); 1032 tmpColor.GetBytes().CopyTo(data, 0);
1033 Helpers.FloatToBytes(_lightRadius).CopyTo(data, 4); 1033 Helpers.FloatToBytes(_lightRadius).CopyTo(data, 4);