diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/RegionSettings.cs | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index f0786fc..2c9f7d2 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.IO; | 30 | using System.IO; |
30 | using OpenMetaverse; | 31 | using OpenMetaverse; |
31 | 32 | ||
@@ -410,5 +411,155 @@ namespace OpenSim.Framework | |||
410 | get { return m_Casino; } | 411 | get { return m_Casino; } |
411 | set { m_Casino = value; } | 412 | set { m_Casino = value; } |
412 | } | 413 | } |
414 | |||
415 | // Telehub support | ||
416 | private bool m_TelehubEnabled = false; | ||
417 | public bool HasTelehub | ||
418 | { | ||
419 | get { return m_TelehubEnabled; } | ||
420 | set { m_TelehubEnabled = value; } | ||
421 | } | ||
422 | |||
423 | // Connected Telehub object | ||
424 | private UUID m_TelehubObject; | ||
425 | public UUID TelehubObject | ||
426 | { | ||
427 | get | ||
428 | { | ||
429 | if (HasTelehub) | ||
430 | { | ||
431 | return m_TelehubObject; | ||
432 | } | ||
433 | else | ||
434 | { | ||
435 | return UUID.Zero; | ||
436 | } | ||
437 | } | ||
438 | set | ||
439 | { | ||
440 | m_TelehubObject = value; | ||
441 | } | ||
442 | } | ||
443 | |||
444 | // Connected Telehub name | ||
445 | private string m_TelehubName; | ||
446 | public string TelehubName | ||
447 | { | ||
448 | get | ||
449 | { | ||
450 | if (HasTelehub) | ||
451 | { | ||
452 | return m_TelehubName; | ||
453 | } | ||
454 | else | ||
455 | { | ||
456 | return String.Empty; | ||
457 | } | ||
458 | } | ||
459 | set | ||
460 | { | ||
461 | m_TelehubName = value; | ||
462 | } | ||
463 | } | ||
464 | |||
465 | // Connected Telehub position | ||
466 | private float m_TelehubPosX; | ||
467 | private float m_TelehubPosY; | ||
468 | private float m_TelehubPosZ; | ||
469 | public Vector3 TelehubPos | ||
470 | { | ||
471 | get | ||
472 | { | ||
473 | if (HasTelehub) | ||
474 | { | ||
475 | Vector3 Pos = new Vector3(m_TelehubPosX, m_TelehubPosY, m_TelehubPosZ); | ||
476 | return Pos; | ||
477 | } | ||
478 | else | ||
479 | { | ||
480 | return Vector3.Zero; | ||
481 | } | ||
482 | } | ||
483 | set | ||
484 | { | ||
485 | |||
486 | m_TelehubPosX = value.X; | ||
487 | m_TelehubPosY = value.Y; | ||
488 | m_TelehubPosZ = value.Z; | ||
489 | } | ||
490 | } | ||
491 | |||
492 | // Connected Telehub rotation | ||
493 | private float m_TelehubRotX; | ||
494 | private float m_TelehubRotY; | ||
495 | private float m_TelehubRotZ; | ||
496 | private float m_TelehubRotW; | ||
497 | public Quaternion TelehubRot | ||
498 | { | ||
499 | get | ||
500 | { | ||
501 | if (HasTelehub) | ||
502 | { | ||
503 | Quaternion quat = new Quaternion(); | ||
504 | |||
505 | quat.X = m_TelehubRotX; | ||
506 | quat.Y = m_TelehubRotY; | ||
507 | quat.Z = m_TelehubRotZ; | ||
508 | quat.W = m_TelehubRotW; | ||
509 | |||
510 | return quat; | ||
511 | } | ||
512 | else | ||
513 | { | ||
514 | // What else to do?? | ||
515 | Quaternion quat = new Quaternion(); | ||
516 | |||
517 | quat.X = m_TelehubRotX; | ||
518 | quat.X = m_TelehubRotY; | ||
519 | quat.X = m_TelehubRotZ; | ||
520 | quat.X = m_TelehubRotW; | ||
521 | |||
522 | return quat; | ||
523 | } | ||
524 | } | ||
525 | set | ||
526 | { | ||
527 | m_TelehubRotX = value.X; | ||
528 | m_TelehubRotY = value.Y; | ||
529 | m_TelehubRotZ = value.Z; | ||
530 | m_TelehubRotW = value.W; | ||
531 | } | ||
532 | } | ||
533 | |||
534 | // Our Connected Telehub's SpawnPoints | ||
535 | public List<Vector3> l_SpawnPoints = new List<Vector3>(); | ||
536 | |||
537 | // Add a SpawnPoint | ||
538 | // ** These are not region coordinates ** | ||
539 | // They are relative to the Telehub coordinates | ||
540 | // | ||
541 | public void AddSpawnPoint(Vector3 point) | ||
542 | { | ||
543 | l_SpawnPoints.Add(point); | ||
544 | } | ||
545 | |||
546 | // Remove a SpawnPoint | ||
547 | public void RemoveSpawnPoint(int point_index) | ||
548 | { | ||
549 | l_SpawnPoints.RemoveAt(point_index); | ||
550 | } | ||
551 | |||
552 | // Return the List of SpawnPoints | ||
553 | public List<Vector3> SpawnPoints() | ||
554 | { | ||
555 | return l_SpawnPoints; | ||
556 | |||
557 | } | ||
558 | |||
559 | // Clear the SpawnPoints List of all entries | ||
560 | public void ClearSpawnPoints() | ||
561 | { | ||
562 | l_SpawnPoints.Clear(); | ||
563 | } | ||
413 | } | 564 | } |
414 | } | 565 | } |