00001 //------------------------------------------------------------------- 00004 // Copyright (c) 2004 Evan Sherbrooke and Michael Lauer 00005 // Portions copyright (c) 2007 Celeritive Technologies, Inc. 00006 // 00007 // This library is free software; you can redistribute it and/or 00008 // modify it under the terms of the GNU Lesser General Public 00009 // License as published by the Free Software Foundation; either 00010 // version 2.1 of the License, or (at your option) any later version. 00011 // 00012 // This library is distributed in the hope that it will be useful, 00013 // but 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 00018 // License along with this library; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 // 00021 //------------------------------------------------------------------- 00022 #pragma once 00023 00024 #ifndef VOLUMILL_TRANFORM_H 00025 #define VOLUMILL_TRANSFORM_H 00026 00027 #ifdef WIN32 00028 #pragma warning(push) 00029 #pragma warning(disable : 4244 4267) 00030 #endif 00031 #include <boost/numeric/ublas/matrix.hpp> 00032 #ifdef WIN32 00033 #pragma warning(pop) 00034 #endif 00035 00036 #include <Geom/Points.h> 00037 00038 namespace geom 00039 { 00040 00042 class Transform 00043 { 00044 public: 00045 typedef boost::numeric::ublas::matrix<double> Matrix; 00046 00047 Transform () : m_mat (4,4) { setToIdentity(); } 00048 void setToIdentity (); 00049 void setToRotation (const geom::Vec3d& axis, double angle); 00050 00051 Point3d transformPoint (const Point3d& pt) const; 00052 private: 00053 Matrix m_mat; 00054 }; 00055 00056 } 00057 #endif