00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef __SplSplit_h
00043 #define __SplSplit_h
00044
00045 #undef TRACE_SPLIT
00046 #undef TRACE_SPLIT1
00047 #undef TRACE_SPLIT2
00048 #undef TRACE_SPLIT3
00049 #undef TRACE_SPLIT4
00050
00051 #include <stdio.h>
00052
00053 #ifndef EXTERN
00054 #ifdef _DVS_
00055 #define EXTERN
00056 #else
00057 #define EXTERN extern
00058 #endif
00059 #endif
00060
00061 #ifndef __int_id
00062 #define __int_id
00063 typedef int Id;
00064 #endif
00065 #ifndef __double_vector
00066 #define __double_vector
00067 typedef real vector[4];
00068 #endif
00069 #ifndef __struct_solid
00070 #define __struct_solid
00071 typedef struct solid STYPE;
00072 #endif
00073 #ifndef __struct_face
00074 #define __struct_face
00075 typedef struct face FTYPE;
00076 #endif
00077 #ifndef __struct_loop
00078 #define __struct_loop
00079 typedef struct loop LTYPE;
00080 #endif
00081 #ifndef __struct_edge
00082 #define __struct_edge
00083 typedef struct edge ETYPE;
00084 #endif
00085 #ifndef __struct_halfedge
00086 #define __struct_halfedge
00087 typedef struct halfedge HTYPE;
00088 #endif
00089 #ifndef __struct_vertex
00090 #define __struct_vertex
00091 typedef struct vertex VTYPE;
00092 #endif
00093
00094 #define ON 0
00095 #define BELOW -1
00096 #define ABOVE 1
00097
00098 #ifdef TRACE_SPLIT
00099 EXTERN FILE *trace;
00100 #endif
00101
00102 EXTERN int OutputPlanoCorte;
00103 EXTERN char OutputFile[12];
00104
00105
00106 #ifndef MAXSHELLS
00107 #define MAXSHELLS 50
00108 #endif
00109 typedef struct sf SF;
00110 struct sf
00111 {
00112 DPTYPE shell;
00113 int sign;
00114 };
00115 #ifndef __VIRTUAL_MEM
00116 EXTERN SF spl_shellpos[MAXSHELLS];
00117 #endif
00118 EXTERN int spl_contshell;
00119
00120 #ifndef MAXONVERTICES
00121 #define MAXONVERTICES 100
00122 #endif
00123 #ifndef __VIRTUAL_MEM
00124 EXTERN VPTYPE spl_soov[MAXONVERTICES];
00125 #endif
00126 EXTERN int spl_nvtx;
00127
00128
00129 #ifndef MAXNULLEDGES
00130 #define MAXNULLEDGES 100
00131 #endif
00132 #ifndef MAXEDGESFORVERTEX
00133 #define MAXEDGESFORVERTEX 100
00134 #endif
00135 #ifndef __VIRTUAL_MEM
00136 EXTERN EPTYPE spl_sone[MAXNULLEDGES];
00137 #endif
00138 typedef struct _spl_nbr spl_NBR;
00139 struct _spl_nbr
00140 {
00141 HPTYPE sector;
00142 int c1;
00143 };
00144 #ifndef __VIRTUAL_MEM
00145 EXTERN spl_NBR spl_nbr[MAXEDGESFORVERTEX];
00146 #endif
00147 EXTERN int spl_nnbr;
00148 EXTERN int spl_nedge;
00149
00150
00151 #ifndef MAXNULLFACES
00152 #define MAXNULLFACES 100
00153 #endif
00154 #ifndef __VIRTUAL_MEM
00155 EXTERN FPTYPE spl_sonf[MAXNULLFACES * 2];
00156 EXTERN HPTYPE spl_ends[30];
00157 #endif
00158 EXTERN int spl_nfac;
00159 EXTERN int spl_nend;
00160 EXTERN int spl_null_edge_pointer;
00161
00162
00163 void MSD_execNameSplit(void);
00164
00165 void MSD_highNameSplit(char *, char *, char *, real, real, real, real);
00166 void MSD_execSplit(void);
00167
00168 Id MSD_highSplit(Id, real, real, real, real);
00169 int MSD_lowSplit(SPTYPE, vector, Id, Id, SPTYPE *, SPTYPE *);
00170 void MSD_lowSplitInitiate(void);
00171 void MSD_lowSplitTerminate(void);
00172
00173
00174 void MSD_lowSplitGenerate(SPTYPE, vector);
00175 void MSD_lowAddSplitOnVertex(VPTYPE);
00176
00177
00178 void MSD_lowSplitClassify(vector);
00179 void MSD_lowGetNeighborhood(VPTYPE, vector);
00180 void MSD_lowReclassifyOnSectors(vector);
00181 void MSD_lowReclassifyOnEdges(void);
00182 void MSD_lowInsertNullEdges(void);
00183
00184 int MSD_lowCheckWideness(HPTYPE);
00185 void MSD_lowBisector(HPTYPE, vector);
00186 real MSD_lowDistancePlanePoint(vector, VPTYPE);
00187
00188
00189 void MSD_lowSplitConnect(void);
00190
00191 HPTYPE MSD_lowCanJoin(HPTYPE);
00192 void MSD_lowJoin(HPTYPE, HPTYPE);
00193 void MSD_lowCut(HPTYPE);
00194 int MSD_lowNeighbor(HPTYPE, HPTYPE);
00195 int MSD_lowIsLoose(HPTYPE);
00196 void MSD_lowSortNullEdge(void);
00197 int MSD_lowGreater(int i, int j);
00198 void MSD_lowSwap(int i, int j);
00199 EPTYPE MSD_lowGetNextNullEdge(void);
00200
00201
00202 void MSD_lowSplitFinish(SPTYPE, Id, Id, SPTYPE *, SPTYPE *);
00203
00204
00205 void MSD_execVoronoi(void);
00206 void MSD_lowVoronoi(char *name);
00207
00208 #endif