aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/EntityBase.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-03-05 18:36:37 +0000
committerJustin Clarke Casey2009-03-05 18:36:37 +0000
commit0de34e9a183d596dc051fa708517dcb99a35abae (patch)
tree0075b425d89811d4b4548995a0ac2487c59d2871 /OpenSim/Region/Framework/Scenes/EntityBase.cs
parentMake DeserializeUUID explicitly private. (diff)
downloadopensim-SC-0de34e9a183d596dc051fa708517dcb99a35abae.zip
opensim-SC-0de34e9a183d596dc051fa708517dcb99a35abae.tar.gz
opensim-SC-0de34e9a183d596dc051fa708517dcb99a35abae.tar.bz2
opensim-SC-0de34e9a183d596dc051fa708517dcb99a35abae.tar.xz
* remove now unused serialization code
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EntityBase.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/EntityBase.cs83
1 files changed, 1 insertions, 82 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EntityBase.cs b/OpenSim/Region/Framework/Scenes/EntityBase.cs
index fb5c0d1..d23f487 100644
--- a/OpenSim/Region/Framework/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Framework/Scenes/EntityBase.cs
@@ -32,8 +32,7 @@ using OpenMetaverse;
32 32
33namespace OpenSim.Region.Framework.Scenes 33namespace OpenSim.Region.Framework.Scenes
34{ 34{
35 [Serializable] 35 public abstract class EntityBase
36 public abstract class EntityBase : ISerializable
37 { 36 {
38 /// <summary> 37 /// <summary>
39 /// The scene to which this entity belongs 38 /// The scene to which this entity belongs
@@ -145,87 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
145 return (EntityBase) MemberwiseClone(); 144 return (EntityBase) MemberwiseClone();
146 } 145 }
147 146
148
149 public abstract void SetText(string text, Vector3 color, double alpha); 147 public abstract void SetText(string text, Vector3 color, double alpha);
150
151 protected EntityBase(SerializationInfo info, StreamingContext context)
152 {
153 //m_log.Debug("EntityBase Deserialize BGN");
154
155 if (info == null)
156 {
157 throw new ArgumentNullException("info");
158 }
159
160 m_uuid = new UUID((Guid)info.GetValue("m_uuid", typeof(Guid)));
161 m_name = (string)info.GetValue("m_name", typeof(string));
162
163 m_pos
164 = new Vector3(
165 (float)info.GetValue("m_pos.X", typeof(float)),
166 (float)info.GetValue("m_pos.Y", typeof(float)),
167 (float)info.GetValue("m_pos.Z", typeof(float)));
168
169 m_velocity
170 = new Vector3(
171 (float)info.GetValue("m_velocity.X", typeof(float)),
172 (float)info.GetValue("m_velocity.Y", typeof(float)),
173 (float)info.GetValue("m_velocity.Z", typeof(float)));
174
175 m_rotationalvelocity
176 = new Vector3(
177 (float)info.GetValue("m_rotationalvelocity.X", typeof(float)),
178 (float)info.GetValue("m_rotationalvelocity.Y", typeof(float)),
179 (float)info.GetValue("m_rotationalvelocity.Z", typeof(float)));
180
181 m_rotation
182 = new Quaternion(
183 (float)info.GetValue("m_rotation.X", typeof(float)),
184 (float)info.GetValue("m_rotation.Y", typeof(float)),
185 (float)info.GetValue("m_rotation.Z", typeof(float)),
186 (float)info.GetValue("m_rotation.W", typeof(float)));
187
188 m_localId = (uint)info.GetValue("m_localId", typeof(uint));
189
190 //m_log.Debug("EntityBase Deserialize END");
191 }
192
193 [SecurityPermission(SecurityAction.LinkDemand,
194 Flags = SecurityPermissionFlag.SerializationFormatter)]
195 public virtual void GetObjectData(
196 SerializationInfo info, StreamingContext context)
197 {
198 if (info == null)
199 {
200 throw new ArgumentNullException("info");
201 }
202
203 info.AddValue("m_uuid", m_uuid.Guid);
204 info.AddValue("m_name", m_name);
205
206 // Vector3
207 info.AddValue("m_pos.X", m_pos.X);
208 info.AddValue("m_pos.Y", m_pos.Y);
209 info.AddValue("m_pos.Z", m_pos.Z);
210
211 // Vector3
212 info.AddValue("m_velocity.X", m_velocity.X);
213 info.AddValue("m_velocity.Y", m_velocity.Y);
214 info.AddValue("m_velocity.Z", m_velocity.Z);
215
216 // Vector3
217 info.AddValue("m_rotationalvelocity.X", m_rotationalvelocity.X);
218 info.AddValue("m_rotationalvelocity.Y", m_rotationalvelocity.Y);
219 info.AddValue("m_rotationalvelocity.Z", m_rotationalvelocity.Z);
220
221 // Quaternion
222 info.AddValue("m_rotation.X", m_rotation.X);
223 info.AddValue("m_rotation.Y", m_rotation.Y);
224 info.AddValue("m_rotation.Z", m_rotation.Z);
225 info.AddValue("m_rotation.W", m_rotation.W);
226
227 info.AddValue("m_localId", m_localId);
228 }
229 } 148 }
230 149
231 //Nested Classes 150 //Nested Classes