aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/World/Entities/SceneObject.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.Region/World/Entities/SceneObject.cs')
-rw-r--r--OpenSim/OpenSim.Region/World/Entities/SceneObject.cs130
1 files changed, 130 insertions, 0 deletions
diff --git a/OpenSim/OpenSim.Region/World/Entities/SceneObject.cs b/OpenSim/OpenSim.Region/World/Entities/SceneObject.cs
new file mode 100644
index 0000000..6ded881
--- /dev/null
+++ b/OpenSim/OpenSim.Region/World/Entities/SceneObject.cs
@@ -0,0 +1,130 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenSim.Region.types;
32using libsecondlife;
33using libsecondlife.Packets;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Physics.Manager;
36using OpenSim.Framework.Types;
37using OpenSim.Framework.Inventory;
38
39namespace OpenSim.Region
40{
41 public class SceneObject : Entity
42 {
43 private LLUUID rootUUID;
44 //private Dictionary<LLUUID, Primitive> ChildPrimitives = new Dictionary<LLUUID, Primitive>();
45 protected Primitive rootPrimitive;
46 private World m_world;
47 protected ulong regionHandle;
48
49 /// <summary>
50 ///
51 /// </summary>
52 public SceneObject()
53 {
54
55 }
56
57 /// <summary>
58 ///
59 /// </summary>
60 /// <param name="addPacket"></param>
61 /// <param name="agentID"></param>
62 /// <param name="localID"></param>
63 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID)
64 {
65 this.rootPrimitive = new Primitive(null, this.regionHandle, this.m_world);
66 this.rootPrimitive.CreateFromPacket(addPacket, agentID, localID);
67 }
68
69 /// <summary>
70 ///
71 /// </summary>
72 /// <param name="data"></param>
73 public void CreateFromBytes(byte[] data)
74 {
75
76 }
77
78 /// <summary>
79 ///
80 /// </summary>
81 public override void update()
82 {
83
84 }
85
86 /// <summary>
87 ///
88 /// </summary>
89 public override void BackUp()
90 {
91
92 }
93
94 /// <summary>
95 ///
96 /// </summary>
97 /// <param name="client"></param>
98 public void GetProperites(IClientAPI client)
99 {
100 //needs changing
101 ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
102 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
103 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
104 proper.ObjectData[0].ItemID = LLUUID.Zero;
105 proper.ObjectData[0].CreationDate = (ulong)this.rootPrimitive.primData.CreationDate;
106 proper.ObjectData[0].CreatorID = this.rootPrimitive.primData.OwnerID;
107 proper.ObjectData[0].FolderID = LLUUID.Zero;
108 proper.ObjectData[0].FromTaskID = LLUUID.Zero;
109 proper.ObjectData[0].GroupID = LLUUID.Zero;
110 proper.ObjectData[0].InventorySerial = 0;
111 proper.ObjectData[0].LastOwnerID = LLUUID.Zero;
112 proper.ObjectData[0].ObjectID = this.uuid;
113 proper.ObjectData[0].OwnerID = this.rootPrimitive.primData.OwnerID;
114 proper.ObjectData[0].TouchName = new byte[0];
115 proper.ObjectData[0].TextureID = new byte[0];
116 proper.ObjectData[0].SitName = new byte[0];
117 proper.ObjectData[0].Name = new byte[0];
118 proper.ObjectData[0].Description = new byte[0];
119 proper.ObjectData[0].OwnerMask = this.rootPrimitive.primData.OwnerMask;
120 proper.ObjectData[0].NextOwnerMask = this.rootPrimitive.primData.NextOwnerMask;
121 proper.ObjectData[0].GroupMask = this.rootPrimitive.primData.GroupMask;
122 proper.ObjectData[0].EveryoneMask = this.rootPrimitive.primData.EveryoneMask;
123 proper.ObjectData[0].BaseMask = this.rootPrimitive.primData.BaseMask;
124
125 client.OutPacket(proper);
126
127 }
128
129 }
130}