diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs index 87cf173..728767f 100644 --- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | |||
@@ -12,12 +12,12 @@ namespace OpenSim.Framework.Types | |||
12 | RightTriangle = 4, | 12 | RightTriangle = 4, |
13 | HalfCircle = 5 | 13 | HalfCircle = 5 |
14 | } | 14 | } |
15 | 15 | ||
16 | public enum HollowShape : byte | 16 | public enum HollowShape : byte |
17 | { | 17 | { |
18 | Same = 0, | 18 | Same = 0, |
19 | Circle = 16, | 19 | Circle = 16, |
20 | Square =32, | 20 | Square = 32, |
21 | Triangle = 48 | 21 | Triangle = 48 |
22 | } | 22 | } |
23 | 23 | ||
@@ -26,7 +26,7 @@ namespace OpenSim.Framework.Types | |||
26 | Primitive = 9, | 26 | Primitive = 9, |
27 | Avatar = 47 | 27 | Avatar = 47 |
28 | } | 28 | } |
29 | 29 | ||
30 | public enum Extrusion : byte | 30 | public enum Extrusion : byte |
31 | { | 31 | { |
32 | Straight = 16, | 32 | Straight = 16, |
@@ -34,11 +34,11 @@ namespace OpenSim.Framework.Types | |||
34 | Curve2 = 48, | 34 | Curve2 = 48, |
35 | Flexible = 128 | 35 | Flexible = 128 |
36 | } | 36 | } |
37 | 37 | ||
38 | public class PrimitiveBaseShape | 38 | public class PrimitiveBaseShape |
39 | { | 39 | { |
40 | private static byte[] m_defaultTextureEntry; | 40 | private static byte[] m_defaultTextureEntry; |
41 | 41 | ||
42 | public byte PCode; | 42 | public byte PCode; |
43 | public ushort PathBegin; | 43 | public ushort PathBegin; |
44 | public ushort PathEnd; | 44 | public ushort PathEnd; |
@@ -100,14 +100,14 @@ namespace OpenSim.Framework.Types | |||
100 | { | 100 | { |
101 | m_defaultTextureEntry = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); | 101 | m_defaultTextureEntry = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); |
102 | } | 102 | } |
103 | 103 | ||
104 | public PrimitiveBaseShape() | 104 | public PrimitiveBaseShape() |
105 | { | 105 | { |
106 | PCode = (byte)PCodeEnum.Primitive; | 106 | PCode = (byte)PCodeEnum.Primitive; |
107 | ExtraParams = new byte[1]; | 107 | ExtraParams = new byte[1]; |
108 | TextureEntry = m_defaultTextureEntry; | 108 | TextureEntry = m_defaultTextureEntry; |
109 | } | 109 | } |
110 | 110 | ||
111 | //void returns need to change of course | 111 | //void returns need to change of course |
112 | public virtual void GetMesh() | 112 | public virtual void GetMesh() |
113 | { | 113 | { |
@@ -121,11 +121,12 @@ namespace OpenSim.Framework.Types | |||
121 | } | 121 | } |
122 | 122 | ||
123 | public class GenericShape : PrimitiveBaseShape | 123 | public class GenericShape : PrimitiveBaseShape |
124 | { | 124 | { |
125 | public GenericShape() : base() | 125 | public GenericShape() |
126 | : base() | ||
126 | { | 127 | { |
127 | 128 | ||
128 | } | 129 | } |
129 | } | 130 | } |
130 | 131 | ||
131 | public class BoxShape : PrimitiveBaseShape | 132 | public class BoxShape : PrimitiveBaseShape |
@@ -133,7 +134,7 @@ namespace OpenSim.Framework.Types | |||
133 | public BoxShape() | 134 | public BoxShape() |
134 | : base() | 135 | : base() |
135 | { | 136 | { |
136 | PathCurve = (byte) Extrusion.Straight; | 137 | PathCurve = (byte)Extrusion.Straight; |
137 | ProfileShape = ProfileShape.Square; | 138 | ProfileShape = ProfileShape.Square; |
138 | PathScaleX = 100; | 139 | PathScaleX = 100; |
139 | PathScaleY = 100; | 140 | PathScaleY = 100; |
@@ -156,8 +157,8 @@ namespace OpenSim.Framework.Types | |||
156 | { | 157 | { |
157 | BoxShape boxShape = new BoxShape(); | 158 | BoxShape boxShape = new BoxShape(); |
158 | 159 | ||
159 | boxShape.SetSide( 0.5f ); | 160 | boxShape.SetSide(0.5f); |
160 | 161 | ||
161 | return boxShape; | 162 | return boxShape; |
162 | } | 163 | } |
163 | } | 164 | } |
@@ -182,12 +183,12 @@ namespace OpenSim.Framework.Types | |||
182 | 183 | ||
183 | private void SetHeigth(float heigth) | 184 | private void SetHeigth(float heigth) |
184 | { | 185 | { |
185 | Scale.Z = heigth; | 186 | Scale.Z = heigth; |
186 | } | 187 | } |
187 | 188 | ||
188 | private void SetRadius(float radius) | 189 | private void SetRadius(float radius) |
189 | { | 190 | { |
190 | Scale.X = Scale.Y = radius*2f; | 191 | Scale.X = Scale.Y = radius * 2f; |
191 | } | 192 | } |
192 | } | 193 | } |
193 | } | 194 | } |