diff options
author | SignpostMarv | 2012-08-18 01:17:01 +0100 |
---|---|---|
committer | Melanie | 2012-08-18 13:21:55 +0100 |
commit | 5d7751da891360c665622562f06a15e02fea4922 (patch) | |
tree | 7c0439407e246f298c8258a4b4c4e37c27fd92eb /OpenSim/Region/ScriptEngine/Shared/Helpers.cs | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-5d7751da891360c665622562f06a15e02fea4922.zip opensim-SC-5d7751da891360c665622562f06a15e02fea4922.tar.gz opensim-SC-5d7751da891360c665622562f06a15e02fea4922.tar.bz2 opensim-SC-5d7751da891360c665622562f06a15e02fea4922.tar.xz |
refactoring for Vector3 operator & constructor tweaks
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Helpers.cs | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs index 0108f44..5a58f73 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs | |||
@@ -160,11 +160,11 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
160 | else | 160 | else |
161 | { | 161 | { |
162 | // Set the values from the touch data provided by the client | 162 | // Set the values from the touch data provided by the client |
163 | touchST = new LSL_Types.Vector3(value.STCoord.X, value.STCoord.Y, value.STCoord.Z); | 163 | touchST = new LSL_Types.Vector3(value.STCoord); |
164 | touchUV = new LSL_Types.Vector3(value.UVCoord.X, value.UVCoord.Y, value.UVCoord.Z); | 164 | touchUV = new LSL_Types.Vector3(value.UVCoord); |
165 | touchNormal = new LSL_Types.Vector3(value.Normal.X, value.Normal.Y, value.Normal.Z); | 165 | touchNormal = new LSL_Types.Vector3(value.Normal); |
166 | touchBinormal = new LSL_Types.Vector3(value.Binormal.X, value.Binormal.Y, value.Binormal.Z); | 166 | touchBinormal = new LSL_Types.Vector3(value.Binormal); |
167 | touchPos = new LSL_Types.Vector3(value.Position.X, value.Position.Y, value.Position.Z); | 167 | touchPos = new LSL_Types.Vector3(value.Position); |
168 | touchFace = value.FaceIndex; | 168 | touchFace = value.FaceIndex; |
169 | } | 169 | } |
170 | } | 170 | } |
@@ -181,19 +181,13 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
181 | 181 | ||
182 | Name = presence.Firstname + " " + presence.Lastname; | 182 | Name = presence.Firstname + " " + presence.Lastname; |
183 | Owner = Key; | 183 | Owner = Key; |
184 | Position = new LSL_Types.Vector3( | 184 | Position = new LSL_Types.Vector3(presence.AbsolutePosition); |
185 | presence.AbsolutePosition.X, | ||
186 | presence.AbsolutePosition.Y, | ||
187 | presence.AbsolutePosition.Z); | ||
188 | Rotation = new LSL_Types.Quaternion( | 185 | Rotation = new LSL_Types.Quaternion( |
189 | presence.Rotation.X, | 186 | presence.Rotation.X, |
190 | presence.Rotation.Y, | 187 | presence.Rotation.Y, |
191 | presence.Rotation.Z, | 188 | presence.Rotation.Z, |
192 | presence.Rotation.W); | 189 | presence.Rotation.W); |
193 | Velocity = new LSL_Types.Vector3( | 190 | Velocity = new LSL_Types.Vector3(presence.Velocity); |
194 | presence.Velocity.X, | ||
195 | presence.Velocity.Y, | ||
196 | presence.Velocity.Z); | ||
197 | 191 | ||
198 | if (presence.PresenceType != PresenceType.Npc) | 192 | if (presence.PresenceType != PresenceType.Npc) |
199 | { | 193 | { |
@@ -241,16 +235,12 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
241 | } | 235 | } |
242 | } | 236 | } |
243 | 237 | ||
244 | Position = new LSL_Types.Vector3(part.AbsolutePosition.X, | 238 | Position = new LSL_Types.Vector3(part.AbsolutePosition); |
245 | part.AbsolutePosition.Y, | ||
246 | part.AbsolutePosition.Z); | ||
247 | 239 | ||
248 | Quaternion wr = part.ParentGroup.GroupRotation; | 240 | Quaternion wr = part.ParentGroup.GroupRotation; |
249 | Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); | 241 | Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); |
250 | 242 | ||
251 | Velocity = new LSL_Types.Vector3(part.Velocity.X, | 243 | Velocity = new LSL_Types.Vector3(part.Velocity); |
252 | part.Velocity.Y, | ||
253 | part.Velocity.Z); | ||
254 | } | 244 | } |
255 | } | 245 | } |
256 | 246 | ||