From 24e8e5d8188dd2e8656feb5e43193e7475fa2acc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 12 Jun 2012 01:26:03 +0100 Subject: *UNTESTED* extended llGet*PrimitiveParam() to support avatars. Some auxiliar code in SOP.cs --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') 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 } } + // returns offset position relative to root prim of object when siting + public Vector3 OffsetPositionToSOGRoot + { + get + { + if (ParentPart != null) + return ParentPart.OffsetPosition + (m_pos * ParentPart.RotationOffset); + else + return m_pos; + } + } + + public Quaternion OffsetRotationToSOGRoot + { + get + { + if (ParentPart != null) + return ParentPart.RotationOffset * Rotation; + else + return Rotation; + } + } + + public Quaternion WorldRotation + { + get + { + if (ParentPart != null) + return ParentPart.GetWorldRotation() * Rotation; + else + return Rotation; + } + } + /// /// Current velocity of the avatar. /// -- cgit v1.1