rotation.hpp

Go to the documentation of this file.
00001 // -*- mode: c++; indent-tabs-mode: nil; -*-
00002 //
00003 //The Biomolecule Toolkit (BTK) is a C++ library for use in the
00004 //modeling, analysis, and design of biological macromolecules.
00005 //Copyright (C) 2005-2006, Tim Robertson <kid50@users.sourceforge.net>
00006 //
00007 //This program is free software; you can redistribute it and/or modify
00008 //it under the terms of the GNU Lesser General Public License as published
00009 //by the Free Software Foundation; either version 2.1 of the License, or (at
00010 //your option) any later version.
00011 //
00012 //This program is distributed in the hope that it will be useful,  but
00013 //WITHOUT ANY WARRANTY; without even the implied warranty of'
00014 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 //Lesser General Public License for more details.
00016 //
00017 //You should have received a copy of the GNU Lesser General Public License
00018 //along with this program; if not, write to the Free Software Foundation,
00019 //Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00020 
00023 
00024 #ifndef BTK_MATH_ROTATION_HPP
00025 #define BTK_MATH_ROTATION_HPP
00026 
00027 #include <btk/core/math/btk_vector.hpp>
00028 #include <btk/core/math/btk_matrix.hpp>
00029 
00030 namespace BTK {
00031 namespace MATH {
00032 
00039 
00047 void
00048 initialize_rotation_matrix(BTKVector const & axis,
00049                            double theta,
00050                            BTKMatrix & rm);
00051 
00059 inline
00060 BTKMatrix
00061 create_rotation_matrix(BTKVector const & axis,
00062                        double theta)
00063  {
00064    BTKMatrix tmp;
00065    initialize_rotation_matrix(axis,theta,tmp);
00066    return tmp;
00067  }
00068 
00089 
00090 
00093 void
00094 initialize_rotation_matrix(double phi,
00095                            double theta,
00096                            double psi,
00097                            BTKMatrix & rm);
00098 
00101 inline
00102 BTKMatrix
00103 create_rotation_matrix(double phi,
00104                        double theta,
00105                        double psi)
00106 {
00107   BTKMatrix tmp;
00108   initialize_rotation_matrix(phi,theta,psi,tmp);
00109   return tmp;
00110 }
00111 
00112 } // namespace MATH
00113 } // namespace BTK
00114  
00115 #endif // BTK_MATH_ROTATION_HPP

Generated on Sun Jul 15 20:46:27 2007 for BTK Core by  doxygen 1.5.1