aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
diff options
context:
space:
mode:
authorMW2007-07-01 17:26:33 +0000
committerMW2007-07-01 17:26:33 +0000
commit9800c05c1b3c7804466d6f3a9c38a739156625fd (patch)
treed4776d600e2ca547214ac3dcf2f4a0407e28ac5e /OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
parent* now saves ExternalHostName in config (diff)
downloadopensim-SC_OLD-9800c05c1b3c7804466d6f3a9c38a739156625fd.zip
opensim-SC_OLD-9800c05c1b3c7804466d6f3a9c38a739156625fd.tar.gz
opensim-SC_OLD-9800c05c1b3c7804466d6f3a9c38a739156625fd.tar.bz2
opensim-SC_OLD-9800c05c1b3c7804466d6f3a9c38a739156625fd.tar.xz
Started change to having SceneObject and then that having child Primitives which in turn have a Shape object (currently PrimitiveBaseShape). The plan is only for the SceneObject to interface with the physics engines. As a physics Entity should be able to have mulitple shapes connected to it.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs106
1 files changed, 106 insertions, 0 deletions
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
new file mode 100644
index 0000000..094a8a0
--- /dev/null
+++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
@@ -0,0 +1,106 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using libsecondlife.Packets;
6using OpenSim.Framework.Interfaces;
7
8namespace OpenSim.Framework.Types
9{
10 public enum ShapeType
11 {
12 Box,
13 Sphere,
14 Ring,
15 Tube,
16 Torus,
17 Prism,
18 Scuplted,
19 Cylinder
20 }
21
22 public class PrimitiveBaseShape
23 {
24 private ShapeType type;
25
26 public byte PCode;
27 public ushort PathBegin;
28 public ushort PathEnd;
29 public byte PathScaleX;
30 public byte PathScaleY;
31 public byte PathShearX;
32 public byte PathShearY;
33 public sbyte PathSkew;
34 public ushort ProfileBegin;
35 public ushort ProfileEnd;
36 public LLVector3 Scale;
37 public byte PathCurve;
38 public byte ProfileCurve;
39 public uint ParentID = 0;
40 public ushort ProfileHollow;
41 public sbyte PathRadiusOffset;
42 public byte PathRevolutions;
43 public sbyte PathTaperX;
44 public sbyte PathTaperY;
45 public sbyte PathTwist;
46 public sbyte PathTwistBegin;
47 public byte[] TextureEntry; // a LL textureEntry in byte[] format
48
49 public ShapeType PrimType
50 {
51 get
52 {
53 return this.type;
54 }
55 }
56
57 public LLVector3 PrimScale
58 {
59 get
60 {
61 return this.Scale;
62 }
63 }
64
65 public PrimitiveBaseShape()
66 {
67
68 }
69
70 //void returns need to change of course
71 public void GetMesh()
72 {
73
74 }
75
76 public static PrimitiveBaseShape DefaultCube()
77 {
78 PrimitiveBaseShape primShape = new PrimitiveBaseShape();
79
80 primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
81 primShape.PCode = 9;
82 primShape.ParentID = 0;
83 primShape.PathBegin = 0;
84 primShape.PathEnd = 0;
85 primShape.PathScaleX = 0;
86 primShape.PathScaleY = 0;
87 primShape.PathShearX = 0;
88 primShape.PathShearY = 0;
89 primShape.PathSkew = 0;
90 primShape.ProfileBegin = 0;
91 primShape.ProfileEnd = 0;
92 primShape.PathCurve = 16;
93 primShape.ProfileCurve = 1;
94 primShape.ProfileHollow = 0;
95 primShape.PathRadiusOffset = 0;
96 primShape.PathRevolutions = 0;
97 primShape.PathTaperX = 0;
98 primShape.PathTaperY = 0;
99 primShape.PathTwist = 0;
100 primShape.PathTwistBegin = 0;
101
102 return primShape;
103 }
104 }
105
106}