aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorlbsa712007-08-08 11:16:45 +0000
committerlbsa712007-08-08 11:16:45 +0000
commitef0fea268fde12b6279de067332f608554a8a1ac (patch)
treeab7b07311ec95b0107a0f5c7b6adb25d38aa6806 /OpenSim/Framework
parentCAPS should now be working in standalone mode. Texture uploads will work even... (diff)
downloadopensim-SC_OLD-ef0fea268fde12b6279de067332f608554a8a1ac.zip
opensim-SC_OLD-ef0fea268fde12b6279de067332f608554a8a1ac.tar.gz
opensim-SC_OLD-ef0fea268fde12b6279de067332f608554a8a1ac.tar.bz2
opensim-SC_OLD-ef0fea268fde12b6279de067332f608554a8a1ac.tar.xz
* Got SimpleApp working again
* Minor shape koncept experiments
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs90
1 files changed, 49 insertions, 41 deletions
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
index 41a58fe..045569b 100644
--- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
@@ -3,27 +3,24 @@ using libsecondlife.Packets;
3 3
4namespace OpenSim.Framework.Types 4namespace OpenSim.Framework.Types
5{ 5{
6 //public enum ShapeType 6 public enum ProfileShape : byte
7 //{ 7 {
8 // Box, 8 Circle = 0,
9 // Sphere, 9 Square = 1,
10 // Ring, 10 IsometricTriangle = 2,
11 // Tube, 11 EquilateralTriangle = 3,
12 // Torus, 12 RightTriangle = 4,
13 // Prism, 13 HalfCircle = 5
14 // Scuplted, 14 }
15 // Cylinder,
16 // Foliage,
17 // Unknown
18 //}
19
20
21 15
22 public class PrimitiveBaseShape 16 public enum HollowShape : byte
23 { 17 {
24 //protected ShapeType m_type = ShapeType.Unknown; 18 Same = 0,
25 19 // Fill in...
20 }
26 21
22 public class PrimitiveBaseShape
23 {
27 private static byte[] m_defaultTextureEntry; 24 private static byte[] m_defaultTextureEntry;
28 25
29 public byte PCode; 26 public byte PCode;
@@ -49,13 +46,31 @@ namespace OpenSim.Framework.Types
49 public byte[] TextureEntry; // a LL textureEntry in byte[] format 46 public byte[] TextureEntry; // a LL textureEntry in byte[] format
50 public byte[] ExtraParams; 47 public byte[] ExtraParams;
51 48
52 //public ShapeType PrimType 49 public ProfileShape ProfileShape
53 //{ 50 {
54 // get 51 get
55 // { 52 {
56 // return this.m_type; 53 return (ProfileShape)(ProfileCurve & 0xf);
57 // } 54 }
58 //} 55 set
56 {
57 byte oldValueMasked = (byte)(ProfileCurve & 0xf0);
58 ProfileCurve = (byte)(oldValueMasked | (byte)value);
59 }
60 }
61
62 public HollowShape HoleShape
63 {
64 get
65 {
66 return (HollowShape)(ProfileHollow & 0xf0);
67 }
68 set
69 {
70 byte oldValueMasked = (byte)(ProfileHollow & 0xf0);
71 ProfileHollow = (byte)(oldValueMasked | (byte)value);
72 }
73 }
59 74
60 public LLVector3 PrimScale 75 public LLVector3 PrimScale
61 { 76 {
@@ -88,36 +103,29 @@ namespace OpenSim.Framework.Types
88 } 103 }
89 } 104 }
90 105
91 enum ProfileShape
92 {
93 Circle = 0,
94 Square = 1,
95 IsometricTriangle = 2,
96 EquilateralTriangle = 3,
97 RightTriangle = 4,
98 HalfCircle = 5
99 }
100
101 public class GenericShape : PrimitiveBaseShape 106 public class GenericShape : PrimitiveBaseShape
102 { 107 {
103
104 public GenericShape() : base() 108 public GenericShape() : base()
105 { 109 {
106 110
107 } 111 }
108 } 112 }
109 113
110 public class BoxShape : PrimitiveBaseShape 114 public class BoxShape : PrimitiveBaseShape
111 { 115 {
112 public BoxShape() : base() 116 public BoxShape() : base()
113 { 117 {
114 //m_type = ShapeType.Box;
115 PathCurve = 16; 118 PathCurve = 16;
116 ProfileCurve = 1; 119 ProfileShape = ProfileShape.Square;
117 PCode = 9; 120 PCode = 9;
118 PathScaleX = 100; 121 PathScaleX = 100;
119 PathScaleY = 100; 122 PathScaleY = 100;
120 } 123 }
124
125 public void SetSide( float side )
126 {
127 Scale = new LLVector3( side, side, side );
128 }
121 129
122 public static BoxShape Default 130 public static BoxShape Default
123 { 131 {
@@ -125,7 +133,7 @@ namespace OpenSim.Framework.Types
125 { 133 {
126 BoxShape boxShape = new BoxShape(); 134 BoxShape boxShape = new BoxShape();
127 135
128 boxShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 136 boxShape.SetSide( 0.5f );
129 137
130 return boxShape; 138 return boxShape;
131 } 139 }