cgma
Cholla.h
Go to the documentation of this file.
00001 
00011 #ifndef CHOLLA____H
00012 #define CHOLLA____H
00013 
00014 #define NUM_EDGE_CPTS 3
00015 #define NUM_TRI_CPTS  6
00016 #define NUM_QUAD_CPTS 15
00017 
00018 #include "CubitDefines.h"
00044 void constructBezier( double angle, int numTri, int numQuad, int numEdge,
00045                       int numVert, int* triEdge, int* quadEdge,
00046                       int* edgeVert, double* vert,
00047                       double* edgeCtrlPts, double* triCtrlPts,
00048                       double* quadCtrlPts );
00049 
00076 void constructTriNormals( double angle, int numTri, int numEdge,
00077                           int numVert, int* triEdge,
00078                           int* edgeVert, double* vert,
00079                           double* triVertNorms, double* edgeVertTang,
00080                           int* edgeTypeFlags);
00081 
00108 void constructQuadNormals( double angle, int numQuad, int numEdge,
00109                            int numVert, int* quadEdge,
00110                            int* edgeVert, double* vert,
00111                            double* quadVertNorms, double* edgeVertTang,
00112                            int* edgeTypeFlags);
00113 
00131 CubitStatus constructTriNormalsFromFile( const char *filename,
00132                                          int numTri,
00133                                          int numEdge,
00134                                          int* triEdge,
00135                                          int* edgeVert,
00136                                          double* triVertNorms,
00137                                          double* edgeVertTang );
00138 
00159 CubitStatus constructQuadNormalsFromFile( const char *filename,
00160                                           int numQuad,
00161                                           int numEdge,
00162                                           int* quadEdge,
00163                                           int* edgeVert,
00164                                           double* quadVertNorms,
00165                                           double* edgeVertTang );
00166 
00194 CubitStatus readMBGNormalFile( const char *filename,
00195                                int *numTri,
00196                                int *numQuad,
00197                                int *numEdge,
00198                                int **edgeVert,
00199                                double **edgeVertTang,
00200                                int **triVert,
00201                                double **triVertNorms,
00202                                int **quadVert,
00203                                double **quadVertNorms );
00204 
00253 void evalBezierFace( int numFace, int numEdge, int numVert, int numVertPerFace, 
00254                      int* faceEdge, int* edgeVert, 
00255                      double* vert,  double* faceCtrlPts,
00256                      double* edgeCtrlPts, 
00257                      int numLocs, double* paramLocation, 
00258                      double* location, double* normal, double* deriv );
00259 
00276 void evalBezierFaceFromNorms( int numFace, int numEdge, int numVert, 
00277                               int numVertPerFace, int* faceEdge, int* edgeVert, 
00278                               double* vert, double* vertNorms, double* edgeVertTang,
00279                               int numLocs, double* paramLocation, 
00280                               double* location, double* normal, double* deriv );
00281 
00332 void projToBezierFace( int numFace, int numEdge, int numVert, int numVertPerFace, 
00333                      int* faceEdge, int* edgeVert, 
00334                      double* vert,  double* faceCtrlPts,
00335                      double* edgeCtrlPts, 
00336                      int numLocs, double* xyz, 
00337                      int specify_tol, double converge_tol,
00338                      double* xyzOnFace, double* normal, double* deriv );
00339 
00356 void projToBezierFaceFromNorms( int numFace, int numEdge, int numVert, int numVertPerFace, 
00357                      int* faceEdge, int* edgeVert, 
00358                      double* vert,  double* vertNorms,
00359                      double* edgeVertTang, 
00360                      int numLocs, double* xyz, 
00361                      int specify_tol, double converge_tol,
00362                      double* xyzOnFace, double* normal, double* deriv );
00363 
00387 void evalBezierEdgeFromTans( int numEdge, int numVert, int* edgeVert, 
00388                               double* vert, double* edgeVertTang,
00389                               int numLocs, double* paramLocation, 
00390                               double* location, double* tangent );
00417 void evalBezierEdge( int numEdge, int numVert, int* edgeVert,
00418                      double* vert, double* edgeCtrlPts, 
00419                      int numLocs, double* paramLocation, 
00420                      double* location, double* tangent );
00421 
00446 void projToBezierEdgeFromTans( int numEdge, int numVert, int* edgeVert, 
00447                               double* vert, double* edgeVertTang,
00448                               int numLocs, double* xyz, 
00449                               double* xyzOnEdge, double* tangent );
00450 
00479 void projToBezierEdge( int numEdge, int numVert, int* edgeVert, 
00480                        double* vert, double* edgeCtrlPts,
00481                        int numLocs, double* xyz, 
00482                        double* xyzOnEdge, double* tangent, double* t_value );
00483 
00488 /* 
00489  * 
00490  *
00491  * 
00492  * 
00493  */
00494 /* dump the face mesh to a file that can be read by CUBIT
00495  * Use the same definition of parameters as used with resolveFaceVectors
00496  *
00497  * @param fileName      - name of file to write to (will be overwritten)
00498  * @param includeResults- if (0) then don't write face/edge vectors to file
00499  */
00500 void dumpMesh(const char *fileName, int includeResults, double angle,
00501               int numTri, int numQuad, int numEdge,
00502               int numVert, int* triEdge, int* quadEdge,
00503               int* edgeVert, double* vert,
00504               double* edgeCtrlPts, double* triCtrlPts,
00505               double* quadCtrlPts);
00506 
00507 /* dump only the results to a file
00508  */
00509 void dumpResults(const char *fileName, int numEdge, int numTri, int numQuad, 
00510                  double* edgeCtrlPts, double* triCtrlPts, 
00511                  double* quadCtrlPts );
00512 
00513 /* import the face mesh from the specified file
00514  * This is used by Cubit for debugging purposes
00515  *
00516  * @param fileName      - name of file to read from.  
00517  *                        (file typically written by dumpMesh)
00518  */
00519 void importMesh(const char *fileName, int *resultsIncluded,
00520                 double *angle, int *numTri, int *numQuad, int *numEdge,
00521                 int *numVert, int** triEdge, int** quadEdge,
00522                 int** edgeVert, double** vert,
00523                 double** edgeCtrlPts, double** triCtrlPts,
00524                 double** quadCtrlPts);
00525 
00526 /* read only the results from a file
00527  */
00528 void importResults(const char *fileName, int *numEdge, int *numTri, 
00529                    int *numQuad, double** edgeCtrlPts, double** triCtrlPts, 
00530                    double** quadCtrlPts );
00531 
00532 
00533 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines