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

gunu_linearize.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_LINEARIZE_H
00021 #define GUNU_LINEARIZE_H
00022 
00023 namespace gunu {
00024 
00025 using gul::Ptr;
00026 using gul::point;
00027 using gul::hpoint;
00028 
00029 template< class T, class HP >
00030 struct LinearizeCallbackData
00031 {
00032   int                        much_info;
00033   TessInfo<T,HP>            *Org;
00034 
00035   void (*usrfunc)( void *, 
00036                    point<T> *, point<T> *, point<T> *, point<T> *,
00037                    point<T> *, point<T> *, point<T> *, point<T> *,
00038                    T *, T *, T *, T * );
00039   void                      *usrdata;  
00040 
00041   LinearizeCallbackData(
00042          int               a_much_info,
00043          TessInfo<T,HP>   *a_Org,
00044          void (*a_usrfunc)( void *, 
00045                    point<T> *, point<T> *, point<T> *, point<T> *,
00046                    point<T> *, point<T> *, point<T> *, point<T> *,
00047                    T *, T *, T *, T * ),
00048          void              *a_usrdata )
00049   {
00050     much_info = a_much_info;
00051     Org = a_Org;
00052     usrfunc = a_usrfunc;
00053     usrdata = a_usrdata;
00054   }
00055 };
00056 
00057 /*******************************************************************
00058   approximate NURBS surface with triangles
00059 ********************************************************************/
00060 
00061 template< class T, class HP, class EP >
00062 GULAPI
00063 void LinearizeSurface( 
00064             int max_iter,
00065             const int nu, const int pu, Ptr< T > U,
00066             const int nv, const int pv, Ptr< T > V,
00067             Ptr< Ptr < HP > > Pw,
00068             const T tol,
00069             void (*usrfunc)( void *, 
00070                    EP *, EP *, EP *, EP *,
00071                    EP *, EP *, EP *, EP *,
00072                    T *, T *, T *, T * ),
00073             void *usrdata );
00074 
00075 
00076 /**********************************************************************
00077   linearize curve (with callback function)
00078 **********************************************************************/
00079 template< class T, class HP, class EP >
00080 GULAPI
00081 void LinearizeCurve( int max_iter,
00082              const int n, const int p, Ptr< T > U, Ptr< HP > Pw,
00083              const T tol,
00084              void (*usrfunc)( void *, EP *, EP * ), void *usrdata );
00085 
00086 /**********************************************************************
00087   linearize curve (returns a polyline)
00088 **********************************************************************/
00089 template< class T, class HP, class EP >
00090 GULAPI
00091 void LinearizeCurve( int max_iter,
00092              const int n, const int p, Ptr< T > U, Ptr< HP > Pw,
00093              const T tol,
00094              int *ret_nP, Ptr< EP > *retP );
00095 
00096 }
00097 
00098 #endif
00099 
00100 
00101 
00102 
00103 

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