diff options
author | MW | 2007-07-01 17:26:33 +0000 |
---|---|---|
committer | MW | 2007-07-01 17:26:33 +0000 |
commit | 9800c05c1b3c7804466d6f3a9c38a739156625fd (patch) | |
tree | d4776d600e2ca547214ac3dcf2f4a0407e28ac5e /OpenSim/Framework/General | |
parent | * now saves ExternalHostName in config (diff) | |
download | opensim-SC-9800c05c1b3c7804466d6f3a9c38a739156625fd.zip opensim-SC-9800c05c1b3c7804466d6f3a9c38a739156625fd.tar.gz opensim-SC-9800c05c1b3c7804466d6f3a9c38a739156625fd.tar.bz2 opensim-SC-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 'OpenSim/Framework/General')
4 files changed, 112 insertions, 0 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index ea4c5c9..9c112ae 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs | |||
@@ -160,6 +160,8 @@ namespace OpenSim.Framework.Interfaces | |||
160 | void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); | 160 | void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); |
161 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID , uint flags); | 161 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID , uint flags); |
162 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags); | 162 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags); |
163 | void SendPrimitiveToClient2(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags, LLUUID objectID, LLUUID ownerID); | ||
164 | void SendPrimitiveToClient2(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLUUID textureID, uint flags, LLUUID objectID, LLUUID ownerID); | ||
163 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation); | 165 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation); |
164 | } | 166 | } |
165 | } | 167 | } |
diff --git a/OpenSim/Framework/General/OpenSim.Framework.csproj b/OpenSim/Framework/General/OpenSim.Framework.csproj index 7d3d53a..a577ea3 100644 --- a/OpenSim/Framework/General/OpenSim.Framework.csproj +++ b/OpenSim/Framework/General/OpenSim.Framework.csproj | |||
@@ -184,6 +184,9 @@ | |||
184 | <Compile Include="Types\PrimData.cs"> | 184 | <Compile Include="Types\PrimData.cs"> |
185 | <SubType>Code</SubType> | 185 | <SubType>Code</SubType> |
186 | </Compile> | 186 | </Compile> |
187 | <Compile Include="Types\PrimitiveBaseShape.cs"> | ||
188 | <SubType>Code</SubType> | ||
189 | </Compile> | ||
187 | <Compile Include="Types\RegionHandle.cs"> | 190 | <Compile Include="Types\RegionHandle.cs"> |
188 | <SubType>Code</SubType> | 191 | <SubType>Code</SubType> |
189 | </Compile> | 192 | </Compile> |
diff --git a/OpenSim/Framework/General/OpenSim.Framework.dll.build b/OpenSim/Framework/General/OpenSim.Framework.dll.build index 239e3e5..10fafbf 100644 --- a/OpenSim/Framework/General/OpenSim.Framework.dll.build +++ b/OpenSim/Framework/General/OpenSim.Framework.dll.build | |||
@@ -43,6 +43,7 @@ | |||
43 | <include name="Types/NetworkServersInfo.cs" /> | 43 | <include name="Types/NetworkServersInfo.cs" /> |
44 | <include name="Types/ParcelData.cs" /> | 44 | <include name="Types/ParcelData.cs" /> |
45 | <include name="Types/PrimData.cs" /> | 45 | <include name="Types/PrimData.cs" /> |
46 | <include name="Types/PrimitiveBaseShape.cs" /> | ||
46 | <include name="Types/RegionHandle.cs" /> | 47 | <include name="Types/RegionHandle.cs" /> |
47 | <include name="Types/RegionInfo.cs" /> | 48 | <include name="Types/RegionInfo.cs" /> |
48 | <include name="Types/UUID.cs" /> | 49 | <include name="Types/UUID.cs" /> |
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 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using libsecondlife; | ||
5 | using libsecondlife.Packets; | ||
6 | using OpenSim.Framework.Interfaces; | ||
7 | |||
8 | namespace 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 | } | ||