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