aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
diff options
context:
space:
mode:
authorSean Dague2007-07-30 20:11:40 +0000
committerSean Dague2007-07-30 20:11:40 +0000
commit74bb5282a09ec095a7ff810c62f79cc64e187686 (patch)
treee0a9b703bfcbbab59b04351dd71508fa913e741a /OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
parentadded OnDisconnectUser event to required classes (diff)
downloadopensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.zip
opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.tar.gz
opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.tar.bz2
opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.tar.xz
mass update of files to have native line endings
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs432
1 files changed, 216 insertions, 216 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
index 82d4cd0..07d1357 100644
--- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
+++ b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
@@ -1,216 +1,216 @@
1using System.Collections.Generic; 1using System.Collections.Generic;
2using System.Text; 2using System.Text;
3using System; 3using System;
4using Axiom.Math; 4using Axiom.Math;
5using libsecondlife; 5using libsecondlife;
6using libsecondlife.Packets; 6using libsecondlife.Packets;
7using OpenSim.Framework.Interfaces; 7using OpenSim.Framework.Interfaces;
8using OpenSim.Framework.Types; 8using OpenSim.Framework.Types;
9 9
10namespace OpenSim.Region.Environment.Scenes 10namespace OpenSim.Region.Environment.Scenes
11{ 11{
12 12
13 public class AllNewSceneObjectPart2 13 public class AllNewSceneObjectPart2
14 { 14 {
15 private const uint FULL_MASK_PERMISSIONS = 2147483647; 15 private const uint FULL_MASK_PERMISSIONS = 2147483647;
16 16
17 private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128; 17 private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128;
18 private ulong m_regionHandle; 18 private ulong m_regionHandle;
19 19
20 public string SitName = ""; 20 public string SitName = "";
21 public string TouchName = ""; 21 public string TouchName = "";
22 public string Text = ""; 22 public string Text = "";
23 23
24 public LLUUID CreatorID; 24 public LLUUID CreatorID;
25 public LLUUID OwnerID; 25 public LLUUID OwnerID;
26 public LLUUID LastOwnerID; 26 public LLUUID LastOwnerID;
27 public Int32 CreationDate; 27 public Int32 CreationDate;
28 28
29 public LLUUID uuid; 29 public LLUUID uuid;
30 public uint m_localID; 30 public uint m_localID;
31 31
32 public uint ParentID = 0; 32 public uint ParentID = 0;
33 33
34 public uint OwnerMask = FULL_MASK_PERMISSIONS; 34 public uint OwnerMask = FULL_MASK_PERMISSIONS;
35 public uint NextOwnerMask = FULL_MASK_PERMISSIONS; 35 public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
36 public uint GroupMask = FULL_MASK_PERMISSIONS; 36 public uint GroupMask = FULL_MASK_PERMISSIONS;
37 public uint EveryoneMask = FULL_MASK_PERMISSIONS; 37 public uint EveryoneMask = FULL_MASK_PERMISSIONS;
38 public uint BaseMask = FULL_MASK_PERMISSIONS; 38 public uint BaseMask = FULL_MASK_PERMISSIONS;
39 39
40 protected PrimitiveBaseShape m_Shape; 40 protected PrimitiveBaseShape m_Shape;
41 41
42 protected AllNewSceneObjectGroup2 m_parentGroup; 42 protected AllNewSceneObjectGroup2 m_parentGroup;
43 43
44 44
45 #region Properties 45 #region Properties
46 protected string m_name; 46 protected string m_name;
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 public virtual string Name 50 public virtual string Name
51 { 51 {
52 get { return m_name; } 52 get { return m_name; }
53 set { m_name = value; } 53 set { m_name = value; }
54 } 54 }
55 55
56 protected LLVector3 m_offset; 56 protected LLVector3 m_offset;
57 public LLVector3 OffsetPosition 57 public LLVector3 OffsetPosition
58 { 58 {
59 get 59 get
60 { 60 {
61 return m_offset; 61 return m_offset;
62 } 62 }
63 set 63 set
64 { 64 {
65 m_offset = value; 65 m_offset = value;
66 } 66 }
67 } 67 }
68 68
69 protected LLQuaternion m_rotationOffset; 69 protected LLQuaternion m_rotationOffset;
70 public LLQuaternion RotationOffset 70 public LLQuaternion RotationOffset
71 { 71 {
72 get 72 get
73 { 73 {
74 return m_rotationOffset; 74 return m_rotationOffset;
75 } 75 }
76 set 76 set
77 { 77 {
78 m_rotationOffset = value; 78 m_rotationOffset = value;
79 } 79 }
80 } 80 }
81 81
82 private string m_description = ""; 82 private string m_description = "";
83 public string Description 83 public string Description
84 { 84 {
85 get 85 get
86 { 86 {
87 return this.m_description; 87 return this.m_description;
88 } 88 }
89 set 89 set
90 { 90 {
91 this.m_description = value; 91 this.m_description = value;
92 } 92 }
93 } 93 }
94 94
95 public PrimitiveBaseShape Shape 95 public PrimitiveBaseShape Shape
96 { 96 {
97 get 97 get
98 { 98 {
99 return this.m_Shape; 99 return this.m_Shape;
100 } 100 }
101 } 101 }
102 102
103 public LLVector3 Scale 103 public LLVector3 Scale
104 { 104 {
105 set 105 set
106 { 106 {
107 this.m_Shape.Scale = value; 107 this.m_Shape.Scale = value;
108 } 108 }
109 get 109 get
110 { 110 {
111 return this.m_Shape.Scale; 111 return this.m_Shape.Scale;
112 } 112 }
113 } 113 }
114 #endregion 114 #endregion
115 115
116 #region Constructors 116 #region Constructors
117 public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 position) 117 public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 position)
118 { 118 {
119 this.m_regionHandle = regionHandle; 119 this.m_regionHandle = regionHandle;
120 this.m_parentGroup = parent; 120 this.m_parentGroup = parent;
121 121
122 this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 122 this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
123 this.OwnerID = ownerID; 123 this.OwnerID = ownerID;
124 this.CreatorID = this.OwnerID; 124 this.CreatorID = this.OwnerID;
125 this.LastOwnerID = LLUUID.Zero; 125 this.LastOwnerID = LLUUID.Zero;
126 this.uuid = LLUUID.Random(); 126 this.uuid = LLUUID.Random();
127 this.m_localID = (uint)(localID); 127 this.m_localID = (uint)(localID);
128 this.m_Shape = shape; 128 this.m_Shape = shape;
129 129
130 this.OffsetPosition = position; 130 this.OffsetPosition = position;
131 131
132 //temporary code just so the m_flags field doesn't give a compiler warning 132 //temporary code just so the m_flags field doesn't give a compiler warning
133 if (m_flags == 1) 133 if (m_flags == 1)
134 { 134 {
135 135
136 } 136 }
137 } 137 }
138 #endregion 138 #endregion
139 139
140 #region Shape 140 #region Shape
141 /// <summary> 141 /// <summary>
142 /// 142 ///
143 /// </summary> 143 /// </summary>
144 /// <param name="shapeBlock"></param> 144 /// <param name="shapeBlock"></param>
145 public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock) 145 public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock)
146 { 146 {
147 this.m_Shape.PathBegin = shapeBlock.PathBegin; 147 this.m_Shape.PathBegin = shapeBlock.PathBegin;
148 this.m_Shape.PathEnd = shapeBlock.PathEnd; 148 this.m_Shape.PathEnd = shapeBlock.PathEnd;
149 this.m_Shape.PathScaleX = shapeBlock.PathScaleX; 149 this.m_Shape.PathScaleX = shapeBlock.PathScaleX;
150 this.m_Shape.PathScaleY = shapeBlock.PathScaleY; 150 this.m_Shape.PathScaleY = shapeBlock.PathScaleY;
151 this.m_Shape.PathShearX = shapeBlock.PathShearX; 151 this.m_Shape.PathShearX = shapeBlock.PathShearX;
152 this.m_Shape.PathShearY = shapeBlock.PathShearY; 152 this.m_Shape.PathShearY = shapeBlock.PathShearY;
153 this.m_Shape.PathSkew = shapeBlock.PathSkew; 153 this.m_Shape.PathSkew = shapeBlock.PathSkew;
154 this.m_Shape.ProfileBegin = shapeBlock.ProfileBegin; 154 this.m_Shape.ProfileBegin = shapeBlock.ProfileBegin;
155 this.m_Shape.ProfileEnd = shapeBlock.ProfileEnd; 155 this.m_Shape.ProfileEnd = shapeBlock.ProfileEnd;
156 this.m_Shape.PathCurve = shapeBlock.PathCurve; 156 this.m_Shape.PathCurve = shapeBlock.PathCurve;
157 this.m_Shape.ProfileCurve = shapeBlock.ProfileCurve; 157 this.m_Shape.ProfileCurve = shapeBlock.ProfileCurve;
158 this.m_Shape.ProfileHollow = shapeBlock.ProfileHollow; 158 this.m_Shape.ProfileHollow = shapeBlock.ProfileHollow;
159 this.m_Shape.PathRadiusOffset = shapeBlock.PathRadiusOffset; 159 this.m_Shape.PathRadiusOffset = shapeBlock.PathRadiusOffset;
160 this.m_Shape.PathRevolutions = shapeBlock.PathRevolutions; 160 this.m_Shape.PathRevolutions = shapeBlock.PathRevolutions;
161 this.m_Shape.PathTaperX = shapeBlock.PathTaperX; 161 this.m_Shape.PathTaperX = shapeBlock.PathTaperX;
162 this.m_Shape.PathTaperY = shapeBlock.PathTaperY; 162 this.m_Shape.PathTaperY = shapeBlock.PathTaperY;
163 this.m_Shape.PathTwist = shapeBlock.PathTwist; 163 this.m_Shape.PathTwist = shapeBlock.PathTwist;
164 this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin; 164 this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin;
165 } 165 }
166 #endregion 166 #endregion
167 167
168 #region Texture 168 #region Texture
169 /// <summary> 169 /// <summary>
170 /// 170 ///
171 /// </summary> 171 /// </summary>
172 /// <param name="textureEntry"></param> 172 /// <param name="textureEntry"></param>
173 public void UpdateTextureEntry(byte[] textureEntry) 173 public void UpdateTextureEntry(byte[] textureEntry)
174 { 174 {
175 this.m_Shape.TextureEntry = textureEntry; 175 this.m_Shape.TextureEntry = textureEntry;
176 } 176 }
177 #endregion 177 #endregion
178 178
179 #region Position 179 #region Position
180 /// <summary> 180 /// <summary>
181 /// 181 ///
182 /// </summary> 182 /// </summary>
183 /// <param name="pos"></param> 183 /// <param name="pos"></param>
184 public void UpdateOffSet(LLVector3 pos) 184 public void UpdateOffSet(LLVector3 pos)
185 { 185 {
186 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 186 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
187 this.OffsetPosition = newPos; 187 this.OffsetPosition = newPos;
188 } 188 }
189 #endregion 189 #endregion
190 190
191 #region rotation 191 #region rotation
192 public void UpdateRotation(LLQuaternion rot) 192 public void UpdateRotation(LLQuaternion rot)
193 { 193 {
194 this.RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W); 194 this.RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W);
195 } 195 }
196 #endregion 196 #endregion
197 197
198 #region Resizing/Scale 198 #region Resizing/Scale
199 /// <summary> 199 /// <summary>
200 /// 200 ///
201 /// </summary> 201 /// </summary>
202 /// <param name="scale"></param> 202 /// <param name="scale"></param>
203 public void Resize(LLVector3 scale) 203 public void Resize(LLVector3 scale)
204 { 204 {
205 LLVector3 offset = (scale - this.m_Shape.Scale); 205 LLVector3 offset = (scale - this.m_Shape.Scale);
206 offset.X /= 2; 206 offset.X /= 2;
207 offset.Y /= 2; 207 offset.Y /= 2;
208 offset.Z /= 2; 208 offset.Z /= 2;
209 209
210 this.OffsetPosition += offset; 210 this.OffsetPosition += offset;
211 this.m_Shape.Scale = scale; 211 this.m_Shape.Scale = scale;
212 } 212 }
213 #endregion 213 #endregion
214 } 214 }
215} 215}
216 216