egholef.h

Go to the documentation of this file.
00001 
00002 /* ///////////////////////////////////////////////////////////////////////// */
00003 /* This file is a part of the BSTools package                                */
00004 /* written by Przemyslaw Kiciak                                              */
00005 /* ///////////////////////////////////////////////////////////////////////// */
00006 /* (C) Copyright by Przemyslaw Kiciak, 2005, 2010                            */
00007 /* this package is distributed under the terms of the                        */
00008 /* Lesser GNU Public License, see the file COPYING.LIB                       */
00009 /* ///////////////////////////////////////////////////////////////////////// */
00010 
00011 /* this header file is intended to be #included by the #include files        */
00012 /* eg1holef.h and eg2holef.h, which in turn may be #included by applications */
00013 
00014 #ifndef EGHOLEF_H
00015 #define EGHOLEF_H
00016 
00017 #ifndef CONST_  /* a dirty trick to suppress many compiler warning messages */
00018 #define CONST_ const
00019 #endif
00020 
00021 #ifdef __cplusplus   
00022 extern "C" {
00023 #endif
00024 
00025 #define GH_MAX_K 16  /* maximal number of hole sides */
00026 
00027 typedef struct GHoleDomainf {
00028     int     hole_k;         /* number of hole sides */
00029     float   *hole_knots;    /* knots of the surface with the hole */
00030     point2f *domain_cp;     /* control points of domain definition */
00031     boolean basisG1, basisG2;
00032     void    *privateG;      /* points to a common private data for G1 and G2 */
00033     void    *privateG1;     /* points to a G1HolePrivateRecf structure */
00034     void    *SprivateG1;    /* points to a G1HoleSPrivateRecf structire */
00035     void    *privateG2;     /* points to a G1HolePrivateRecf structure */
00036     void    *SprivateG2;    /* points to a G1HoleSPrivateRecf structire */
00037     void    *usrptr;        /* points to arbitrary application stuff */
00038     int     error_code;     /* explains possible failure reasons */
00039   } GHoleDomainf;
00040 
00041 
00042 GHoleDomainf* gh_CreateDomainf ( int     hole_k,
00043                                  float   *hole_knots,
00044                                  point2f *domain_cp );
00045 void gh_DestroyDomainf ( GHoleDomainf *domain );
00046 
00047 void gh_GetBspInd ( int hole_k, int i, int j, int *ind );
00048 int gh_DrawBFcpn ( int hole_k, unsigned char *bfcpn );
00049 
00050 boolean gh_FindDomSurrndBezPatchesf ( GHoleDomainf *domain );
00051 float gh_DomainDiamf ( GHoleDomainf *domain );
00052 float gh_HoleDomainAreaf ( GHoleDomainf *domain, boolean symmetric );
00053 
00054 /* ///////////////////////////////////////////////////////////////////////// */
00055 /* drawing procedure */
00056 void gh_DrawDomSurrndPatchesf ( GHoleDomainf *domain,
00057                void (*drawpatch) ( int n, int m, const point2f *cp ) );
00058 void gh_GetDomSurrndBFuncf ( GHoleDomainf *domain, int fn, int i, int j,
00059                              float *bf );
00060 
00061 /* ///////////////////////////////////////////////////////////////////////// */
00062 /* domain net data, eigenvectors of the mesh refinement operators */
00063 extern point2f egh_eigendom3f[], egh_eigendom5f[], egh_eigendom6f[],
00064                egh_eigendom7f[], egh_eigendom8f[], egh_eigendom9f[],
00065                egh_eigendom10f[], egh_eigendom11f[], egh_eigendom12f[],
00066                egh_eigendom13f[], egh_eigendom14f[], egh_eigendom15f[],
00067                egh_eigendom16f[], *egh_eigendomcpf[];
00068 extern float egh_eigenvalf[GH_MAX_K-3];
00069 
00070 #ifdef __cplusplus
00071 }
00072 #endif
00073 
00074 #endif
00075