diff options
Diffstat (limited to 'OpenSim/Framework/PrimitiveBaseShape.cs')
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index ff6b7f5..bccc36a 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -88,8 +88,7 @@ namespace OpenSim.Framework | |||
88 | public byte PCode; | 88 | public byte PCode; |
89 | public ushort ProfileBegin; | 89 | public ushort ProfileBegin; |
90 | 90 | ||
91 | [XmlIgnore] // -- this one is re-constructed from ProfileShape and ProfileHollow | 91 | public byte ProfileCurve; |
92 | public byte ProfileCurve; | ||
93 | 92 | ||
94 | public ushort ProfileEnd; | 93 | public ushort ProfileEnd; |
95 | public ushort ProfileHollow; | 94 | public ushort ProfileHollow; |
@@ -104,7 +103,7 @@ namespace OpenSim.Framework | |||
104 | 103 | ||
105 | public PrimitiveBaseShape() | 104 | public PrimitiveBaseShape() |
106 | { | 105 | { |
107 | PCode = (byte) PCodeEnum.Primitive; | 106 | PCode = (byte)PCodeEnum.Primitive; |
108 | ExtraParams = new byte[1]; | 107 | ExtraParams = new byte[1]; |
109 | Textures = m_defaultTexture; | 108 | Textures = m_defaultTexture; |
110 | } | 109 | } |
@@ -126,21 +125,21 @@ namespace OpenSim.Framework | |||
126 | 125 | ||
127 | public ProfileShape ProfileShape | 126 | public ProfileShape ProfileShape |
128 | { | 127 | { |
129 | get { return (ProfileShape) (ProfileCurve & 0xf); } | 128 | get { return (ProfileShape)(ProfileCurve & 0xf); } |
130 | set | 129 | set |
131 | { | 130 | { |
132 | byte oldValueMasked = (byte) (ProfileCurve & 0xf0); | 131 | byte oldValueMasked = (byte)(ProfileCurve & 0xf0); |
133 | ProfileCurve = (byte) (oldValueMasked | (byte) value); | 132 | ProfileCurve = (byte)(oldValueMasked | (byte)value); |
134 | } | 133 | } |
135 | } | 134 | } |
136 | 135 | ||
137 | public HollowShape HollowShape | 136 | public HollowShape HollowShape |
138 | { | 137 | { |
139 | get { return (HollowShape) (ProfileCurve & 0xf0); } | 138 | get { return (HollowShape)(ProfileCurve & 0xf0); } |
140 | set | 139 | set |
141 | { | 140 | { |
142 | byte oldValueMasked = (byte) (ProfileCurve & 0x0f); | 141 | byte oldValueMasked = (byte)(ProfileCurve & 0x0f); |
143 | ProfileCurve = (byte) (oldValueMasked | (byte) value); | 142 | ProfileCurve = (byte)(oldValueMasked | (byte)value); |
144 | } | 143 | } |
145 | } | 144 | } |
146 | 145 | ||
@@ -172,7 +171,7 @@ namespace OpenSim.Framework | |||
172 | { | 171 | { |
173 | PrimitiveBaseShape shape = Create(); | 172 | PrimitiveBaseShape shape = Create(); |
174 | 173 | ||
175 | shape.PathCurve = (byte) Extrusion.Straight; | 174 | shape.PathCurve = (byte)Extrusion.Straight; |
176 | shape.ProfileShape = ProfileShape.Square; | 175 | shape.ProfileShape = ProfileShape.Square; |
177 | shape.PathScaleX = 100; | 176 | shape.PathScaleX = 100; |
178 | shape.PathScaleY = 100; | 177 | shape.PathScaleY = 100; |
@@ -184,7 +183,7 @@ namespace OpenSim.Framework | |||
184 | { | 183 | { |
185 | PrimitiveBaseShape shape = Create(); | 184 | PrimitiveBaseShape shape = Create(); |
186 | 185 | ||
187 | shape.PathCurve = (byte) Extrusion.Curve1; | 186 | shape.PathCurve = (byte)Extrusion.Curve1; |
188 | shape.ProfileShape = ProfileShape.Square; | 187 | shape.ProfileShape = ProfileShape.Square; |
189 | 188 | ||
190 | shape.PathScaleX = 100; | 189 | shape.PathScaleX = 100; |
@@ -205,7 +204,7 @@ namespace OpenSim.Framework | |||
205 | 204 | ||
206 | public void SetRadius(float radius) | 205 | public void SetRadius(float radius) |
207 | { | 206 | { |
208 | Scale.X = Scale.Y = radius*2f; | 207 | Scale.X = Scale.Y = radius * 2f; |
209 | } | 208 | } |
210 | 209 | ||
211 | //void returns need to change of course | 210 | //void returns need to change of course |
@@ -215,7 +214,7 @@ namespace OpenSim.Framework | |||
215 | 214 | ||
216 | public PrimitiveBaseShape Copy() | 215 | public PrimitiveBaseShape Copy() |
217 | { | 216 | { |
218 | return (PrimitiveBaseShape) MemberwiseClone(); | 217 | return (PrimitiveBaseShape)MemberwiseClone(); |
219 | } | 218 | } |
220 | 219 | ||
221 | public static PrimitiveBaseShape CreateCylinder(float radius, float heigth) | 220 | public static PrimitiveBaseShape CreateCylinder(float radius, float heigth) |