From: Markus R. <rol...@us...> - 2006-02-18 19:48:12
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14374 Modified Files: transform.h transform.cpp transform_c.cpp Log Message: - renamed SetLocalRotation() to SetLocalRotationDeg() - added method SetLocalRotationRad() Index: transform.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/transform.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** transform.cpp 5 Dec 2005 21:21:17 -0000 1.1 --- transform.cpp 18 Feb 2006 19:48:06 -0000 1.2 *************** *** 98,102 **** } ! void Transform::SetLocalRotation(const salt::Vector3f &rot) { mChangedMark = SceneServer::GetTransformMark(); --- 98,102 ---- } ! void Transform::SetLocalRotationRad(const salt::Vector3f &rot) { mChangedMark = SceneServer::GetTransformMark(); *************** *** 104,110 **** Vector3f pos = mLocalTransform.Pos(); ! mLocalTransform.RotationX(gDegToRad(rot[0])); ! mLocalTransform.RotateY(gDegToRad(rot[1])); ! mLocalTransform.RotateZ(gDegToRad(rot[2])); mLocalTransform.Pos() = pos; --- 104,110 ---- Vector3f pos = mLocalTransform.Pos(); ! mLocalTransform.RotationX(rot[0]); ! mLocalTransform.RotateY(rot[1]); ! mLocalTransform.RotateZ(rot[2]); mLocalTransform.Pos() = pos; *************** *** 112,115 **** --- 112,125 ---- } + void Transform::SetLocalRotationDeg(const salt::Vector3f &rot) + { + SetLocalRotationRad(Vector3f( + gDegToRad(rot[0]), + gDegToRad(rot[1]), + gDegToRad(rot[2]) + ) + ); + } + void Transform::OnLink() { Index: transform_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/transform_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** transform_c.cpp 5 Dec 2005 21:21:17 -0000 1.1 --- transform_c.cpp 18 Feb 2006 19:48:06 -0000 1.2 *************** *** 56,60 **** } ! obj->SetLocalRotation(inRot); return true; } --- 56,60 ---- } ! obj->SetLocalRotationDeg(inRot); return true; } Index: transform.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/transform.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** transform.h 5 Dec 2005 21:21:17 -0000 1.1 --- transform.h 18 Feb 2006 19:48:06 -0000 1.2 *************** *** 71,76 **** void SetLocalPos(const salt::Vector3f &pos); /** sets the local rotation of this node in degrees */ ! void SetLocalRotation(const salt::Vector3f &rot); /** returns the current transform mark */ --- 71,79 ---- void SetLocalPos(const salt::Vector3f &pos); + /** sets the local rotation of this node in rad */ + void SetLocalRotationRad(const salt::Vector3f &rot); + /** sets the local rotation of this node in degrees */ ! void SetLocalRotationDeg(const salt::Vector3f &rot); /** returns the current transform mark */ |