diff options
Diffstat (limited to 'OpenSim/Region/Examples')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | 65 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | 286 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/MyWorld.cs | 32 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/Program.cs | 87 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs | 31 |
7 files changed, 342 insertions, 198 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs index f5a080f..bfd9d06 100644 --- a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | |||
@@ -26,60 +26,69 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | using OpenSim.Region.Environment.Scenes; | ||
33 | using Axiom.Math; | ||
34 | using libsecondlife; | 29 | using libsecondlife; |
35 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
36 | using OpenSim.Framework.Interfaces; | 31 | using OpenSim.Region.Environment.Scenes; |
37 | 32 | ||
38 | namespace SimpleApp | 33 | namespace SimpleApp |
39 | { | 34 | { |
40 | public class ComplexObject : SceneObjectGroup | 35 | public class ComplexObject : SceneObjectGroup |
41 | { | 36 | { |
42 | private LLQuaternion m_rotationDirection; | 37 | private LLQuaternion m_rotationDirection; |
43 | 38 | ||
44 | private class RotatingWheel : SceneObjectPart | 39 | private class RotatingWheel : SceneObjectPart |
45 | { | 40 | { |
46 | private LLQuaternion m_rotationDirection; | 41 | private LLQuaternion m_rotationDirection; |
47 | 42 | ||
48 | public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, LLVector3 groupPosition, LLVector3 offsetPosition, LLQuaternion rotationDirection) | 43 | public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, |
49 | : base(regionHandle, parent, ownerID, localID, new CylinderShape( 0.5f, 0.2f ), groupPosition, offsetPosition ) | 44 | LLVector3 groupPosition, LLVector3 offsetPosition, LLQuaternion rotationDirection) |
45 | : base( | ||
46 | regionHandle, parent, ownerID, localID, new CylinderShape(0.5f, 0.2f), groupPosition, offsetPosition | ||
47 | ) | ||
50 | { | 48 | { |
51 | m_rotationDirection = rotationDirection; | 49 | m_rotationDirection = rotationDirection; |
52 | } | 50 | } |
53 | 51 | ||
54 | public override void UpdateMovement() | 52 | public override void UpdateMovement() |
55 | { | 53 | { |
56 | UpdateRotation(RotationOffset * m_rotationDirection); | 54 | UpdateRotation(RotationOffset*m_rotationDirection); |
57 | } | 55 | } |
58 | } | 56 | } |
59 | 57 | ||
60 | public override void UpdateMovement() | 58 | public override void UpdateMovement() |
61 | { | 59 | { |
62 | UpdateGroupRotation(GroupRotation * m_rotationDirection); | 60 | UpdateGroupRotation(GroupRotation*m_rotationDirection); |
63 | 61 | ||
64 | base.UpdateMovement(); | 62 | base.UpdateMovement(); |
65 | } | 63 | } |
66 | 64 | ||
67 | 65 | ||
68 | 66 | public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos) | |
69 | public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos ) | 67 | : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default) |
70 | : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default ) | ||
71 | { | 68 | { |
72 | m_rotationDirection = new LLQuaternion(0.05f, 0.1f, 0.15f); | 69 | m_rotationDirection = new LLQuaternion(0.05f, 0.1f, 0.15f); |
73 | 70 | ||
74 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 0.75f), new LLQuaternion(0.05f,0,0))); | 71 | AddPart( |
75 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -0.75f), new LLQuaternion(-0.05f,0,0))); | 72 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 0.75f), |
73 | new LLQuaternion(0.05f, 0, 0))); | ||
74 | AddPart( | ||
75 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -0.75f), | ||
76 | new LLQuaternion(-0.05f, 0, 0))); | ||
77 | |||
78 | AddPart( | ||
79 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0.75f, 0), | ||
80 | new LLQuaternion(0.5f, 0, 0.05f))); | ||
81 | AddPart( | ||
82 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, -0.75f, 0), | ||
83 | new LLQuaternion(-0.5f, 0, -0.05f))); | ||
76 | 84 | ||
77 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0.75f,0), new LLQuaternion(0.5f, 0, 0.05f))); | 85 | AddPart( |
78 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, -0.75f,0), new LLQuaternion(-0.5f, 0, -0.05f))); | 86 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0.75f, 0, 0), |
87 | new LLQuaternion(0, 0.5f, 0.05f))); | ||
88 | AddPart( | ||
89 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(-0.75f, 0, 0), | ||
90 | new LLQuaternion(0, -0.5f, -0.05f))); | ||
79 | 91 | ||
80 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0.75f, 0, 0), new LLQuaternion(0, 0.5f, 0.05f))); | ||
81 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(-0.75f, 0, 0), new LLQuaternion(0, -0.5f, -0.05f))); | ||
82 | |||
83 | UpdateParentIDs(); | 92 | UpdateParentIDs(); |
84 | } | 93 | } |
85 | 94 | ||
@@ -88,12 +97,12 @@ namespace SimpleApp | |||
88 | m_parts.Remove(part.UUID); | 97 | m_parts.Remove(part.UUID); |
89 | remoteClient.SendKillObject(m_regionHandle, part.LocalID); | 98 | remoteClient.SendKillObject(m_regionHandle, part.LocalID); |
90 | remoteClient.AddMoney(1); | 99 | remoteClient.AddMoney(1); |
91 | remoteClient.SendChatMessage("Poof!", 1, this.AbsolutePosition, "Party Party", LLUUID.Zero); | 100 | remoteClient.SendChatMessage("Poof!", 1, AbsolutePosition, "Party Party", LLUUID.Zero); |
92 | } | 101 | } |
93 | 102 | ||
94 | public override void OnGrabGroup( LLVector3 offsetPos, IClientAPI remoteClient) | 103 | public override void OnGrabGroup(LLVector3 offsetPos, IClientAPI remoteClient) |
95 | { | 104 | { |
96 | if( m_parts.Count == 1 ) | 105 | if (m_parts.Count == 1) |
97 | { | 106 | { |
98 | m_parts.Remove(m_rootPart.UUID); | 107 | m_parts.Remove(m_rootPart.UUID); |
99 | m_scene.RemoveEntity(this); | 108 | m_scene.RemoveEntity(this); |
@@ -103,4 +112,4 @@ namespace SimpleApp | |||
103 | } | 112 | } |
104 | } | 113 | } |
105 | } | 114 | } |
106 | } | 115 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs b/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs index 0f833ea..cbc4dea 100644 --- a/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs | |||
@@ -27,37 +27,34 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Diagnostics; |
31 | using System.Text; | ||
32 | using OpenSim.Region.Environment.Scenes; | ||
33 | using libsecondlife; | 31 | using libsecondlife; |
34 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
35 | using System.Timers; | 33 | using OpenSim.Region.Environment.Scenes; |
36 | using System.Diagnostics; | ||
37 | 34 | ||
38 | namespace SimpleApp | 35 | namespace SimpleApp |
39 | { | 36 | { |
40 | public class CpuCounterObject : SceneObjectGroup | 37 | public class CpuCounterObject : SceneObjectGroup |
41 | { | 38 | { |
42 | private PerformanceCounter m_counter; | 39 | private PerformanceCounter m_counter; |
43 | 40 | ||
44 | public CpuCounterObject(Scene world, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos ) | 41 | public CpuCounterObject(Scene world, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos) |
45 | : base(world, regionHandle, ownerID, localID, pos, BoxShape.Default ) | 42 | : base(world, regionHandle, ownerID, localID, pos, BoxShape.Default) |
46 | { | 43 | { |
47 | String objectName = "Processor"; | 44 | String objectName = "Processor"; |
48 | String counterName = "% Processor Time"; | 45 | String counterName = "% Processor Time"; |
49 | String instanceName = "_Total"; | 46 | String instanceName = "_Total"; |
50 | 47 | ||
51 | m_counter = new PerformanceCounter(objectName, counterName, instanceName); | 48 | m_counter = new PerformanceCounter(objectName, counterName, instanceName); |
52 | } | 49 | } |
53 | 50 | ||
54 | public override void UpdateMovement( ) | 51 | public override void UpdateMovement() |
55 | { | 52 | { |
56 | float cpu = m_counter.NextValue() / 40f; | 53 | float cpu = m_counter.NextValue()/40f; |
57 | LLVector3 size = new LLVector3(cpu, cpu, cpu); | 54 | LLVector3 size = new LLVector3(cpu, cpu, cpu); |
58 | //rootPrimitive.ResizeGoup( size ); | 55 | //rootPrimitive.ResizeGoup( size ); |
59 | 56 | ||
60 | base.UpdateMovement(); | 57 | base.UpdateMovement(); |
61 | } | 58 | } |
62 | } | 59 | } |
63 | } | 60 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs b/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs index 746340f..7b1420b 100644 --- a/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs | |||
@@ -27,14 +27,10 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.IO; |
31 | using System.Text; | ||
32 | using OpenSim.Region.Environment.Scenes; | ||
33 | using libsecondlife; | 31 | using libsecondlife; |
34 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
35 | using System.Timers; | 33 | using OpenSim.Region.Environment.Scenes; |
36 | using System.Diagnostics; | ||
37 | using System.IO; | ||
38 | 34 | ||
39 | namespace SimpleApp | 35 | namespace SimpleApp |
40 | { | 36 | { |
@@ -43,9 +39,7 @@ namespace SimpleApp | |||
43 | public FileSystemObject(Scene world, FileInfo fileInfo, LLVector3 pos) | 39 | public FileSystemObject(Scene world, FileInfo fileInfo, LLVector3 pos) |
44 | : base(world, world.RegionInfo.RegionHandle, LLUUID.Zero, world.NextLocalId, pos, BoxShape.Default) | 40 | : base(world, world.RegionInfo.RegionHandle, LLUUID.Zero, world.NextLocalId, pos, BoxShape.Default) |
45 | { | 41 | { |
46 | 42 | float size = (float) Math.Pow((double) fileInfo.Length, (double) 1/3)/5; | |
47 | |||
48 | float size = (float)Math.Pow((double)fileInfo.Length, (double)1 / 3) / 5; | ||
49 | // rootPrimitive.ResizeGoup(new LLVector3(size, size, size)); | 43 | // rootPrimitive.ResizeGoup(new LLVector3(size, size, size)); |
50 | Text = fileInfo.Name; | 44 | Text = fileInfo.Name; |
51 | ScheduleGroupForFullUpdate(); | 45 | ScheduleGroupForFullUpdate(); |
@@ -56,4 +50,4 @@ namespace SimpleApp | |||
56 | base.Update(); | 50 | base.Update(); |
57 | } | 51 | } |
58 | } | 52 | } |
59 | } | 53 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs index 03e0f98..f7fdbb5 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | |||
@@ -26,16 +26,14 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.Net; | 31 | using System.Net; |
31 | using System.Text; | 32 | using System.Text; |
32 | using libsecondlife; | 33 | using libsecondlife; |
33 | using libsecondlife.Packets; | 34 | using libsecondlife.Packets; |
34 | using OpenSim.Framework.Interfaces; | ||
35 | using OpenSim.Framework; | ||
36 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
37 | using OpenSim.Region.Environment.Scenes; | 36 | using OpenSim.Region.Environment.Scenes; |
38 | using System; | ||
39 | 37 | ||
40 | namespace SimpleApp | 38 | namespace SimpleApp |
41 | { | 39 | { |
@@ -126,13 +124,15 @@ namespace SimpleApp | |||
126 | #pragma warning restore 67 | 124 | #pragma warning restore 67 |
127 | 125 | ||
128 | private LLUUID myID = LLUUID.Random(); | 126 | private LLUUID myID = LLUUID.Random(); |
129 | public MyNpcCharacter( EventManager eventManager ) | 127 | |
128 | public MyNpcCharacter(EventManager eventManager) | ||
130 | { | 129 | { |
131 | // startPos = new LLVector3(128, (float)(Util.RandomClass.NextDouble()*100), 2); | 130 | // startPos = new LLVector3(128, (float)(Util.RandomClass.NextDouble()*100), 2); |
132 | eventManager.OnFrame += Update; | 131 | eventManager.OnFrame += Update; |
133 | } | 132 | } |
134 | 133 | ||
135 | private LLVector3 startPos = new LLVector3(128, 128,2); | 134 | private LLVector3 startPos = new LLVector3(128, 128, 2); |
135 | |||
136 | public virtual LLVector3 StartPos | 136 | public virtual LLVector3 StartPos |
137 | { | 137 | { |
138 | get { return startPos; } | 138 | get { return startPos; } |
@@ -155,92 +155,218 @@ namespace SimpleApp | |||
155 | } | 155 | } |
156 | 156 | ||
157 | private string lastName = "NPC" + Util.RandomClass.Next(1, 1000); | 157 | private string lastName = "NPC" + Util.RandomClass.Next(1, 1000); |
158 | |||
158 | public virtual string LastName | 159 | public virtual string LastName |
159 | { | 160 | { |
160 | get { return lastName; } | 161 | get { return lastName; } |
161 | } | 162 | } |
162 | 163 | ||
163 | public virtual void OutPacket(Packet newPack) { } | 164 | public virtual void OutPacket(Packet newPack) |
164 | public virtual void SendWearables(AvatarWearable[] wearables) { } | 165 | { |
165 | public virtual void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry) { } | 166 | } |
166 | public virtual void SendStartPingCheck(byte seq) { } | 167 | |
167 | public virtual void SendKillObject(ulong regionHandle, uint localID) { } | 168 | public virtual void SendWearables(AvatarWearable[] wearables) |
168 | public virtual void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId) { } | 169 | { |
169 | public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { } | 170 | } |
170 | public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { } | 171 | |
171 | public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) { } | 172 | public virtual void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry) |
172 | public virtual void SendLayerData(float[] map) { } | 173 | { |
173 | public virtual void SendLayerData(int px, int py, float[] map) { } | 174 | } |
174 | public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) { } | 175 | |
175 | public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) { } | 176 | public virtual void SendStartPingCheck(byte seq) |
176 | public virtual AgentCircuitData RequestClientInfo() { return new AgentCircuitData(); } | 177 | { |
177 | public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) { } | 178 | } |
178 | public virtual void SendMapBlock(List<MapBlockData> mapBlocks) { } | 179 | |
179 | public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) { } | 180 | public virtual void SendKillObject(ulong regionHandle, uint localID) |
180 | public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) { } | 181 | { |
181 | public virtual void SendTeleportCancel() { } | 182 | } |
182 | public virtual void SendTeleportLocationStart() { } | 183 | |
183 | public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) { } | 184 | public virtual void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId) |
184 | 185 | { | |
185 | public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID) { } | 186 | } |
186 | public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity, LLQuaternion rotation) { } | 187 | |
187 | public virtual void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations) { } | 188 | public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, |
188 | 189 | LLUUID fromAgentID) | |
189 | public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) { } | 190 | { |
190 | 191 | } | |
191 | public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID, byte[] particleSystem, LLQuaternion rotation) { } | 192 | |
192 | public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation) { } | 193 | public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, |
193 | 194 | LLUUID fromAgentID) | |
194 | public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items) { } | 195 | { |
195 | public virtual void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item) { } | 196 | } |
196 | public virtual void SendInventoryItemUpdate(InventoryItemBase Item) { } | 197 | |
197 | public virtual void SendRemoveInventoryItem(LLUUID itemID) { } | 198 | public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, |
198 | public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) { } | 199 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) |
199 | public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) { } | 200 | { |
200 | 201 | } | |
201 | public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname) { } | 202 | |
202 | 203 | public virtual void SendLayerData(float[] map) | |
203 | public virtual void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID) { } | 204 | { |
204 | public virtual void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags) { } | 205 | } |
205 | 206 | ||
206 | public void SendAlertMessage(string message) { } | 207 | public virtual void SendLayerData(int px, int py, float[] map) |
207 | public void SendAgentAlertMessage(string message, bool modal) { } | 208 | { |
208 | public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url) { } | 209 | } |
210 | |||
211 | public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) | ||
212 | { | ||
213 | } | ||
214 | |||
215 | public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) | ||
216 | { | ||
217 | } | ||
218 | |||
219 | public virtual AgentCircuitData RequestClientInfo() | ||
220 | { | ||
221 | return new AgentCircuitData(); | ||
222 | } | ||
223 | |||
224 | public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, | ||
225 | IPEndPoint newRegionExternalEndPoint, string capsURL) | ||
226 | { | ||
227 | } | ||
228 | |||
229 | public virtual void SendMapBlock(List<MapBlockData> mapBlocks) | ||
230 | { | ||
231 | } | ||
232 | |||
233 | public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) | ||
234 | { | ||
235 | } | ||
236 | |||
237 | public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, | ||
238 | uint locationID, uint flags, string capsURL) | ||
239 | { | ||
240 | } | ||
241 | |||
242 | public virtual void SendTeleportCancel() | ||
243 | { | ||
244 | } | ||
245 | |||
246 | public virtual void SendTeleportLocationStart() | ||
247 | { | ||
248 | } | ||
249 | |||
250 | public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) | ||
251 | { | ||
252 | } | ||
253 | |||
254 | public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, | ||
255 | uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID) | ||
256 | { | ||
257 | } | ||
258 | |||
259 | public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, | ||
260 | LLVector3 position, LLVector3 velocity, LLQuaternion rotation) | ||
261 | { | ||
262 | } | ||
263 | |||
264 | public virtual void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations) | ||
265 | { | ||
266 | } | ||
267 | |||
268 | public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) | ||
269 | { | ||
270 | } | ||
271 | |||
272 | public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, | ||
273 | PrimitiveBaseShape primShape, LLVector3 pos, uint flags, | ||
274 | LLUUID objectID, LLUUID ownerID, string text, uint parentID, | ||
275 | byte[] particleSystem, LLQuaternion rotation) | ||
276 | { | ||
277 | } | ||
278 | |||
279 | public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, | ||
280 | LLVector3 position, LLQuaternion rotation) | ||
281 | { | ||
282 | } | ||
283 | |||
284 | public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items) | ||
285 | { | ||
286 | } | ||
287 | |||
288 | public virtual void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item) | ||
289 | { | ||
290 | } | ||
291 | |||
292 | public virtual void SendInventoryItemUpdate(InventoryItemBase Item) | ||
293 | { | ||
294 | } | ||
295 | |||
296 | public virtual void SendRemoveInventoryItem(LLUUID itemID) | ||
297 | { | ||
298 | } | ||
299 | |||
300 | public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) | ||
301 | { | ||
302 | } | ||
303 | |||
304 | public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) | ||
305 | { | ||
306 | } | ||
307 | |||
308 | public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname) | ||
309 | { | ||
310 | } | ||
311 | |||
312 | public virtual void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID) | ||
313 | { | ||
314 | } | ||
315 | |||
316 | public virtual void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, | ||
317 | byte flags) | ||
318 | { | ||
319 | } | ||
320 | |||
321 | public void SendAlertMessage(string message) | ||
322 | { | ||
323 | } | ||
324 | |||
325 | public void SendAgentAlertMessage(string message, bool modal) | ||
326 | { | ||
327 | } | ||
328 | |||
329 | public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, | ||
330 | string url) | ||
331 | { | ||
332 | } | ||
209 | 333 | ||
210 | public virtual void SendRegionHandshake(RegionInfo regionInfo) | 334 | public virtual void SendRegionHandshake(RegionInfo regionInfo) |
211 | { | 335 | { |
212 | if (OnRegionHandShakeReply != null) | 336 | if (OnRegionHandShakeReply != null) |
213 | { | 337 | { |
214 | this.OnRegionHandShakeReply(this); | 338 | OnRegionHandShakeReply(this); |
215 | } | 339 | } |
216 | 340 | ||
217 | if (OnCompleteMovementToRegion != null) | 341 | if (OnCompleteMovementToRegion != null) |
218 | { | 342 | { |
219 | this.OnCompleteMovementToRegion(); | 343 | OnCompleteMovementToRegion(); |
220 | } | 344 | } |
221 | } | 345 | } |
222 | 346 | ||
223 | private void Update( ) | 347 | private void Update() |
224 | { | 348 | { |
225 | Encoding enc = Encoding.ASCII; | 349 | Encoding enc = Encoding.ASCII; |
226 | 350 | ||
227 | if (this.OnAgentUpdate != null) | 351 | if (OnAgentUpdate != null) |
228 | { | 352 | { |
229 | this.OnAgentUpdate(this, movementFlag, bodyDirection); | 353 | OnAgentUpdate(this, movementFlag, bodyDirection); |
230 | } | 354 | } |
231 | if (this.flyState == 0) | 355 | if (flyState == 0) |
232 | { | 356 | { |
233 | movementFlag = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY | (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG; | 357 | movementFlag = (uint) MainAvatar.ControlFlags.AGENT_CONTROL_FLY | |
358 | (uint) MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG; | ||
234 | flyState = 1; | 359 | flyState = 1; |
235 | } | 360 | } |
236 | else if (this.flyState == 1) | 361 | else if (flyState == 1) |
237 | { | 362 | { |
238 | movementFlag = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY | (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS; | 363 | movementFlag = (uint) MainAvatar.ControlFlags.AGENT_CONTROL_FLY | |
364 | (uint) MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS; | ||
239 | flyState = 2; | 365 | flyState = 2; |
240 | } | 366 | } |
241 | else | 367 | else |
242 | { | 368 | { |
243 | movementFlag = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY; | 369 | movementFlag = (uint) MainAvatar.ControlFlags.AGENT_CONTROL_FLY; |
244 | flyState = 0; | 370 | flyState = 0; |
245 | } | 371 | } |
246 | 372 | ||
@@ -251,15 +377,14 @@ namespace SimpleApp | |||
251 | ChatFromViewerArgs args = new ChatFromViewerArgs(); | 377 | ChatFromViewerArgs args = new ChatFromViewerArgs(); |
252 | args.Message = "Kinda quiet around here, isn't it?"; | 378 | args.Message = "Kinda quiet around here, isn't it?"; |
253 | args.Channel = 0; | 379 | args.Channel = 0; |
254 | args.From = this.FirstName + " " + this.LastName; | 380 | args.From = FirstName + " " + LastName; |
255 | args.Position = new LLVector3(128, 128, 26); | 381 | args.Position = new LLVector3(128, 128, 26); |
256 | args.Sender = this; | 382 | args.Sender = this; |
257 | args.Type = ChatTypeEnum.Shout; | 383 | args.Type = ChatTypeEnum.Shout; |
258 | 384 | ||
259 | this.OnChatFromViewer(this, args); | 385 | OnChatFromViewer(this, args); |
260 | } | 386 | } |
261 | count = -1; | 387 | count = -1; |
262 | |||
263 | } | 388 | } |
264 | 389 | ||
265 | count++; | 390 | count++; |
@@ -270,9 +395,19 @@ namespace SimpleApp | |||
270 | return false; | 395 | return false; |
271 | } | 396 | } |
272 | 397 | ||
273 | public void SendViewerTime(int phase) { } | 398 | public void SendViewerTime(int phase) |
274 | public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID) { } | 399 | { |
275 | public void SetDebug(int newDebug) { } | 400 | } |
401 | |||
402 | public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, | ||
403 | string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, | ||
404 | LLUUID partnerID) | ||
405 | { | ||
406 | } | ||
407 | |||
408 | public void SetDebug(int newDebug) | ||
409 | { | ||
410 | } | ||
276 | 411 | ||
277 | public void InPacket(Packet NewPack) | 412 | public void InPacket(Packet NewPack) |
278 | { | 413 | { |
@@ -281,22 +416,17 @@ namespace SimpleApp | |||
281 | public void Close() | 416 | public void Close() |
282 | { | 417 | { |
283 | } | 418 | } |
284 | 419 | ||
285 | private uint m_circuitCode; | 420 | private uint m_circuitCode; |
421 | |||
286 | public uint CircuitCode | 422 | public uint CircuitCode |
287 | { | 423 | { |
288 | get | 424 | get { return m_circuitCode; } |
289 | { | 425 | set { m_circuitCode = value; } |
290 | return m_circuitCode; | ||
291 | } | ||
292 | set | ||
293 | { | ||
294 | m_circuitCode = value; | ||
295 | } | ||
296 | } | 426 | } |
297 | 427 | ||
298 | public void SendLogoutPacket() | 428 | public void SendLogoutPacket() |
299 | { | 429 | { |
300 | } | 430 | } |
301 | } | 431 | } |
302 | } | 432 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs index 9a7b340..c616f6a 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs | |||
@@ -31,13 +31,9 @@ using libsecondlife; | |||
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Framework.Communications; | 32 | using OpenSim.Framework.Communications; |
33 | using OpenSim.Framework.Communications.Cache; | 33 | using OpenSim.Framework.Communications.Cache; |
34 | using OpenSim.Framework.Interfaces; | ||
35 | using OpenSim.Framework.Servers; | 34 | using OpenSim.Framework.Servers; |
36 | using OpenSim.Framework; | ||
37 | |||
38 | using OpenSim.Region.Environment.Scenes; | ||
39 | using OpenSim.Region.Terrain; | ||
40 | using OpenSim.Region.Environment; | 35 | using OpenSim.Region.Environment; |
36 | using OpenSim.Region.Environment.Scenes; | ||
41 | using Avatar=OpenSim.Region.Environment.Scenes.ScenePresence; | 37 | using Avatar=OpenSim.Region.Environment.Scenes.ScenePresence; |
42 | 38 | ||
43 | namespace SimpleApp | 39 | namespace SimpleApp |
@@ -46,8 +42,10 @@ namespace SimpleApp | |||
46 | { | 42 | { |
47 | private List<ScenePresence> m_avatars; | 43 | private List<ScenePresence> m_avatars; |
48 | 44 | ||
49 | public MyWorld( RegionInfo regionInfo, AgentCircuitManager authen, CommunicationsManager commsMan, AssetCache assetCach, StorageManager storeMan, BaseHttpServer httpServer, ModuleLoader moduleLoader) | 45 | public MyWorld(RegionInfo regionInfo, AgentCircuitManager authen, CommunicationsManager commsMan, |
50 | : base( regionInfo, authen, commsMan, assetCach, storeMan, httpServer, moduleLoader, false) | 46 | AssetCache assetCach, StorageManager storeMan, BaseHttpServer httpServer, |
47 | ModuleLoader moduleLoader) | ||
48 | : base(regionInfo, authen, commsMan, assetCach, storeMan, httpServer, moduleLoader, false) | ||
51 | { | 49 | { |
52 | m_avatars = new List<Avatar>(); | 50 | m_avatars = new List<Avatar>(); |
53 | } | 51 | } |
@@ -58,32 +56,30 @@ namespace SimpleApp | |||
58 | 56 | ||
59 | for (int i = 0; i < 65536; i++) | 57 | for (int i = 0; i < 65536; i++) |
60 | { | 58 | { |
61 | int x = i % 256; | 59 | int x = i%256; |
62 | int y = i / 256; | 60 | int y = i/256; |
63 | 61 | ||
64 | map[i] = 25f; | 62 | map[i] = 25f; |
65 | } | 63 | } |
66 | 64 | ||
67 | this.Terrain.GetHeights1D(map); | 65 | Terrain.GetHeights1D(map); |
68 | this.CreateTerrainTexture(); | 66 | CreateTerrainTexture(); |
69 | } | 67 | } |
70 | 68 | ||
71 | override public void AddNewClient(IClientAPI client, bool child) | 69 | public override void AddNewClient(IClientAPI client, bool child) |
72 | { | 70 | { |
73 | SubscribeToClientEvents(client); | 71 | SubscribeToClientEvents(client); |
74 | 72 | ||
75 | ScenePresence avatar = CreateAndAddScenePresence(client, child ); | 73 | ScenePresence avatar = CreateAndAddScenePresence(client, child); |
76 | avatar.AbsolutePosition = new LLVector3(128, 128, 26); | 74 | avatar.AbsolutePosition = new LLVector3(128, 128, 26); |
77 | 75 | ||
78 | LLVector3 pos = new LLVector3(128, 128, 128); | 76 | LLVector3 pos = new LLVector3(128, 128, 128); |
79 | 77 | ||
80 | client.OnCompleteMovementToRegion += delegate() | 78 | client.OnCompleteMovementToRegion += |
81 | { | 79 | delegate() { client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero); }; |
82 | client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero ); | ||
83 | }; | ||
84 | 80 | ||
85 | 81 | ||
86 | client.SendRegionHandshake(m_regInfo); | 82 | client.SendRegionHandshake(m_regInfo); |
87 | } | 83 | } |
88 | } | 84 | } |
89 | } | 85 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 72aaf6b..b37c2ee 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -31,23 +31,23 @@ using System.Collections.Generic; | |||
31 | using System.IO; | 31 | using System.IO; |
32 | using System.Net; | 32 | using System.Net; |
33 | using libsecondlife; | 33 | using libsecondlife; |
34 | using Nini.Config; | ||
35 | using OpenSim.Framework; | ||
34 | using OpenSim.Framework.Communications.Cache; | 36 | using OpenSim.Framework.Communications.Cache; |
35 | using OpenSim.Framework.Console; | 37 | using OpenSim.Framework.Console; |
36 | using OpenSim.Framework; | ||
37 | using OpenSim.Region.ClientStack; | 38 | using OpenSim.Region.ClientStack; |
38 | using OpenSim.Region.Communications.Local; | 39 | using OpenSim.Region.Communications.Local; |
39 | using OpenSim.Region.Environment; | 40 | using OpenSim.Region.Environment; |
40 | using OpenSim.Region.Environment.Scenes; | 41 | using OpenSim.Region.Environment.Scenes; |
41 | using OpenSim.Region.Physics.Manager; | 42 | using OpenSim.Region.Physics.Manager; |
42 | using Nini.Config; | ||
43 | 43 | ||
44 | namespace SimpleApp | 44 | namespace SimpleApp |
45 | { | 45 | { |
46 | class Program : RegionApplicationBase, conscmd_callback | 46 | internal class Program : RegionApplicationBase, conscmd_callback |
47 | { | 47 | { |
48 | private ModuleLoader m_moduleLoader; | 48 | private ModuleLoader m_moduleLoader; |
49 | private IConfigSource m_config; | 49 | private IConfigSource m_config; |
50 | 50 | ||
51 | protected override LogBase CreateLog() | 51 | protected override LogBase CreateLog() |
52 | { | 52 | { |
53 | return new LogBase(null, "SimpleApp", this, true); | 53 | return new LogBase(null, "SimpleApp", this, true); |
@@ -57,45 +57,51 @@ namespace SimpleApp | |||
57 | { | 57 | { |
58 | StartLog(); | 58 | StartLog(); |
59 | 59 | ||
60 | m_networkServersInfo = new NetworkServersInfo( 1000, 1000 ); | 60 | m_networkServersInfo = new NetworkServersInfo(1000, 1000); |
61 | 61 | ||
62 | LocalAssetServer assetServer = new LocalAssetServer(); | 62 | LocalAssetServer assetServer = new LocalAssetServer(); |
63 | 63 | ||
64 | m_assetCache = new AssetCache(assetServer); | 64 | m_assetCache = new AssetCache(assetServer); |
65 | } | 65 | } |
66 | 66 | ||
67 | public void Run() | 67 | public void Run() |
68 | { | 68 | { |
69 | base.StartUp(); | 69 | base.StartUp(); |
70 | 70 | ||
71 | LocalInventoryService inventoryService = new LocalInventoryService(); | 71 | LocalInventoryService inventoryService = new LocalInventoryService(); |
72 | LocalUserServices userService = new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, m_networkServersInfo.DefaultHomeLocY, inventoryService); | 72 | LocalUserServices userService = |
73 | new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, | ||
74 | m_networkServersInfo.DefaultHomeLocY, inventoryService); | ||
73 | LocalBackEndServices backendService = new LocalBackEndServices(); | 75 | LocalBackEndServices backendService = new LocalBackEndServices(); |
74 | 76 | ||
75 | CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, inventoryService, backendService, backendService, false); | 77 | CommunicationsLocal localComms = |
78 | new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, inventoryService, | ||
79 | backendService, backendService, false); | ||
76 | m_commsManager = localComms; | 80 | m_commsManager = localComms; |
77 | 81 | ||
78 | LocalLoginService loginService = new LocalLoginService(userService, "", localComms, m_networkServersInfo, false); | 82 | LocalLoginService loginService = |
83 | new LocalLoginService(userService, "", localComms, m_networkServersInfo, false); | ||
79 | loginService.OnLoginToRegion += backendService.AddNewSession; | 84 | loginService.OnLoginToRegion += backendService.AddNewSession; |
80 | 85 | ||
81 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); | 86 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); |
82 | 87 | ||
83 | m_log.Notice(m_log.LineInfo); | 88 | m_log.Notice(m_log.LineInfo); |
84 | 89 | ||
85 | IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), m_networkServersInfo.HttpListenerPort); | 90 | IPEndPoint internalEndPoint = |
91 | new IPEndPoint(IPAddress.Parse("127.0.0.1"), m_networkServersInfo.HttpListenerPort); | ||
86 | 92 | ||
87 | RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost"); | 93 | RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost"); |
88 | regionInfo.DataStore = "simpleapp_datastore.yap"; | 94 | regionInfo.DataStore = "simpleapp_datastore.yap"; |
89 | 95 | ||
90 | UDPServer udpServer; | 96 | UDPServer udpServer; |
91 | 97 | ||
92 | m_moduleLoader = new ModuleLoader( m_log, m_config ); | 98 | m_moduleLoader = new ModuleLoader(m_log, m_config); |
93 | m_moduleLoader.LoadDefaultSharedModules(); | 99 | m_moduleLoader.LoadDefaultSharedModules(); |
94 | 100 | ||
95 | Scene scene = SetupScene(regionInfo, out udpServer); | 101 | Scene scene = SetupScene(regionInfo, out udpServer); |
96 | 102 | ||
97 | m_moduleLoader.InitialiseSharedModules(scene); | 103 | m_moduleLoader.InitialiseSharedModules(scene); |
98 | 104 | ||
99 | scene.SetModuleInterfaces(); | 105 | scene.SetModuleInterfaces(); |
100 | 106 | ||
101 | scene.StartTimer(); | 107 | scene.StartTimer(); |
@@ -104,18 +110,22 @@ namespace SimpleApp | |||
104 | 110 | ||
105 | m_moduleLoader.PostInitialise(); | 111 | m_moduleLoader.PostInitialise(); |
106 | m_moduleLoader.ClearCache(); | 112 | m_moduleLoader.ClearCache(); |
107 | 113 | ||
108 | udpServer.ServerListener(); | 114 | udpServer.ServerListener(); |
109 | 115 | ||
110 | LLVector3 pos = new LLVector3(110, 129, 27); | 116 | LLVector3 pos = new LLVector3(110, 129, 27); |
111 | 117 | ||
112 | SceneObjectGroup sceneObject = new CpuCounterObject(scene, regionInfo.RegionHandle, LLUUID.Zero, scene.PrimIDAllocate(), pos + new LLVector3( 1f, 1f, 1f )); | 118 | SceneObjectGroup sceneObject = |
119 | new CpuCounterObject(scene, regionInfo.RegionHandle, LLUUID.Zero, scene.PrimIDAllocate(), | ||
120 | pos + new LLVector3(1f, 1f, 1f)); | ||
113 | scene.AddEntity(sceneObject); | 121 | scene.AddEntity(sceneObject); |
114 | 122 | ||
115 | for (int i = 0; i < 27; i++) | 123 | for (int i = 0; i < 27; i++) |
116 | { | 124 | { |
117 | LLVector3 posOffset = new LLVector3( (i%3)*4, (i%9)/3 * 4, (i/9) * 4 ); | 125 | LLVector3 posOffset = new LLVector3((i%3)*4, (i%9)/3*4, (i/9)*4); |
118 | ComplexObject complexObject = new ComplexObject(scene, regionInfo.RegionHandle, LLUUID.Zero, scene.PrimIDAllocate(), pos + posOffset ); | 126 | ComplexObject complexObject = |
127 | new ComplexObject(scene, regionInfo.RegionHandle, LLUUID.Zero, scene.PrimIDAllocate(), | ||
128 | pos + posOffset); | ||
119 | scene.AddEntity(complexObject); | 129 | scene.AddEntity(complexObject); |
120 | } | 130 | } |
121 | 131 | ||
@@ -128,45 +138,48 @@ namespace SimpleApp | |||
128 | List<ScenePresence> avatars = scene.GetAvatars(); | 138 | List<ScenePresence> avatars = scene.GetAvatars(); |
129 | foreach (ScenePresence avatar in avatars) | 139 | foreach (ScenePresence avatar in avatars) |
130 | { | 140 | { |
131 | avatar.AbsolutePosition = new LLVector3((float)OpenSim.Framework.Util.RandomClass.Next(100,200), (float)OpenSim.Framework.Util.RandomClass.Next(30, 200), 2); | 141 | avatar.AbsolutePosition = |
142 | new LLVector3((float) Util.RandomClass.Next(100, 200), (float) Util.RandomClass.Next(30, 200), 2); | ||
132 | } | 143 | } |
133 | 144 | ||
134 | 145 | ||
135 | 146 | DirectoryInfo dirInfo = new DirectoryInfo("."); | |
136 | DirectoryInfo dirInfo = new DirectoryInfo( "." ); | ||
137 | 147 | ||
138 | float x = 0; | 148 | float x = 0; |
139 | float z = 0; | 149 | float z = 0; |
140 | 150 | ||
141 | foreach( FileInfo fileInfo in dirInfo.GetFiles()) | 151 | foreach (FileInfo fileInfo in dirInfo.GetFiles()) |
142 | { | 152 | { |
143 | LLVector3 filePos = new LLVector3(100 + x, 129, 27 + z); | 153 | LLVector3 filePos = new LLVector3(100 + x, 129, 27 + z); |
144 | x = x + 2; | 154 | x = x + 2; |
145 | if( x > 50 ) | 155 | if (x > 50) |
146 | { | 156 | { |
147 | x = 0; | 157 | x = 0; |
148 | z = z + 2; | 158 | z = z + 2; |
149 | } | 159 | } |
150 | 160 | ||
151 | FileSystemObject fileObject = new FileSystemObject( scene, fileInfo, filePos ); | 161 | FileSystemObject fileObject = new FileSystemObject(scene, fileInfo, filePos); |
152 | scene.AddEntity(fileObject); | 162 | scene.AddEntity(fileObject); |
153 | } | 163 | } |
154 | 164 | ||
155 | m_log.Notice("Press enter to quit."); | 165 | m_log.Notice("Press enter to quit."); |
156 | m_log.ReadLine(); | 166 | m_log.ReadLine(); |
157 | } | 167 | } |
158 | 168 | ||
159 | protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, AgentCircuitManager circuitManager) | 169 | protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, |
170 | AgentCircuitManager circuitManager) | ||
160 | { | 171 | { |
161 | return new MyWorld(regionInfo, circuitManager, m_commsManager, m_assetCache, storageManager, m_httpServer, new ModuleLoader( m_log, m_config )); | 172 | return |
173 | new MyWorld(regionInfo, circuitManager, m_commsManager, m_assetCache, storageManager, m_httpServer, | ||
174 | new ModuleLoader(m_log, m_config)); | ||
162 | } | 175 | } |
163 | 176 | ||
164 | protected override StorageManager CreateStorageManager(RegionInfo regionInfo) | 177 | protected override StorageManager CreateStorageManager(RegionInfo regionInfo) |
165 | { | 178 | { |
166 | return new StorageManager("OpenSim.DataStore.NullStorage.dll", "simpleapp.yap", "simpleapp"); | 179 | return new StorageManager("OpenSim.DataStore.NullStorage.dll", "simpleapp.yap", "simpleapp"); |
167 | } | 180 | } |
168 | 181 | ||
169 | protected override PhysicsScene GetPhysicsScene( ) | 182 | protected override PhysicsScene GetPhysicsScene() |
170 | { | 183 | { |
171 | return GetPhysicsScene("basicphysics"); | 184 | return GetPhysicsScene("basicphysics"); |
172 | } | 185 | } |
@@ -185,11 +198,11 @@ namespace SimpleApp | |||
185 | 198 | ||
186 | #endregion | 199 | #endregion |
187 | 200 | ||
188 | static void Main(string[] args) | 201 | private static void Main(string[] args) |
189 | { | 202 | { |
190 | Program app = new Program(); | 203 | Program app = new Program(); |
191 | 204 | ||
192 | app.Run(); | 205 | app.Run(); |
193 | } | 206 | } |
194 | } | 207 | } |
195 | } | 208 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs b/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs index 2250613..a5c8f05 100644 --- a/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs | |||
@@ -1,24 +1,28 @@ | |||
1 | using System.Reflection; | 1 | using System.Reflection; |
2 | using System.Runtime.InteropServices; | 2 | using System.Runtime.InteropServices; |
3 | |||
3 | // General Information about an assembly is controlled through the following | 4 | // General Information about an assembly is controlled through the following |
4 | // set of attributes. Change these attribute values to modify the information | 5 | // set of attributes. Change these attribute values to modify the information |
5 | // associated with an assembly. | 6 | // associated with an assembly. |
6 | [assembly: AssemblyTitle("SimpleApp")] | 7 | |
7 | [assembly: AssemblyDescription("")] | 8 | [assembly : AssemblyTitle("SimpleApp")] |
8 | [assembly: AssemblyConfiguration("")] | 9 | [assembly : AssemblyDescription("")] |
9 | [assembly: AssemblyCompany("Playahead AB")] | 10 | [assembly : AssemblyConfiguration("")] |
10 | [assembly: AssemblyProduct("SimpleApp")] | 11 | [assembly : AssemblyCompany("Playahead AB")] |
11 | [assembly: AssemblyCopyright("Copyright © Playahead AB 2007")] | 12 | [assembly : AssemblyProduct("SimpleApp")] |
12 | [assembly: AssemblyTrademark("")] | 13 | [assembly : AssemblyCopyright("Copyright © Playahead AB 2007")] |
13 | [assembly: AssemblyCulture("")] | 14 | [assembly : AssemblyTrademark("")] |
15 | [assembly : AssemblyCulture("")] | ||
14 | 16 | ||
15 | // Setting ComVisible to false makes the types in this assembly not visible | 17 | // Setting ComVisible to false makes the types in this assembly not visible |
16 | // to COM components. If you need to access a type in this assembly from | 18 | // to COM components. If you need to access a type in this assembly from |
17 | // COM, set the ComVisible attribute to true on that type. | 19 | // COM, set the ComVisible attribute to true on that type. |
18 | [assembly: ComVisible(false)] | 20 | |
21 | [assembly : ComVisible(false)] | ||
19 | 22 | ||
20 | // The following GUID is for the ID of the typelib if this project is exposed to COM | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM |
21 | [assembly: Guid("a5cfa45f-5acf-4b2e-9c50-1dd1fd7608ee")] | 24 | |
25 | [assembly : Guid("a5cfa45f-5acf-4b2e-9c50-1dd1fd7608ee")] | ||
22 | 26 | ||
23 | // Version information for an assembly consists of the following four values: | 27 | // Version information for an assembly consists of the following four values: |
24 | // | 28 | // |
@@ -27,5 +31,6 @@ using System.Runtime.InteropServices; | |||
27 | // Build Number | 31 | // Build Number |
28 | // Revision | 32 | // Revision |
29 | // | 33 | // |
30 | [assembly: AssemblyVersion("1.0.0.0")] | 34 | |
31 | [assembly: AssemblyFileVersion("1.0.0.0")] | 35 | [assembly : AssemblyVersion("1.0.0.0")] |
36 | [assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file | ||