aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/PrimitiveBaseShape.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/PrimitiveBaseShape.cs')
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs40
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index 23969fe..27ce433 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -73,9 +73,9 @@ namespace OpenSim.Framework
73 public class PrimitiveBaseShape 73 public class PrimitiveBaseShape
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 LLObject.TextureEntry m_defaultTexture;
78 78
79 private byte[] m_textureEntry; 79 private byte[] m_textureEntry;
80 80
81 public ushort PathBegin; 81 public ushort PathBegin;
@@ -93,39 +93,39 @@ namespace OpenSim.Framework
93 public sbyte PathTwist; 93 public sbyte PathTwist;
94 public sbyte PathTwistBegin; 94 public sbyte PathTwistBegin;
95 public byte PCode; 95 public byte PCode;
96 public ushort ProfileBegin; 96 public ushort ProfileBegin;
97 97
98 public byte ProfileCurve 98 public byte ProfileCurve
99 { 99 {
100 get { return (byte)((byte)HollowShape | (byte)ProfileShape); } 100 get { return (byte)((byte)HollowShape | (byte)ProfileShape); }
101 101
102 set 102 set
103 { 103 {
104 // Handle hollow shape component 104 // Handle hollow shape component
105 byte hollowShapeByte = (byte)(value & 0xf0); 105 byte hollowShapeByte = (byte)(value & 0xf0);
106 106
107 if (!Enum.IsDefined(typeof(HollowShape), hollowShapeByte)) 107 if (!Enum.IsDefined(typeof(HollowShape), hollowShapeByte))
108 { 108 {
109 m_log.WarnFormat( 109 m_log.WarnFormat(
110 "[SHAPE]: Attempt to set a ProfileCurve with a hollow shape value of {0}, which isn't a valid enum. Replacing with default shape.", 110 "[SHAPE]: Attempt to set a ProfileCurve with a hollow shape value of {0}, which isn't a valid enum. Replacing with default shape.",
111 hollowShapeByte); 111 hollowShapeByte);
112 112
113 this.HollowShape = HollowShape.Same; 113 this.HollowShape = HollowShape.Same;
114 } 114 }
115 else 115 else
116 { 116 {
117 this.HollowShape = (HollowShape)hollowShapeByte; 117 this.HollowShape = (HollowShape)hollowShapeByte;
118 } 118 }
119 119
120 // Handle profile shape component 120 // Handle profile shape component
121 byte profileShapeByte = (byte)(value & 0xf); 121 byte profileShapeByte = (byte)(value & 0xf);
122 122
123 if (!Enum.IsDefined(typeof(ProfileShape), profileShapeByte)) 123 if (!Enum.IsDefined(typeof(ProfileShape), profileShapeByte))
124 { 124 {
125 m_log.WarnFormat( 125 m_log.WarnFormat(
126 "[SHAPE]: Attempt to set a ProfileCurve with a profile shape value of {0}, which isn't a valid enum. Replacing with square.", 126 "[SHAPE]: Attempt to set a ProfileCurve with a profile shape value of {0}, which isn't a valid enum. Replacing with square.",
127 profileShapeByte); 127 profileShapeByte);
128 128
129 this.ProfileShape = ProfileShape.Square; 129 this.ProfileShape = ProfileShape.Square;
130 } 130 }
131 else 131 else
@@ -133,13 +133,13 @@ namespace OpenSim.Framework
133 this.ProfileShape = (ProfileShape)profileShapeByte; 133 this.ProfileShape = (ProfileShape)profileShapeByte;
134 } 134 }
135 } 135 }
136 } 136 }
137 137
138 public ushort ProfileEnd; 138 public ushort ProfileEnd;
139 public ushort ProfileHollow; 139 public ushort ProfileHollow;
140 public LLVector3 Scale; 140 public LLVector3 Scale;
141 public byte State; 141 public byte State;
142 142
143 // Sculpted 143 // Sculpted
144 [XmlIgnore] public LLUUID SculptTexture = LLUUID.Zero; 144 [XmlIgnore] public LLUUID SculptTexture = LLUUID.Zero;
145 [XmlIgnore] public byte SculptType = (byte)0; 145 [XmlIgnore] public byte SculptType = (byte)0;
@@ -154,7 +154,7 @@ namespace OpenSim.Framework
154 [XmlIgnore] public float FlexiForceX = 0f; 154 [XmlIgnore] public float FlexiForceX = 0f;
155 [XmlIgnore] public float FlexiForceY = 0f; 155 [XmlIgnore] public float FlexiForceY = 0f;
156 [XmlIgnore] public float FlexiForceZ = 0f; 156 [XmlIgnore] public float FlexiForceZ = 0f;
157 157
158 //Bright n sparkly 158 //Bright n sparkly
159 [XmlIgnore] public float LightColorR = 0f; 159 [XmlIgnore] public float LightColorR = 0f;
160 [XmlIgnore] public float LightColorG = 0f; 160 [XmlIgnore] public float LightColorG = 0f;
@@ -198,8 +198,8 @@ namespace OpenSim.Framework
198 } 198 }
199 199
200 public ProfileShape ProfileShape; 200 public ProfileShape ProfileShape;
201 201
202 public HollowShape HollowShape; 202 public HollowShape HollowShape;
203 203
204 public static PrimitiveBaseShape Default 204 public static PrimitiveBaseShape Default
205 { 205 {
@@ -394,7 +394,7 @@ namespace OpenSim.Framework
394 returnbyte[0] = 0; 394 returnbyte[0] = 0;
395 return returnbyte; 395 return returnbyte;
396 } 396 }
397 397
398 398
399 return returnbytes; 399 return returnbytes;
400 //m_log.Info("[EXTRAPARAMS]: Length = " + m_shape.ExtraParams.Length.ToString()); 400 //m_log.Info("[EXTRAPARAMS]: Length = " + m_shape.ExtraParams.Length.ToString());
@@ -451,11 +451,11 @@ namespace OpenSim.Framework
451 int i = 0; 451 int i = 0;
452 byte extraParamCount = data[i++]; 452 byte extraParamCount = data[i++];
453 453
454 454
455 for (int k = 0; k < extraParamCount; k++) 455 for (int k = 0; k < extraParamCount; k++)
456 { 456 {
457 ushort epType = Helpers.BytesToUInt16(data, i); 457 ushort epType = Helpers.BytesToUInt16(data, i);
458 458
459 i += 2; 459 i += 2;
460 uint paramLength = Helpers.BytesToUIntBig(data, i); 460 uint paramLength = Helpers.BytesToUIntBig(data, i);
461 461
@@ -611,7 +611,7 @@ namespace OpenSim.Framework
611 611
612 // Alpha channel in color is intensity 612 // Alpha channel in color is intensity
613 LLColor tmpColor = new LLColor(LightColorR,LightColorG,LightColorB,LightIntensity); 613 LLColor tmpColor = new LLColor(LightColorR,LightColorG,LightColorB,LightIntensity);
614 614
615 tmpColor.GetBytes().CopyTo(data, 0); 615 tmpColor.GetBytes().CopyTo(data, 0);
616 Helpers.FloatToBytes(LightRadius).CopyTo(data, 4); 616 Helpers.FloatToBytes(LightRadius).CopyTo(data, 4);
617 Helpers.FloatToBytes(LightCutoff).CopyTo(data, 8); 617 Helpers.FloatToBytes(LightCutoff).CopyTo(data, 8);