FEV.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #ifndef FEV_h
  2. #define _FEV_h
  3. /***************important matrix macro************/
  4. #define e(m,i,j) m->mat[i][j]
  5. /***************external matrix**************/
  6. extern dvec dvector(int);
  7. extern void dvec_free(dvec);
  8. extern matrix_t mat_mpy(matrix_t, matrix_t);
  9. extern matrix_t mat_add(matrix_t, matrix_t, int);
  10. extern matrix_t mat_frd(char*);
  11. extern matrix_t mat_new(int, int);
  12. extern int dvec_pr();
  13. extern int mat_pr(char*, matrix_t, FILE*);
  14. extern void mat_free(matrix_t);
  15. extern void cberror(char*);
  16. /***************external FEV**************/
  17. extern vertex_t get_v_arr();
  18. extern pr_edge_t get_e_arr();
  19. extern pr_face_t get_f_arr();
  20. extern int reset(char);
  21. extern vertex_t new_vert(double, double, double);
  22. extern edge_t new_edge(vertex_t, vertex_t);
  23. extern face_t new_face (edge_t[], int);
  24. extern face_t new_tetrahedron();
  25. extern int vert_fr(vertex_t);
  26. extern int edge_fr(edge_t, int);
  27. extern int face_fr(face_t, int);
  28. extern int vert_pr(char*, vertex_t, FILE*);
  29. extern int edge_pr(char*, edge_t);
  30. extern int face_pr(char*, face_t);
  31. extern int short_vert_pr(vertex_t);
  32. extern int short_edge_pr(edge_t);
  33. extern int short_face_pr(face_t);
  34. extern int short_poly_pr(face_t);
  35. extern pr_edge_t new_print_edge(edge_t);
  36. extern pr_face_t new_print_face(face_t);
  37. extern int pr_edge_fr(pr_edge_t, int);
  38. extern int pr_face_fr(pr_face_t, int, int);
  39. extern int pr_edge_pr(char*, pr_edge_t, FILE*);
  40. extern int pr_face_pr(char*, pr_face_t, FILE*);
  41. extern int short_pr_edge_pr(pr_edge_t);
  42. extern int short_pr_face_pr(pr_face_t);
  43. extern vertex_t vert_read(FILE*);
  44. extern int printificate(face_t, char*);
  45. extern face_t readificate(char*);
  46. /*****************basics ****************/
  47. #define max(x,y) x>y?x:y
  48. #define min(x,y) x>y?y:x
  49. /* #define abs(x) x>0?x:-x */
  50. #define deg_to_rad ( (double) M_PI/180.0)
  51. /**********error codes***************/
  52. #define OK 1
  53. #define MALLOC 0
  54. #define NILARG1 -1
  55. #define NILARG2 -2
  56. #define NILARG3 -3
  57. #define NILARG4 -4
  58. #define SINGULAR -5
  59. #define NONSQUARE -6
  60. #define NONCONFORM -7
  61. #define NONAFFINE -8
  62. #endif