Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

gunu_make_compatible.h

Go to the documentation of this file.
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 GUNU_COMPATIBLE_H
00021 #define GUNU_COMPATIBLE_H
00022 
00023 namespace gunu {
00024 
00025 using gul::Ptr;
00026 
00027 /*-------------------------------------------------------------------------*//**
00028   make two surfaces in U- or V- direction compatible, after this both surfaces
00029   have the same degree and knot vector in the wanted direction, while remaining
00030   geometrically unchanged. (remark: the knot vectors must already have the
00031   same bounds, for example U1 = [0,0,0.5,1,1], U2 = [0,0,0,0.2,0.4,1,1,1])    */
00032 /*----------------------------------------------------------------------------*/
00033 
00034 template< class T, class HP1, class HP2 >
00035 void MakeSurfacesCompatibleU(
00036                    int nu1, int pu1, Ptr<T>& U1,
00037                    int nv1, int pv1, Ptr<T>& V1,
00038                    Ptr< Ptr<HP1> >& Pw1,
00039                    int nu2, int pu2, Ptr<T>& U2,
00040                    int nv2, int pv2, Ptr<T>& V2,
00041                    Ptr< Ptr<HP2> >& Pw2,
00042                    int *ret_nu1, int *ret_pu1, Ptr<T> *ret_U1,
00043                    int *ret_nv1, int *ret_pv1, Ptr<T> *ret_V1,
00044                    Ptr< Ptr<HP1> > *ret_Pw1,
00045                    int *ret_nu2, int *ret_pu2, Ptr<T> *ret_U2,
00046                    int *ret_nv2, int *ret_pv2, Ptr<T> *ret_V2,
00047                    Ptr< Ptr<HP2> > *ret_Pw2 );
00048 
00049 template< class T, class HP1, class HP2 >
00050 void MakeSurfacesCompatibleV(
00051                    int nu1, int pu1, Ptr<T>& U1,
00052                    int nv1, int pv1, Ptr<T>& V1,
00053                    Ptr< Ptr<HP1> >& Pw1,
00054                    int nu2, int pu2, Ptr<T>& U2,
00055                    int nv2, int pv2, Ptr<T>& V2,
00056                    Ptr< Ptr<HP2> >& Pw2,
00057                    int *ret_nu1, int *ret_pu1, Ptr<T> *ret_U1,
00058                    int *ret_nv1, int *ret_pv1, Ptr<T> *ret_V1,
00059                    Ptr< Ptr<HP1> > *ret_Pw1,
00060                    int *ret_nu2, int *ret_pu2, Ptr<T> *ret_U2,
00061                    int *ret_nv2, int *ret_pv2, Ptr<T> *ret_V2,
00062                    Ptr< Ptr<HP2> > *ret_Pw2 );
00063 
00064 
00065 template< class T, class HP1, class HP2 >
00066 void MakeSurfacesCompatible(
00067                    int nu1, int pu1, Ptr<T>& U1,
00068                    int nv1, int pv1, Ptr<T>& V1,
00069                    Ptr< Ptr<HP1> >& Pw1,
00070                    int nu2, int pu2, Ptr<T>& U2,
00071                    int nv2, int pv2, Ptr<T>& V2,
00072                    Ptr< Ptr<HP2> >& Pw2,
00073                    int dir,
00074                    int *ret_nu1, int *ret_pu1, Ptr<T> *ret_U1,
00075                    int *ret_nv1, int *ret_pv1, Ptr<T> *ret_V1,
00076                    Ptr< Ptr<HP1> > *ret_Pw1,
00077                    int *ret_nu2, int *ret_pu2, Ptr<T> *ret_U2,
00078                    int *ret_nv2, int *ret_pv2, Ptr<T> *ret_V2,
00079                    Ptr< Ptr<HP2> > *ret_Pw2 )
00080 {
00081   if( dir==gul::u_direction )
00082     MakeSurfacesCompatibleU(
00083        nu1,pu1,U1,nv1,pv1,V1,Pw1,nu2,pu2,U2,nv2,pv2,V2,Pw2,
00084        ret_nu1,ret_pu1,ret_U1,ret_nv1,ret_pv1,ret_V1,ret_Pw1,
00085        ret_nu2,ret_pu2,ret_U2,ret_nv2,ret_pv2,ret_V2,ret_Pw2 );
00086   else
00087     MakeSurfacesCompatibleV(
00088        nu1,pu1,U1,nv1,pv1,V1,Pw1,nu2,pu2,U2,nv2,pv2,V2,Pw2,
00089        ret_nu1,ret_pu1,ret_U1,ret_nv1,ret_pv1,ret_V1,ret_Pw1,
00090        ret_nu2,ret_pu2,ret_U2,ret_nv2,ret_pv2,ret_V2,ret_Pw2 );
00091 }
00092 
00093 }
00094 
00095 
00096 #endif

Generated on Mon Jan 21 04:17:40 2002 for GUL 0.6 - Geometry Utility Library by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001