aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
diff options
context:
space:
mode:
authorlbsa712007-08-15 18:02:05 +0000
committerlbsa712007-08-15 18:02:05 +0000
commita4602515ce5dd50b7391269f2c706269d4ec833f (patch)
tree8c233ea04dd843f0242f5d7bdc20fa34d3bba405 /OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
parent* Again, FileSystemObject reports filename. (diff)
downloadopensim-SC_OLD-a4602515ce5dd50b7391269f2c706269d4ec833f.zip
opensim-SC_OLD-a4602515ce5dd50b7391269f2c706269d4ec833f.tar.gz
opensim-SC_OLD-a4602515ce5dd50b7391269f2c706269d4ec833f.tar.bz2
opensim-SC_OLD-a4602515ce5dd50b7391269f2c706269d4ec833f.tar.xz
* Added more spinning parts to ComplexObject.
* We now have CylinderShape * This commit dedicated to the birth of techno house.
Diffstat (limited to 'OpenSim/Framework/General/Types/PrimitiveBaseShape.cs')
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs33
1 files changed, 24 insertions, 9 deletions
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
index 577c8a2..87cf173 100644
--- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
@@ -16,9 +16,25 @@ namespace OpenSim.Framework.Types
16 public enum HollowShape : byte 16 public enum HollowShape : byte
17 { 17 {
18 Same = 0, 18 Same = 0,
19 // Fill in... 19 Circle = 16,
20 Square =32,
21 Triangle = 48
20 } 22 }
21 23
24 public enum PCodeEnum : byte
25 {
26 Primitive = 9,
27 Avatar = 47
28 }
29
30 public enum Extrusion : byte
31 {
32 Straight = 16,
33 Curve1 = 32,
34 Curve2 = 48,
35 Flexible = 128
36 }
37
22 public class PrimitiveBaseShape 38 public class PrimitiveBaseShape
23 { 39 {
24 private static byte[] m_defaultTextureEntry; 40 private static byte[] m_defaultTextureEntry;
@@ -59,7 +75,7 @@ namespace OpenSim.Framework.Types
59 } 75 }
60 } 76 }
61 77
62 public HollowShape HoleShape 78 public HollowShape HollowShape
63 { 79 {
64 get 80 get
65 { 81 {
@@ -87,6 +103,7 @@ namespace OpenSim.Framework.Types
87 103
88 public PrimitiveBaseShape() 104 public PrimitiveBaseShape()
89 { 105 {
106 PCode = (byte)PCodeEnum.Primitive;
90 ExtraParams = new byte[1]; 107 ExtraParams = new byte[1];
91 TextureEntry = m_defaultTextureEntry; 108 TextureEntry = m_defaultTextureEntry;
92 } 109 }
@@ -116,15 +133,14 @@ namespace OpenSim.Framework.Types
116 public BoxShape() 133 public BoxShape()
117 : base() 134 : base()
118 { 135 {
119 PathCurve = 16; 136 PathCurve = (byte) Extrusion.Straight;
120 ProfileShape = ProfileShape.Square; 137 ProfileShape = ProfileShape.Square;
121 PCode = 9;
122 PathScaleX = 100; 138 PathScaleX = 100;
123 PathScaleY = 100; 139 PathScaleY = 100;
124 } 140 }
125 141
126 public BoxShape(float side) 142 public BoxShape(float side)
127 : base() 143 : this()
128 { 144 {
129 SetSide(side); 145 SetSide(side);
130 } 146 }
@@ -151,15 +167,14 @@ namespace OpenSim.Framework.Types
151 public CylinderShape() 167 public CylinderShape()
152 : base() 168 : base()
153 { 169 {
154 PathCurve = 16; 170 PathCurve = (byte)Extrusion.Straight;
155 ProfileShape = ProfileShape.Circle; 171 ProfileShape = ProfileShape.Circle;
156 PCode = 9;
157 PathScaleX = 100; 172 PathScaleX = 100;
158 PathScaleY = 100; 173 PathScaleY = 100;
159 } 174 }
160 175
161 public CylinderShape(float radius, float heigth) 176 public CylinderShape(float radius, float heigth)
162 : base() 177 : this()
163 { 178 {
164 SetRadius(radius); 179 SetRadius(radius);
165 SetHeigth(heigth); 180 SetHeigth(heigth);
@@ -167,7 +182,7 @@ namespace OpenSim.Framework.Types
167 182
168 private void SetHeigth(float heigth) 183 private void SetHeigth(float heigth)
169 { 184 {
170 Scale.Y = heigth; 185 Scale.Z = heigth;
171 } 186 }
172 187
173 private void SetRadius(float radius) 188 private void SetRadius(float radius)