diff options
author | BlueWall | 2012-03-02 15:02:09 -0500 |
---|---|---|
committer | BlueWall | 2012-03-02 15:02:09 -0500 |
commit | 6fc350725da5132eefe14897644d672ce586c5db (patch) | |
tree | d73af5d1d9bc61143fbac24a4dd54256a1394c97 /OpenSim/Region/Framework/Scenes | |
parent | Merge branch 'master' of /home/opensim/src/opensim into v3_support (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-6fc350725da5132eefe14897644d672ce586c5db.zip opensim-SC-6fc350725da5132eefe14897644d672ce586c5db.tar.gz opensim-SC-6fc350725da5132eefe14897644d672ce586c5db.tar.bz2 opensim-SC-6fc350725da5132eefe14897644d672ce586c5db.tar.xz |
Merge branch 'master' into v3_support
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 114 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | 3 |
2 files changed, 26 insertions, 91 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 40c8d06..ec6bb89 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -343,13 +343,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
343 | /// </summary> | 343 | /// </summary> |
344 | protected Vector3 m_lastCameraPosition; | 344 | protected Vector3 m_lastCameraPosition; |
345 | 345 | ||
346 | protected Vector3 m_CameraPosition; | 346 | public Vector3 CameraPosition { get; set; } |
347 | |||
348 | public Vector3 CameraPosition | ||
349 | { | ||
350 | get { return m_CameraPosition; } | ||
351 | private set { m_CameraPosition = value; } | ||
352 | } | ||
353 | 347 | ||
354 | public Quaternion CameraRotation | 348 | public Quaternion CameraRotation |
355 | { | 349 | { |
@@ -359,28 +353,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
359 | // Use these three vectors to figure out what the agent is looking at | 353 | // Use these three vectors to figure out what the agent is looking at |
360 | // Convert it to a Matrix and/or Quaternion | 354 | // Convert it to a Matrix and/or Quaternion |
361 | // | 355 | // |
362 | protected Vector3 m_CameraAtAxis; | 356 | public Vector3 CameraAtAxis { get; set; } |
363 | protected Vector3 m_CameraLeftAxis; | 357 | public Vector3 CameraLeftAxis { get; set; } |
364 | protected Vector3 m_CameraUpAxis; | 358 | public Vector3 CameraUpAxis { get; set; } |
365 | |||
366 | public Vector3 CameraAtAxis | ||
367 | { | ||
368 | get { return m_CameraAtAxis; } | ||
369 | private set { m_CameraAtAxis = value; } | ||
370 | } | ||
371 | |||
372 | |||
373 | public Vector3 CameraLeftAxis | ||
374 | { | ||
375 | get { return m_CameraLeftAxis; } | ||
376 | private set { m_CameraLeftAxis = value; } | ||
377 | } | ||
378 | |||
379 | public Vector3 CameraUpAxis | ||
380 | { | ||
381 | get { return m_CameraUpAxis; } | ||
382 | private set { m_CameraUpAxis = value; } | ||
383 | } | ||
384 | 359 | ||
385 | public Vector3 Lookat | 360 | public Vector3 Lookat |
386 | { | 361 | { |
@@ -396,33 +371,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
396 | } | 371 | } |
397 | #endregion | 372 | #endregion |
398 | 373 | ||
399 | public readonly string Firstname; | 374 | public string Firstname { get; private set; } |
400 | public readonly string Lastname; | 375 | public string Lastname { get; private set; } |
401 | 376 | ||
402 | private string m_grouptitle; | 377 | public string Grouptitle { get; set; } |
403 | |||
404 | public string Grouptitle | ||
405 | { | ||
406 | get { return m_grouptitle; } | ||
407 | set { m_grouptitle = value; } | ||
408 | } | ||
409 | 378 | ||
410 | // Agent's Draw distance. | 379 | // Agent's Draw distance. |
411 | protected float m_DrawDistance; | 380 | public float DrawDistance { get; set; } |
412 | |||
413 | public float DrawDistance | ||
414 | { | ||
415 | get { return m_DrawDistance; } | ||
416 | private set { m_DrawDistance = value; } | ||
417 | } | ||
418 | |||
419 | protected bool m_allowMovement = true; | ||
420 | 381 | ||
421 | public bool AllowMovement | 382 | public bool AllowMovement { get; set; } |
422 | { | ||
423 | get { return m_allowMovement; } | ||
424 | set { m_allowMovement = value; } | ||
425 | } | ||
426 | 383 | ||
427 | private bool m_setAlwaysRun; | 384 | private bool m_setAlwaysRun; |
428 | 385 | ||
@@ -449,13 +406,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
449 | } | 406 | } |
450 | } | 407 | } |
451 | 408 | ||
452 | private byte m_state; | 409 | public byte State { get; set; } |
453 | |||
454 | public byte State | ||
455 | { | ||
456 | get { return m_state; } | ||
457 | set { m_state = value; } | ||
458 | } | ||
459 | 410 | ||
460 | private AgentManager.ControlFlags m_AgentControlFlags; | 411 | private AgentManager.ControlFlags m_AgentControlFlags; |
461 | 412 | ||
@@ -465,29 +416,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
465 | set { m_AgentControlFlags = (AgentManager.ControlFlags)value; } | 416 | set { m_AgentControlFlags = (AgentManager.ControlFlags)value; } |
466 | } | 417 | } |
467 | 418 | ||
468 | /// <summary> | 419 | public IClientAPI ControllingClient { get; set; } |
469 | /// This works out to be the ClientView object associated with this avatar, or it's client connection manager | ||
470 | /// </summary> | ||
471 | private IClientAPI m_controllingClient; | ||
472 | |||
473 | public IClientAPI ControllingClient | ||
474 | { | ||
475 | get { return m_controllingClient; } | ||
476 | private set { m_controllingClient = value; } | ||
477 | } | ||
478 | 420 | ||
479 | public IClientCore ClientView | 421 | public IClientCore ClientView |
480 | { | 422 | { |
481 | get { return (IClientCore) m_controllingClient; } | 423 | get { return (IClientCore)ControllingClient; } |
482 | } | 424 | } |
483 | 425 | ||
484 | protected Vector3 m_parentPosition; | 426 | public Vector3 ParentPosition { get; set; } |
485 | |||
486 | public Vector3 ParentPosition | ||
487 | { | ||
488 | get { return m_parentPosition; } | ||
489 | set { m_parentPosition = value; } | ||
490 | } | ||
491 | 427 | ||
492 | /// <summary> | 428 | /// <summary> |
493 | /// Position of this avatar relative to the region the avatar is in | 429 | /// Position of this avatar relative to the region the avatar is in |
@@ -747,7 +683,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
747 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) | 683 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) |
748 | { | 684 | { |
749 | AttachmentsSyncLock = new Object(); | 685 | AttachmentsSyncLock = new Object(); |
750 | 686 | AllowMovement = true; | |
751 | IsChildAgent = true; | 687 | IsChildAgent = true; |
752 | m_sendCourseLocationsMethod = SendCoarseLocationsDefault; | 688 | m_sendCourseLocationsMethod = SendCoarseLocationsDefault; |
753 | Animator = new ScenePresenceAnimator(this); | 689 | Animator = new ScenePresenceAnimator(this); |
@@ -826,17 +762,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
826 | private Vector3[] GetWalkDirectionVectors() | 762 | private Vector3[] GetWalkDirectionVectors() |
827 | { | 763 | { |
828 | Vector3[] vector = new Vector3[11]; | 764 | Vector3[] vector = new Vector3[11]; |
829 | vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD | 765 | vector[0] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD |
830 | vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK | 766 | vector[1] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK |
831 | vector[2] = Vector3.UnitY; //LEFT | 767 | vector[2] = Vector3.UnitY; //LEFT |
832 | vector[3] = -Vector3.UnitY; //RIGHT | 768 | vector[3] = -Vector3.UnitY; //RIGHT |
833 | vector[4] = new Vector3(m_CameraAtAxis.Z, 0f, m_CameraUpAxis.Z); //UP | 769 | vector[4] = new Vector3(CameraAtAxis.Z, 0f, CameraUpAxis.Z); //UP |
834 | vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN | 770 | vector[5] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN |
835 | vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE | 771 | vector[6] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD_NUDGE |
836 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE | 772 | vector[7] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK_NUDGE |
837 | vector[8] = Vector3.UnitY; //LEFT_NUDGE | 773 | vector[8] = Vector3.UnitY; //LEFT_NUDGE |
838 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE | 774 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE |
839 | vector[10] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_NUDGE | 775 | vector[10] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN_NUDGE |
840 | return vector; | 776 | return vector; |
841 | } | 777 | } |
842 | 778 | ||
@@ -1333,7 +1269,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1333 | // Convert it to a Matrix and/or Quaternion | 1269 | // Convert it to a Matrix and/or Quaternion |
1334 | CameraAtAxis = agentData.CameraAtAxis; | 1270 | CameraAtAxis = agentData.CameraAtAxis; |
1335 | CameraLeftAxis = agentData.CameraLeftAxis; | 1271 | CameraLeftAxis = agentData.CameraLeftAxis; |
1336 | m_CameraUpAxis = agentData.CameraUpAxis; | 1272 | CameraUpAxis = agentData.CameraUpAxis; |
1337 | 1273 | ||
1338 | // The Agent's Draw distance setting | 1274 | // The Agent's Draw distance setting |
1339 | // When we get to the point of re-computing neighbors everytime this | 1275 | // When we get to the point of re-computing neighbors everytime this |
@@ -1345,7 +1281,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1345 | // Check if Client has camera in 'follow cam' or 'build' mode. | 1281 | // Check if Client has camera in 'follow cam' or 'build' mode. |
1346 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); | 1282 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); |
1347 | 1283 | ||
1348 | m_followCamAuto = ((m_CameraUpAxis.Z > 0.959f && m_CameraUpAxis.Z < 0.98f) | 1284 | m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f) |
1349 | && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; | 1285 | && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; |
1350 | 1286 | ||
1351 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; | 1287 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; |
@@ -3078,7 +3014,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3078 | cAgent.Center = CameraPosition; | 3014 | cAgent.Center = CameraPosition; |
3079 | cAgent.AtAxis = CameraAtAxis; | 3015 | cAgent.AtAxis = CameraAtAxis; |
3080 | cAgent.LeftAxis = CameraLeftAxis; | 3016 | cAgent.LeftAxis = CameraLeftAxis; |
3081 | cAgent.UpAxis = m_CameraUpAxis; | 3017 | cAgent.UpAxis = CameraUpAxis; |
3082 | 3018 | ||
3083 | cAgent.Far = DrawDistance; | 3019 | cAgent.Far = DrawDistance; |
3084 | 3020 | ||
@@ -3164,7 +3100,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3164 | CameraPosition = cAgent.Center; | 3100 | CameraPosition = cAgent.Center; |
3165 | CameraAtAxis = cAgent.AtAxis; | 3101 | CameraAtAxis = cAgent.AtAxis; |
3166 | CameraLeftAxis = cAgent.LeftAxis; | 3102 | CameraLeftAxis = cAgent.LeftAxis; |
3167 | m_CameraUpAxis = cAgent.UpAxis; | 3103 | CameraUpAxis = cAgent.UpAxis; |
3168 | 3104 | ||
3169 | // When we get to the point of re-computing neighbors everytime this | 3105 | // When we get to the point of re-computing neighbors everytime this |
3170 | // changes, then start using the agent's drawdistance rather than the | 3106 | // changes, then start using the agent's drawdistance rather than the |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index e4b607d..e16903c 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -65,8 +65,7 @@ namespace OpenSim.Region.Framework.Tests | |||
65 | 65 | ||
66 | // Create an object embedded inside the first | 66 | // Create an object embedded inside the first |
67 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); | 67 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); |
68 | TaskInventoryItem taskSceneObjectItem | 68 | TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID); |
69 | = TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID); | ||
70 | 69 | ||
71 | TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId); | 70 | TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId); |
72 | Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId)); | 71 | Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId)); |