00001 /* LIBGUL - Geometry Utility Library 00002 * Copyright (C) 1998-1999 Norbert Irmer 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Library General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public 00015 * License along with this library; if not, write to the 00016 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 * Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef GUMA_TRANSFORM_H 00021 #define GUMA_TRANSFORM_H 00022 00023 namespace guma { 00024 00025 /*------------------------------------------------------------------- 00026 Calculates a matrix wich transforms points given in a local coordinate 00027 system at a point 'B' into the world coordinate system. 00028 An additional point is required (both in world coordinates 00029 (=P) and local coordinates (=Pb)). 'Ab' must contain the coordinates 00030 of the origin in the local coordinate system at 'B'. 00031 Both coordinate systems must be orthonormal, and memory for 'T' (a 4x4 00032 matrix) must be reserved by the caller. 00033 -------------------------------------------------------------------*/ 00034 00035 template< class U > 00036 void CommonCoordinateSystem( 00037 const gul::point<U>& B, const gul::point<U>& P, const gul::point<U>& Ab, 00038 const gul::point<U>& Pb, gul::Ptr< gul::Ptr<U> >& T ); 00039 00040 } 00041 00042 00043 #endif 00044