|
From: Markus R. <rol...@us...> - 2007-06-15 08:48:23
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14965/spark/oxygen/sceneserver Modified Files: basenode.cpp basenode.h transform.cpp transform.h Log Message: - merged ROSIMPORTER_XLAB bracnh Index: transform.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/transform.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** transform.cpp 18 Feb 2006 19:48:06 -0000 1.2 --- transform.cpp 15 Jun 2007 08:48:17 -0000 1.3 *************** *** 85,90 **** mOldLocalTransform = mLocalTransform; ! mLocalTransform = transform; ! parent->SetWorldTransform(mIdentityMatrix); } --- 85,91 ---- mOldLocalTransform = mLocalTransform; ! mLocalTransform = (parent->GetWorldTransform()); ! mLocalTransform.InvertMatrix(); ! mLocalTransform = mLocalTransform * transform; } *************** *** 98,101 **** --- 99,107 ---- } + const salt::Vector3f& Transform::GetLocalPos() + { + return mLocalTransform.Pos(); + } + void Transform::SetLocalRotationRad(const salt::Vector3f &rot) { Index: basenode.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/basenode.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** basenode.h 5 Dec 2005 21:21:17 -0000 1.1 --- basenode.h 15 Jun 2007 08:48:17 -0000 1.2 *************** *** 111,115 **** /** returns the corresponding local coordinates to the given world coordinates */ ! salt::Vector3f GetLocalPos(const salt::Vector3f& worldPos); /** updates internal state before physics calculation */ --- 111,115 ---- /** returns the corresponding local coordinates to the given world coordinates */ ! salt::Vector3f GetLocalPos(const salt::Vector3f& worldPos) const; /** updates internal state before physics calculation */ Index: transform.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/transform.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** transform.h 18 Feb 2006 19:48:06 -0000 1.2 --- transform.h 15 Jun 2007 08:48:17 -0000 1.3 *************** *** 71,74 **** --- 71,77 ---- void SetLocalPos(const salt::Vector3f &pos); + /** returns the local position of this node */ + const salt::Vector3f& GetLocalPos(); + /** sets the local rotation of this node in rad */ void SetLocalRotationRad(const salt::Vector3f &rot); Index: basenode.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/basenode.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** basenode.cpp 15 Feb 2006 01:00:19 -0000 1.2 --- basenode.cpp 15 Jun 2007 08:48:17 -0000 1.3 *************** *** 201,205 **** } ! salt::Vector3f BaseNode::GetLocalPos(const salt::Vector3f& worldPos) { Matrix invWorld = GetWorldTransform(); --- 201,205 ---- } ! salt::Vector3f BaseNode::GetLocalPos(const salt::Vector3f& worldPos) const { Matrix invWorld = GetWorldTransform(); |