aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMW2007-07-01 17:26:33 +0000
committerMW2007-07-01 17:26:33 +0000
commit9800c05c1b3c7804466d6f3a9c38a739156625fd (patch)
treed4776d600e2ca547214ac3dcf2f4a0407e28ac5e /OpenSim/Framework
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 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs7
-rw-r--r--OpenSim/Framework/General/Interfaces/IClientAPI.cs2
-rw-r--r--OpenSim/Framework/General/OpenSim.Framework.csproj3
-rw-r--r--OpenSim/Framework/General/OpenSim.Framework.dll.build1
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs106
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs12
6 files changed, 117 insertions, 14 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index b17b37b..48ff40e 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -54,13 +54,16 @@ namespace OpenSim.Framework.Communications
54 #region Packet Handlers 54 #region Packet Handlers
55 public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client) 55 public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client)
56 { 56 {
57 System.Text.Encoding enc = System.Text.Encoding.ASCII;
57 UserProfileData profileData = this.UserServer.GetUserProfile(uuid); 58 UserProfileData profileData = this.UserServer.GetUserProfile(uuid);
58 if (profileData != null) 59 if (profileData != null)
59 { 60 {
60 UUIDNameReplyPacket packet = new UUIDNameReplyPacket(); 61 UUIDNameReplyPacket packet = new UUIDNameReplyPacket();
62 packet.UUIDNameBlock = new UUIDNameReplyPacket.UUIDNameBlockBlock[1];
63 packet.UUIDNameBlock[0] = new UUIDNameReplyPacket.UUIDNameBlockBlock();
61 packet.UUIDNameBlock[0].ID = profileData.UUID; 64 packet.UUIDNameBlock[0].ID = profileData.UUID;
62 packet.UUIDNameBlock[0].FirstName = libsecondlife.Helpers.StringToField(profileData.username); 65 packet.UUIDNameBlock[0].FirstName = enc.GetBytes(profileData.username + "\0");
63 packet.UUIDNameBlock[0].LastName = libsecondlife.Helpers.StringToField(profileData.surname); 66 packet.UUIDNameBlock[0].LastName = enc.GetBytes(profileData.surname +"\0");
64 remote_client.OutPacket((Packet)packet); 67 remote_client.OutPacket((Packet)packet);
65 } 68 }
66 69
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 @@
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}
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 8c8204a..681bb46 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -167,18 +167,6 @@ namespace OpenSim.Framework.Servers
167 return response; 167 return response;
168 } 168 }
169 169
170 protected virtual string ParseLLSDXML(string requestBody)
171 {
172 // dummy function for now - IMPLEMENT ME!
173 //Console.WriteLine("LLSD request "+requestBody);
174 string resp = "";
175 if (firstcaps)
176 {
177 resp = "<llsd><map><key>MapLayer</key><string>http://127.0.0.1:9000/CAPS/</string></map></llsd>";
178 firstcaps = false;
179 }
180 return resp;
181 }
182 170
183 protected virtual string ParseXMLRPC(string requestBody) 171 protected virtual string ParseXMLRPC(string requestBody)
184 { 172 {