From 867d72c9569e672d99dc5f50aca6b1a4f2ddf906 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 7 Jul 2008 20:12:14 +0000 Subject: change SitTarget calls from functions to properties --- .../Region/Environment/Scenes/SceneObjectPart.cs | 56 +++++++--------------- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 12 ++--- 2 files changed, 23 insertions(+), 45 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 2b40ad2..685a3d5 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1508,28 +1508,6 @@ namespace OpenSim.Region.Environment.Scenes return LLUUID.Zero; } - public Quaternion GetSitTargetOrientation() - { - return m_sitTargetOrientation; - } - - public LLQuaternion GetSitTargetOrientationLL() - { - return - new LLQuaternion(m_sitTargetOrientation.x, m_sitTargetOrientation.y, m_sitTargetOrientation.z, - m_sitTargetOrientation.w); - } - - public Vector3 GetSitTargetPosition() - { - return m_sitTargetPosition; - } - - public LLVector3 GetSitTargetPositionLL() - { - return new LLVector3(m_sitTargetPosition.x, m_sitTargetPosition.y, m_sitTargetPosition.z); - } - /// /// Method for a prim to get it's world position from the group. /// Remember, the Group Position simply gives the position of the group itself @@ -2382,23 +2360,23 @@ namespace OpenSim.Region.Environment.Scenes aggregateScriptEvents(); } - public void SetSitTarget(Vector3 offset, Quaternion orientation) - { - m_sitTargetPosition = offset; - m_sitTargetOrientation = orientation; - } - - // Utility function so the databases don't have to reference axiom.math - public void SetSitTargetLL(LLVector3 offset, LLQuaternion orientation) - { - if ( - !(offset.X == 0 && offset.Y == 0 && offset.Z == 0 && (orientation.W == 0 || orientation.W == 1) && - orientation.X == 0 && orientation.Y == 0 && orientation.Z == 0)) - { - m_sitTargetPosition = new Vector3(offset.X, offset.Y, offset.Z); - m_sitTargetOrientation = new Quaternion(orientation.W, orientation.X, orientation.Y, orientation.Z); - } - } + // public void SetSitTarget(Vector3 offset, Quaternion orientation) + // { + // m_sitTargetPosition = offset; + // m_sitTargetOrientation = orientation; + // } + + // // Utility function so the databases don't have to reference axiom.math + // public void SetSitTargetLL(LLVector3 offset, LLQuaternion orientation) + // { + // if ( + // !(offset.X == 0 && offset.Y == 0 && offset.Z == 0 && (orientation.W == 0 || orientation.W == 1) && + // orientation.X == 0 && orientation.Y == 0 && orientation.Z == 0)) + // { + // m_sitTargetPosition = new Vector3(offset.X, offset.Y, offset.Z); + // m_sitTargetOrientation = new Quaternion(orientation.W, orientation.X, orientation.Y, orientation.Z); + // } + // } /// /// Set the text displayed for this part. diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 22ca159..a0a76cf 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -1096,8 +1096,8 @@ namespace OpenSim.Region.Environment.Scenes foreach (SceneObjectPart part in partArray) { // Is a sit target available? - Vector3 avSitOffSet = part.GetSitTargetPosition(); - Quaternion avSitOrientation = part.GetSitTargetOrientation(); + Vector3 avSitOffSet = part.SitTargetPosition; + Quaternion avSitOrientation = part.SitTargetOrientation; LLUUID avOnTargetAlready = part.GetAvatarOnSitTarget(); bool SitTargetUnOccupied = (!(avOnTargetAlready != LLUUID.Zero)); @@ -1130,8 +1130,8 @@ namespace OpenSim.Region.Environment.Scenes // see http://wiki.secondlife.com/wiki/User:Andrew_Linden/Office_Hours/2007_11_06 for details on how LL does it // Is a sit target available? - Vector3 avSitOffSet = part.GetSitTargetPosition(); - Quaternion avSitOrientation = part.GetSitTargetOrientation(); + Vector3 avSitOffSet = part.SitTargetPosition; + Quaternion avSitOrientation = part.SitTargetOrientation; LLUUID avOnTargetAlready = part.GetAvatarOnSitTarget(); bool SitTargetUnOccupied = (!(avOnTargetAlready != LLUUID.Zero)); @@ -1222,8 +1222,8 @@ namespace OpenSim.Region.Environment.Scenes { if (part.GetAvatarOnSitTarget() == UUID) { - Vector3 sitTargetPos = part.GetSitTargetPosition(); - Quaternion sitTargetOrient = part.GetSitTargetOrientation(); + Vector3 sitTargetPos = part.SitTargetPosition; + Quaternion sitTargetOrient = part.SitTargetOrientation; //Quaternion vq = new Quaternion(sitTargetPos.x, sitTargetPos.y+0.2f, sitTargetPos.z+0.2f, 0); //Quaternion nq = new Quaternion(sitTargetOrient.w, -sitTargetOrient.x, -sitTargetOrient.y, -sitTargetOrient.z); -- cgit v1.1