aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/EntityBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/EntityBase.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/EntityBase.cs61
1 files changed, 30 insertions, 31 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs
index 40caabc..884ff32 100644
--- a/OpenSim/Region/Environment/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs
@@ -28,8 +28,7 @@
28using System; 28using System;
29using System.Runtime.Serialization; 29using System.Runtime.Serialization;
30using System.Security.Permissions; 30using System.Security.Permissions;
31using Axiom.Math; 31using OpenMetaverse;
32using libsecondlife;
33 32
34namespace OpenSim.Region.Environment.Scenes 33namespace OpenSim.Region.Environment.Scenes
35{ 34{
@@ -45,9 +44,9 @@ namespace OpenSim.Region.Environment.Scenes
45 } 44 }
46 protected Scene m_scene; 45 protected Scene m_scene;
47 46
48 protected LLUUID m_uuid; 47 protected UUID m_uuid;
49 48
50 public virtual LLUUID UUID 49 public virtual UUID UUID
51 { 50 {
52 get { return m_uuid; } 51 get { return m_uuid; }
53 set { m_uuid = value; } 52 set { m_uuid = value; }
@@ -73,30 +72,30 @@ namespace OpenSim.Region.Environment.Scenes
73 } 72 }
74 protected bool m_isDeleted; 73 protected bool m_isDeleted;
75 74
76 protected LLVector3 m_pos; 75 protected Vector3 m_pos;
77 76
78 /// <summary> 77 /// <summary>
79 /// 78 ///
80 /// </summary> 79 /// </summary>
81 public virtual LLVector3 AbsolutePosition 80 public virtual Vector3 AbsolutePosition
82 { 81 {
83 get { return m_pos; } 82 get { return m_pos; }
84 set { m_pos = value; } 83 set { m_pos = value; }
85 } 84 }
86 85
87 protected LLVector3 m_velocity; 86 protected Vector3 m_velocity;
88 protected LLVector3 m_rotationalvelocity; 87 protected Vector3 m_rotationalvelocity;
89 88
90 /// <summary> 89 /// <summary>
91 /// 90 ///
92 /// </summary> 91 /// </summary>
93 public virtual LLVector3 Velocity 92 public virtual Vector3 Velocity
94 { 93 {
95 get { return m_velocity; } 94 get { return m_velocity; }
96 set { m_velocity = value; } 95 set { m_velocity = value; }
97 } 96 }
98 97
99 protected Quaternion m_rotation = new Quaternion(0, 0, 1, 0); 98 protected Quaternion m_rotation = new Quaternion(0f, 0f, 1f, 0f);
100 99
101 public virtual Quaternion Rotation 100 public virtual Quaternion Rotation
102 { 101 {
@@ -117,13 +116,13 @@ namespace OpenSim.Region.Environment.Scenes
117 /// </summary> 116 /// </summary>
118 public EntityBase() 117 public EntityBase()
119 { 118 {
120 m_uuid = LLUUID.Zero; 119 m_uuid = UUID.Zero;
121 120
122 m_pos = new LLVector3(); 121 m_pos = Vector3.Zero;
123 m_velocity = new LLVector3(); 122 m_velocity = Vector3.Zero;
124 Rotation = new Quaternion(); 123 Rotation = Quaternion.Identity;
125 m_name = "(basic entity)"; 124 m_name = "(basic entity)";
126 m_rotationalvelocity = new LLVector3(0, 0, 0); 125 m_rotationalvelocity = Vector3.Zero;
127 } 126 }
128 127
129 /// <summary> 128 /// <summary>
@@ -157,33 +156,33 @@ namespace OpenSim.Region.Environment.Scenes
157 throw new ArgumentNullException("info"); 156 throw new ArgumentNullException("info");
158 } 157 }
159 158
160 m_uuid = new LLUUID((Guid)info.GetValue("m_uuid", typeof(Guid))); 159 m_uuid = new UUID((Guid)info.GetValue("m_uuid", typeof(Guid)));
161 m_name = (string)info.GetValue("m_name", typeof(string)); 160 m_name = (string)info.GetValue("m_name", typeof(string));
162 161
163 m_pos 162 m_pos
164 = new LLVector3( 163 = new Vector3(
165 (float)info.GetValue("m_pos.X", typeof(float)), 164 (float)info.GetValue("m_pos.X", typeof(float)),
166 (float)info.GetValue("m_pos.Y", typeof(float)), 165 (float)info.GetValue("m_pos.Y", typeof(float)),
167 (float)info.GetValue("m_pos.Z", typeof(float))); 166 (float)info.GetValue("m_pos.Z", typeof(float)));
168 167
169 m_velocity 168 m_velocity
170 = new LLVector3( 169 = new Vector3(
171 (float)info.GetValue("m_velocity.X", typeof(float)), 170 (float)info.GetValue("m_velocity.X", typeof(float)),
172 (float)info.GetValue("m_velocity.Y", typeof(float)), 171 (float)info.GetValue("m_velocity.Y", typeof(float)),
173 (float)info.GetValue("m_velocity.Z", typeof(float))); 172 (float)info.GetValue("m_velocity.Z", typeof(float)));
174 173
175 m_rotationalvelocity 174 m_rotationalvelocity
176 = new LLVector3( 175 = new Vector3(
177 (float)info.GetValue("m_rotationalvelocity.X", typeof(float)), 176 (float)info.GetValue("m_rotationalvelocity.X", typeof(float)),
178 (float)info.GetValue("m_rotationalvelocity.Y", typeof(float)), 177 (float)info.GetValue("m_rotationalvelocity.Y", typeof(float)),
179 (float)info.GetValue("m_rotationalvelocity.Z", typeof(float))); 178 (float)info.GetValue("m_rotationalvelocity.Z", typeof(float)));
180 179
181 m_rotation 180 m_rotation
182 = new Quaternion( 181 = new Quaternion(
183 (float)info.GetValue("m_rotation.w", typeof(float)), 182 (float)info.GetValue("m_rotation.X", typeof(float)),
184 (float)info.GetValue("m_rotation.x", typeof(float)), 183 (float)info.GetValue("m_rotation.Y", typeof(float)),
185 (float)info.GetValue("m_rotation.y", typeof(float)), 184 (float)info.GetValue("m_rotation.Z", typeof(float)),
186 (float)info.GetValue("m_rotation.z", typeof(float))); 185 (float)info.GetValue("m_rotation.W", typeof(float)));
187 186
188 m_localId = (uint)info.GetValue("m_localId", typeof(uint)); 187 m_localId = (uint)info.GetValue("m_localId", typeof(uint));
189 188
@@ -200,29 +199,29 @@ namespace OpenSim.Region.Environment.Scenes
200 throw new ArgumentNullException("info"); 199 throw new ArgumentNullException("info");
201 } 200 }
202 201
203 info.AddValue("m_uuid", m_uuid.UUID); 202 info.AddValue("m_uuid", m_uuid.Guid);
204 info.AddValue("m_name", m_name); 203 info.AddValue("m_name", m_name);
205 204
206 // LLVector3 205 // Vector3
207 info.AddValue("m_pos.X", m_pos.X); 206 info.AddValue("m_pos.X", m_pos.X);
208 info.AddValue("m_pos.Y", m_pos.Y); 207 info.AddValue("m_pos.Y", m_pos.Y);
209 info.AddValue("m_pos.Z", m_pos.Z); 208 info.AddValue("m_pos.Z", m_pos.Z);
210 209
211 // LLVector3 210 // Vector3
212 info.AddValue("m_velocity.X", m_velocity.X); 211 info.AddValue("m_velocity.X", m_velocity.X);
213 info.AddValue("m_velocity.Y", m_velocity.Y); 212 info.AddValue("m_velocity.Y", m_velocity.Y);
214 info.AddValue("m_velocity.Z", m_velocity.Z); 213 info.AddValue("m_velocity.Z", m_velocity.Z);
215 214
216 // LLVector3 215 // Vector3
217 info.AddValue("m_rotationalvelocity.X", m_rotationalvelocity.X); 216 info.AddValue("m_rotationalvelocity.X", m_rotationalvelocity.X);
218 info.AddValue("m_rotationalvelocity.Y", m_rotationalvelocity.Y); 217 info.AddValue("m_rotationalvelocity.Y", m_rotationalvelocity.Y);
219 info.AddValue("m_rotationalvelocity.Z", m_rotationalvelocity.Z); 218 info.AddValue("m_rotationalvelocity.Z", m_rotationalvelocity.Z);
220 219
221 // Quaternion 220 // Quaternion
222 info.AddValue("m_rotation.w", m_rotation.w); 221 info.AddValue("m_rotation.X", m_rotation.X);
223 info.AddValue("m_rotation.x", m_rotation.x); 222 info.AddValue("m_rotation.Y", m_rotation.Y);
224 info.AddValue("m_rotation.y", m_rotation.y); 223 info.AddValue("m_rotation.Z", m_rotation.Z);
225 info.AddValue("m_rotation.z", m_rotation.z); 224 info.AddValue("m_rotation.W", m_rotation.W);
226 225
227 info.AddValue("m_localId", m_localId); 226 info.AddValue("m_localId", m_localId);
228 } 227 }