diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a810de2..21e2878 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -519,6 +519,40 @@ namespace OpenSim.Region.Framework.Scenes | |||
519 | } | 519 | } |
520 | } | 520 | } |
521 | 521 | ||
522 | // returns offset position relative to root prim of object when siting | ||
523 | public Vector3 OffsetPositionToSOGRoot | ||
524 | { | ||
525 | get | ||
526 | { | ||
527 | if (ParentPart != null) | ||
528 | return ParentPart.OffsetPosition + (m_pos * ParentPart.RotationOffset); | ||
529 | else | ||
530 | return m_pos; | ||
531 | } | ||
532 | } | ||
533 | |||
534 | public Quaternion OffsetRotationToSOGRoot | ||
535 | { | ||
536 | get | ||
537 | { | ||
538 | if (ParentPart != null) | ||
539 | return ParentPart.RotationOffset * Rotation; | ||
540 | else | ||
541 | return Rotation; | ||
542 | } | ||
543 | } | ||
544 | |||
545 | public Quaternion WorldRotation | ||
546 | { | ||
547 | get | ||
548 | { | ||
549 | if (ParentPart != null) | ||
550 | return ParentPart.GetWorldRotation() * Rotation; | ||
551 | else | ||
552 | return Rotation; | ||
553 | } | ||
554 | } | ||
555 | |||
522 | /// <summary> | 556 | /// <summary> |
523 | /// Current velocity of the avatar. | 557 | /// Current velocity of the avatar. |
524 | /// </summary> | 558 | /// </summary> |