diff options
author | lbsa71 | 2007-08-03 20:21:53 +0000 |
---|---|---|
committer | lbsa71 | 2007-08-03 20:21:53 +0000 |
commit | 6dabab5ef091982741db86037a27c3babc893d2f (patch) | |
tree | 69ef289930d1535354d4ac397edd5c70bea8ad71 /OpenSim/Framework | |
parent | changed the properties so that most of them only take up one line per get/set. (diff) | |
download | opensim-SC_OLD-6dabab5ef091982741db86037a27c3babc893d2f.zip opensim-SC_OLD-6dabab5ef091982741db86037a27c3babc893d2f.tar.gz opensim-SC_OLD-6dabab5ef091982741db86037a27c3babc893d2f.tar.bz2 opensim-SC_OLD-6dabab5ef091982741db86037a27c3babc893d2f.tar.xz |
* a very small first step with shape wrappers
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | 63 |
1 files changed, 26 insertions, 37 deletions
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs index d08c903..57018b2 100644 --- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | |||
@@ -3,23 +3,23 @@ using libsecondlife.Packets; | |||
3 | 3 | ||
4 | namespace OpenSim.Framework.Types | 4 | namespace OpenSim.Framework.Types |
5 | { | 5 | { |
6 | public enum ShapeType | 6 | //public enum ShapeType |
7 | { | 7 | //{ |
8 | Box, | 8 | // Box, |
9 | Sphere, | 9 | // Sphere, |
10 | Ring, | 10 | // Ring, |
11 | Tube, | 11 | // Tube, |
12 | Torus, | 12 | // Torus, |
13 | Prism, | 13 | // Prism, |
14 | Scuplted, | 14 | // Scuplted, |
15 | Cylinder, | 15 | // Cylinder, |
16 | Foliage, | 16 | // Foliage, |
17 | Unknown | 17 | // Unknown |
18 | } | 18 | //} |
19 | 19 | ||
20 | public class PrimitiveBaseShape | 20 | public class PrimitiveBaseShape |
21 | { | 21 | { |
22 | protected ShapeType type = ShapeType.Unknown; | 22 | //protected ShapeType m_type = ShapeType.Unknown; |
23 | 23 | ||
24 | public byte PCode; | 24 | public byte PCode; |
25 | public ushort PathBegin; | 25 | public ushort PathBegin; |
@@ -44,13 +44,13 @@ namespace OpenSim.Framework.Types | |||
44 | public byte[] TextureEntry; // a LL textureEntry in byte[] format | 44 | public byte[] TextureEntry; // a LL textureEntry in byte[] format |
45 | public byte[] ExtraParams; | 45 | public byte[] ExtraParams; |
46 | 46 | ||
47 | public ShapeType PrimType | 47 | //public ShapeType PrimType |
48 | { | 48 | //{ |
49 | get | 49 | // get |
50 | { | 50 | // { |
51 | return this.type; | 51 | // return this.m_type; |
52 | } | 52 | // } |
53 | } | 53 | //} |
54 | 54 | ||
55 | public LLVector3 PrimScale | 55 | public LLVector3 PrimScale |
56 | { | 56 | { |
@@ -79,10 +79,12 @@ namespace OpenSim.Framework.Types | |||
79 | 79 | ||
80 | public class BoxShape : PrimitiveBaseShape | 80 | public class BoxShape : PrimitiveBaseShape |
81 | { | 81 | { |
82 | public BoxShape() | 82 | public BoxShape() : base() |
83 | { | 83 | { |
84 | type = ShapeType.Box; | 84 | //m_type = ShapeType.Box; |
85 | ExtraParams = new byte[1]; | 85 | PathCurve = 16; |
86 | ProfileCurve = 1; | ||
87 | PCode = 9; | ||
86 | } | 88 | } |
87 | 89 | ||
88 | public static BoxShape Default | 90 | public static BoxShape Default |
@@ -92,7 +94,6 @@ namespace OpenSim.Framework.Types | |||
92 | BoxShape primShape = new BoxShape(); | 94 | BoxShape primShape = new BoxShape(); |
93 | 95 | ||
94 | primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); | 96 | primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); |
95 | primShape.PCode = 9; | ||
96 | primShape.PathBegin = 0; | 97 | primShape.PathBegin = 0; |
97 | primShape.PathEnd = 0; | 98 | primShape.PathEnd = 0; |
98 | primShape.PathScaleX = 0; | 99 | primShape.PathScaleX = 0; |
@@ -102,8 +103,6 @@ namespace OpenSim.Framework.Types | |||
102 | primShape.PathSkew = 0; | 103 | primShape.PathSkew = 0; |
103 | primShape.ProfileBegin = 0; | 104 | primShape.ProfileBegin = 0; |
104 | primShape.ProfileEnd = 0; | 105 | primShape.ProfileEnd = 0; |
105 | primShape.PathCurve = 16; | ||
106 | primShape.ProfileCurve = 1; | ||
107 | primShape.ProfileHollow = 0; | 106 | primShape.ProfileHollow = 0; |
108 | primShape.PathRadiusOffset = 0; | 107 | primShape.PathRadiusOffset = 0; |
109 | primShape.PathRevolutions = 0; | 108 | primShape.PathRevolutions = 0; |
@@ -113,19 +112,9 @@ namespace OpenSim.Framework.Types | |||
113 | primShape.PathTwistBegin = 0; | 112 | primShape.PathTwistBegin = 0; |
114 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); | 113 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); |
115 | primShape.TextureEntry = ntex.ToBytes(); | 114 | primShape.TextureEntry = ntex.ToBytes(); |
116 | primShape.ExtraParams = new byte[1]; | ||
117 | 115 | ||
118 | return primShape; | 116 | return primShape; |
119 | } | 117 | } |
120 | } | 118 | } |
121 | } | 119 | } |
122 | |||
123 | public class SphereShape : PrimitiveBaseShape | ||
124 | { | ||
125 | public SphereShape() | ||
126 | { | ||
127 | type = ShapeType.Sphere; | ||
128 | ExtraParams = new byte[1]; | ||
129 | } | ||
130 | } | ||
131 | } | 120 | } |