aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
diff options
context:
space:
mode:
authorMW2007-08-19 13:35:20 +0000
committerMW2007-08-19 13:35:20 +0000
commitc89db49f3cd3bbd60577eb5a1787ccf8dea930e3 (patch)
tree2b51b0d261724427933f543dd2f39ef8cd21127f /OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
parentCode comments on recent changes in EventQueueManager (diff)
downloadopensim-SC_OLD-c89db49f3cd3bbd60577eb5a1787ccf8dea930e3.zip
opensim-SC_OLD-c89db49f3cd3bbd60577eb5a1787ccf8dea930e3.tar.gz
opensim-SC_OLD-c89db49f3cd3bbd60577eb5a1787ccf8dea930e3.tar.bz2
opensim-SC_OLD-c89db49f3cd3bbd60577eb5a1787ccf8dea930e3.tar.xz
Sqlite datastore should now save the textures and extraparams data (used by sculpties) correctly. [Really need to add a ExtraParams field to the sqlite database though, but for now I have combined their data so that we don't lose backward compatibility, know a couple of people have been using the datastore already].
Now have a rough day/night cycle (the movement of the sun needs to be made smoother but for now it is better than we had I think). Added dalien's patch (issue 294) for saving and loading prims to a xml file (think he will be modifying these to be import/export functions and maybe writing a xml datastore for backups). Some preliminary work on task inventory (ie object's/prim's inventory). Added place holder data for AvatarProperties (ie a avatar's profile). Should we store this sort of data on the user server or have another server for it (a normal webserver should work). Added a few more method to IClientAPI. Sure there is something I'm forgeting.
Diffstat (limited to 'OpenSim/Framework/General/Types/PrimitiveBaseShape.cs')
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs33
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}