ImplicitUtils.h

00001 //===========================================================================
00002 // GoTools - SINTEF Geometry Tools
00003 //
00004 // GoTools module: Implicitization, version 1.0
00005 //
00006 // Copyright (C) 2000-2007 SINTEF ICT, Applied Mathematics, Norway.
00007 //
00008 // This program is free software; you can redistribute it and/or          
00009 // modify it under the terms of the GNU General Public License            
00010 // as published by the Free Software Foundation version 2 of the License. 
00011 //
00012 // This program 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          
00015 // GNU General Public License for more details.                           
00016 //
00017 // You should have received a copy of the GNU General Public License      
00018 // along with this program; if not, write to the Free Software            
00019 // Foundation, Inc.,                                                      
00020 // 59 Temple Place - Suite 330,                                           
00021 // Boston, MA  02111-1307, USA.                                           
00022 //
00023 // Contact information: E-mail: tor.dokken@sintef.no                      
00024 // SINTEF ICT, Department of Applied Mathematics,                         
00025 // P.O. Box 124 Blindern,                                                 
00026 // 0314 Oslo, Norway.                                                     
00027 //
00028 // Other licenses are also available for this software, notably licenses
00029 // for:
00030 // - Building commercial software.                                        
00031 // - Building software whose source code you wish to keep private.        
00032 //===========================================================================
00033 #ifndef _IMPLICITUTILS_H
00034 #define _IMPLICITUTILS_H
00035 
00036 
00037 #include "BaryCoordSystem.h"
00038 #include "PointCloud.h"
00039 #include <vector>
00040 
00041 
00042 namespace Go {
00045 
00046 
00047 
00048 class BernsteinPoly;
00049 class BernsteinMulti;
00050 class BernsteinTriangularPoly;
00051 class BernsteinTetrahedralPoly;
00052 class SplineCurve;
00053 class SplineSurface;
00054 class BoundingBox;
00055 
00056 
00058 void create_bary_coord_system2D(const SplineCurve& curve,
00059                                 BaryCoordSystem2D& bc);
00060 
00062 void create_bary_coord_system3D(const SplineCurve& curve,
00063                                 BaryCoordSystem3D& bc);
00064 
00066 void create_bary_coord_system3D(const SplineSurface& surface,
00067                                 BaryCoordSystem3D& bc);
00068 
00070 void create_bary_coord_system3D(const PointCloud3D& cloud,
00071                                 BaryCoordSystem3D& bc);
00072 
00074 void create_bary_coord_system3D(const BoundingBox& box,
00075                                 BaryCoordSystem3D& bc);
00076 
00079 void cart_to_bary(const SplineCurve& cv, const BaryCoordSystem2D& bc,
00080                   SplineCurve& cv_bc);
00081 
00084 void cart_to_bary(const SplineCurve& cv, const BaryCoordSystem3D& bc,
00085                   SplineCurve& cv_bc);
00086 
00089 void cart_to_bary(const SplineSurface& sf, const BaryCoordSystem3D& bc,
00090                   SplineSurface& sf_bc);
00091 
00094 void cart_to_bary(const PointCloud3D& cloud, const BaryCoordSystem3D& bc,
00095                   PointCloud4D& cloud_bc);
00096 
00098 void make_matrix(const SplineCurve& curve, int deg,
00099                  std::vector<std::vector<double> >& mat);
00100 
00102 void make_matrix(const SplineSurface& surf, int deg,
00103                  std::vector<std::vector<double> >& mat);
00104 
00106 void make_matrix(const PointCloud4D& cloud, int deg,
00107                  std::vector<std::vector<double> >& mat);
00108 
00113 void make_implicit_svd(std::vector<std::vector<double> >& mat, 
00114                        std::vector<double>& b, double& sigma_min);
00115 
00119 void make_implicit_gauss(std::vector<std::vector<double> >& mat,
00120                          std::vector<double>& b);
00121 
00122 
00124 } // namespace Go
00125 
00126 
00127 #endif // _IMPLICITUTILS_H
00128 
00129 

Generated on Mon Jun 11 15:13:16 2007 for GoTools Implicitization Library by  doxygen 1.5.1