aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorlbsa712007-07-18 09:36:47 +0000
committerlbsa712007-07-18 09:36:47 +0000
commitf70ec1fa75ef526266ad359d2db0e25f2635c182 (patch)
tree0ce6f6df1702d849532d1818c76c2bd301fb4579 /OpenSim/Framework
parent* One hopefully-final attempt at fixing this remoting issue. (diff)
downloadopensim-SC-f70ec1fa75ef526266ad359d2db0e25f2635c182.zip
opensim-SC-f70ec1fa75ef526266ad359d2db0e25f2635c182.tar.gz
opensim-SC-f70ec1fa75ef526266ad359d2db0e25f2635c182.tar.bz2
opensim-SC-f70ec1fa75ef526266ad359d2db0e25f2635c182.tar.xz
* Added a FileSystemObject to SimpleApp
* Added Some ShapeTypes (shapes doesn't work though!) * Fixed some \0 issues
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/General/Types/PrimData.cs58
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs74
2 files changed, 75 insertions, 57 deletions
diff --git a/OpenSim/Framework/General/Types/PrimData.cs b/OpenSim/Framework/General/Types/PrimData.cs
index 6b8fa3a..9b24c0f 100644
--- a/OpenSim/Framework/General/Types/PrimData.cs
+++ b/OpenSim/Framework/General/Types/PrimData.cs
@@ -194,35 +194,35 @@ namespace OpenSim.Framework.Types
194 return bytes; 194 return bytes;
195 } 195 }
196 196
197 public static PrimData DefaultCube() 197 //public static PrimData DefaultCube()
198 { 198 //{
199 PrimData primData = new PrimData(); 199 // PrimData primData = new PrimData();
200 primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 200 // primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
201 primData.FullID = LLUUID.Random(); 201 // primData.FullID = LLUUID.Random();
202 primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 202 // primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
203 primData.Rotation = new LLQuaternion(0, 0, 0, 1); 203 // primData.Rotation = new LLQuaternion(0, 0, 0, 1);
204 primData.PCode = 9; 204 // primData.PCode = 9;
205 primData.ParentID = 0; 205 // primData.ParentID = 0;
206 primData.PathBegin = 0; 206 // primData.PathBegin = 0;
207 primData.PathEnd = 0; 207 // primData.PathEnd = 0;
208 primData.PathScaleX = 0; 208 // primData.PathScaleX = 0;
209 primData.PathScaleY = 0; 209 // primData.PathScaleY = 0;
210 primData.PathShearX = 0; 210 // primData.PathShearX = 0;
211 primData.PathShearY = 0; 211 // primData.PathShearY = 0;
212 primData.PathSkew = 0; 212 // primData.PathSkew = 0;
213 primData.ProfileBegin = 0; 213 // primData.ProfileBegin = 0;
214 primData.ProfileEnd = 0; 214 // primData.ProfileEnd = 0;
215 primData.PathCurve = 16; 215 // primData.PathCurve = 16;
216 primData.ProfileCurve = 1; 216 // primData.ProfileCurve = 1;
217 primData.ProfileHollow = 0; 217 // primData.ProfileHollow = 0;
218 primData.PathRadiusOffset = 0; 218 // primData.PathRadiusOffset = 0;
219 primData.PathRevolutions = 0; 219 // primData.PathRevolutions = 0;
220 primData.PathTaperX = 0; 220 // primData.PathTaperX = 0;
221 primData.PathTaperY = 0; 221 // primData.PathTaperY = 0;
222 primData.PathTwist = 0; 222 // primData.PathTwist = 0;
223 primData.PathTwistBegin = 0; 223 // primData.PathTwistBegin = 0;
224 224
225 return primData; 225 // return primData;
226 } 226 //}
227 } 227 }
228} 228}
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
index e058c07..9ab6071 100644
--- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
@@ -19,7 +19,7 @@ namespace OpenSim.Framework.Types
19 19
20 public class PrimitiveBaseShape 20 public class PrimitiveBaseShape
21 { 21 {
22 private ShapeType type = ShapeType.Unknown; 22 protected ShapeType type = ShapeType.Unknown;
23 23
24 public byte PCode; 24 public byte PCode;
25 public ushort PathBegin; 25 public ushort PathBegin;
@@ -72,38 +72,56 @@ namespace OpenSim.Framework.Types
72 72
73 public PrimitiveBaseShape Copy() 73 public PrimitiveBaseShape Copy()
74 { 74 {
75 return (PrimitiveBaseShape) this.MemberwiseClone(); 75 return (PrimitiveBaseShape)this.MemberwiseClone();
76 } 76 }
77 }
77 78
78 public static PrimitiveBaseShape DefaultBox() 79 public class BoxShape : PrimitiveBaseShape
80 {
81 public BoxShape()
79 { 82 {
80 PrimitiveBaseShape primShape = new PrimitiveBaseShape(); 83 type = ShapeType.Box;
84 }
85
86 public static BoxShape Default
87 {
88 get
89 {
90 BoxShape primShape = new BoxShape();
81 91
82 primShape.type = ShapeType.Box; 92 primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
83 primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 93 primShape.PCode = 9;
84 primShape.PCode = 9; 94 primShape.PathBegin = 0;
85 primShape.PathBegin = 0; 95 primShape.PathEnd = 0;
86 primShape.PathEnd = 0; 96 primShape.PathScaleX = 0;
87 primShape.PathScaleX = 0; 97 primShape.PathScaleY = 0;
88 primShape.PathScaleY = 0; 98 primShape.PathShearX = 0;
89 primShape.PathShearX = 0; 99 primShape.PathShearY = 0;
90 primShape.PathShearY = 0; 100 primShape.PathSkew = 0;
91 primShape.PathSkew = 0; 101 primShape.ProfileBegin = 0;
92 primShape.ProfileBegin = 0; 102 primShape.ProfileEnd = 0;
93 primShape.ProfileEnd = 0; 103 primShape.PathCurve = 16;
94 primShape.PathCurve = 16; 104 primShape.ProfileCurve = 1;
95 primShape.ProfileCurve = 1; 105 primShape.ProfileHollow = 0;
96 primShape.ProfileHollow = 0; 106 primShape.PathRadiusOffset = 0;
97 primShape.PathRadiusOffset = 0; 107 primShape.PathRevolutions = 0;
98 primShape.PathRevolutions = 0; 108 primShape.PathTaperX = 0;
99 primShape.PathTaperX = 0; 109 primShape.PathTaperY = 0;
100 primShape.PathTaperY = 0; 110 primShape.PathTwist = 0;
101 primShape.PathTwist = 0; 111 primShape.PathTwistBegin = 0;
102 primShape.PathTwistBegin = 0; 112 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
103 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); 113 primShape.TextureEntry = ntex.ToBytes();
104 primShape.TextureEntry = ntex.ToBytes();
105 114
106 return primShape; 115 return primShape;
116 }
117 }
118 }
119
120 public class SphereShape : PrimitiveBaseShape
121 {
122 public SphereShape()
123 {
124 type = ShapeType.Sphere;
107 } 125 }
108 } 126 }
109} 127}