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 __Memvirtu_h
00043 #define __Memvirtu_h
00044
00045 #ifndef EXTERN
00046 #ifdef _DVS_
00047 #define EXTERN
00048 #else
00049 #define EXTERN extern
00050 #endif
00051 #endif
00052
00053
00054
00055 typedef struct
00056 {
00057 FILE *file;
00058 long size;
00059 int elsize;
00060 char *buffer;
00061 int buf_elsize;
00062 int buf_size;
00063 char *blank_rec;
00064
00065
00066 } VACB;
00067
00068 EXTERN VACB *EulerOpsArray;
00069 EXTERN long ArrayTop[10];
00070 EXTERN long ArrayBottom[10];
00071 EXTERN VACB *VirtualMemoryBlock[10];
00072 EXTERN VACB *SPL01VirtualArray;
00073 EXTERN VACB *SPL02VirtualArray;
00074 EXTERN VACB *SPL03VirtualArray;
00075 EXTERN VACB *SET01VirtualArray;
00076 EXTERN VACB *SET03VirtualArray;
00077 EXTERN VACB *SET04VirtualArray;
00078 EXTERN VACB *SET06VirtualArray;
00079 EXTERN VACB *SET07VirtualArray;
00080 EXTERN VACB *SET08VirtualArray;
00081 EXTERN VACB *SET10VirtualArray;
00082
00083
00084 int init_v_array(char *filename, int rec_size, char filchar);
00085 VACB *open_v_array(char *filename, int buffer_size);
00086 void close_v_array(VACB *v_array);
00087 char *access_v_rec(VACB *v_array, long index);
00088
00089
00090 void MSD_highIniciateMemVirtual(void);
00091 void MSD_highTerminateMemVirtual(void);
00092 void MSD_lowIniciateMemVirtual(int what);
00093 long MSD_getMemVirtual(int what);
00094 void MSD_putMemVirtual(long FreePointer, int what);
00095 void MSD_lowTerminateMemVirtual(int what);
00096
00097
00098
00099
00100 #ifdef __VIRTUAL_MEM
00101 #define EULEROPS(pp) ((EulerOp *)access_v_rec(EulerOpsArray, (pp) * 2 + 2))
00102 #define EulerCount(p) EULEROPS(p)->pp
00103 #define EulerOpNext(pp) pp--
00104 #define EulerOpCode(pp) EULEROPS(pp)->opcode
00105 #define EulerSolidNo(pp) EULEROPS(pp)->solidno
00106 #define EulerIp1(pp) EULEROPS(pp)->ip1
00107 #define EulerIp2(pp) EULEROPS(pp)->ip2
00108 #define EulerIp3(pp) EULEROPS(pp)->ip3
00109 #define EulerIp4(pp) EULEROPS(pp)->ip4
00110 #define EulerIp5(pp) EULEROPS(pp)->ip5
00111 #define EulerIp6(pp) EULEROPS(pp)->ip6
00112 #define EulerIp7(pp) EULEROPS(pp)->ip7
00113 #define EulerIp8(pp) EULEROPS(pp)->ip8
00114 #define EulerFp1(pp) EULEROPS(pp)->fp1
00115 #define EulerFp2(pp) EULEROPS(pp)->fp2
00116 #define EulerFp3(pp) EULEROPS(pp)->fp3
00117 #define EulerFp4(pp) EULEROPS(pp)->fp4
00118 #define EulerCommandCount(pp) EULEROPS(pp)->CommandCount
00119
00120 #define EULEROPSREDO(pp) ((EulerOp *)access_v_rec(EulerOpsArray, (pp) * 2 + 1))
00121 #define EulerCountRedo(p) EULEROPSREDO(p)->pp
00122 #define EulerOpNextRedo(pp) pp--
00123 #define EulerOpCodeRedo(pp) EULEROPSREDO(pp)->opcode
00124 #define EulerSolidNoRedo(pp) EULEROPSREDO(pp)->solidno
00125 #define EulerIp1Redo(pp) EULEROPSREDO(pp)->ip1
00126 #define EulerIp2Redo(pp) EULEROPSREDO(pp)->ip2
00127 #define EulerIp3Redo(pp) EULEROPSREDO(pp)->ip3
00128 #define EulerIp4Redo(pp) EULEROPSREDO(pp)->ip4
00129 #define EulerIp5Redo(pp) EULEROPSREDO(pp)->ip5
00130 #define EulerIp6Redo(pp) EULEROPSREDO(pp)->ip6
00131 #define EulerIp7Redo(pp) EULEROPSREDO(pp)->ip7
00132 #define EulerIp8Redo(pp) EULEROPSREDO(pp)->ip8
00133 #define EulerFp1Redo(pp) EULEROPSREDO(pp)->fp1
00134 #define EulerFp2Redo(pp) EULEROPSREDO(pp)->fp2
00135 #define EulerFp3Redo(pp) EULEROPSREDO(pp)->fp3
00136 #define EulerFp4Redo(pp) EULEROPSREDO(pp)->fp4
00137 #define EulerCommandCountRedo(pp) EULEROPSREDO(pp)->CommandCount
00138 #else
00139 #define EULEROPS(pp) pp
00140 #define EulerCount(p) EULEROPS(p)->pp
00141 #define EulerOpNext(pp) pp = (pp)->opnext
00142 #define EulerOpCode(pp) (pp)->opcode
00143 #define EulerSolidNo(pp) (pp)->solidno
00144 #define EulerIp1(pp) (pp)->ip1
00145 #define EulerIp2(pp) (pp)->ip2
00146 #define EulerIp3(pp) (pp)->ip3
00147 #define EulerIp4(pp) (pp)->ip4
00148 #define EulerIp5(pp) (pp)->ip5
00149 #define EulerIp6(pp) (pp)->ip6
00150 #define EulerIp7(pp) (pp)->ip7
00151 #define EulerIp8(pp) (pp)->ip8
00152 #define EulerFp1(pp) (pp)->fp1
00153 #define EulerFp2(pp) (pp)->fp2
00154 #define EulerFp3(pp) (pp)->fp3
00155 #define EulerFp4(pp) (pp)->fp4
00156 #define EulerCommandCount(pp) (pp)->CommandCount
00157
00158 #define EULEROPSREDO(pp) pp
00159 #define EulerCountRedo(p) EULEROPSREDO(p)->pp
00160 #define EulerOpNextRedo(pp) pp = (pp)->opnext
00161 #define EulerOpCodeRedo(pp) (pp)->opcode
00162 #define EulerSolidNoRedo(pp) (pp)->solidno
00163 #define EulerIp1Redo(pp) (pp)->ip1
00164 #define EulerIp2Redo(pp) (pp)->ip2
00165 #define EulerIp3Redo(pp) (pp)->ip3
00166 #define EulerIp4Redo(pp) (pp)->ip4
00167 #define EulerIp5Redo(pp) (pp)->ip5
00168 #define EulerIp6Redo(pp) (pp)->ip6
00169 #define EulerIp7Redo(pp) (pp)->ip7
00170 #define EulerIp8Redo(pp) (pp)->ip8
00171 #define EulerFp1Redo(pp) (pp)->fp1
00172 #define EulerFp2Redo(pp) (pp)->fp2
00173 #define EulerFp3Redo(pp) (pp)->fp3
00174 #define EulerFp4Redo(pp) (pp)->fp4
00175 #define EulerCommandCountRedo(pp) (pp)->CommandCount
00176 #endif
00177
00178
00179
00180
00181 #ifdef __VIRTUAL_MEM
00182 #define SSTYPE(pp) ((STYPE *)access_v_rec(VirtualMemoryBlock[SOLID], pp))
00183 #define SolSolidNo(p) SSTYPE(p)->solidno
00184 #define SolName(p) SSTYPE(p)->name
00185 #define SolNxt(p) SSTYPE(p)->nxt
00186 #define SolPrevS(p) SSTYPE(p)->prevs
00187 #define SolSShells(p) SSTYPE(p)->sshells
00188 #define SolGroup(p) SSTYPE(p)->group
00189 #define SolOAxs(p) SSTYPE(p)->oaxs
00190 #define SolBox(p) SSTYPE(p)->box
00191 #define SolSBits(p) SSTYPE(p)->sbits
00192 #define SolEuCoef(p) SSTYPE(p)->eucoef
00193 #define SolDsp(p) SSTYPE(p)->dsp
00194 #define SolColor(p) SSTYPE(p)->color
00195 #define SolDensRel(p) SSTYPE(p)->densrel
00196 #define SolDensAbs(p) SSTYPE(p)->densabs
00197 #define SolAreaProj(p) SSTYPE(p)->areaproj
00198 #define SolType(p) SSTYPE(p)->type
00199 #define SolGeometria(p) SSTYPE(p)->geometria
00200 #define SolFronteira(p) SSTYPE(p)->fronteira
00201 #define SolBAreaProj(p) SSTYPE(p)->bareaproj
00202 #define SolParam1(p) SSTYPE(p)->param1
00203 #define SolParam2(p) SSTYPE(p)->param2
00204 #define SolParam3(p) SSTYPE(p)->param3
00205 #define SolParam4(p) SSTYPE(p)->param4
00206 #define SolPrincDir(p) SSTYPE(p)->PrincDir
00207 #define SolCenter(p) SSTYPE(p)->center
00208 #define SolAux(p) SSTYPE(p)->aux
00209 #define SolPos(p) SSTYPE(p)->pos
00210 #define SolPerfil(p) SSTYPE(p)->corte
00211 #define SolSurf(p) SSTYPE(p)->surf
00212 #define SolCurv(p) SSTYPE(p)->curv
00213 #else
00214 #define SolSolidNo(p) ((p)->solidno)
00215 #define SolName(p) ((p)->name)
00216 #define SolNxt(p) ((p)->nxt)
00217 #define SolPrevS(p) ((p)->prevs)
00218 #define SolSShells(p) ((p)->sshells)
00219 #define SolGroup(p) ((p)->group)
00220 #define SolOAxs(p) ((p)->oaxs)
00221 #define SolBox(p) ((p)->box)
00222 #define SolSBits(p) ((p)->sbits)
00223 #define SolEuCoef(p) ((p)->eucoef)
00224 #define SolDsp(p) ((p)->dsp)
00225 #define SolColor(p) ((p)->color)
00226 #define SolDensRel(p) ((p)->densrel)
00227 #define SolDensAbs(p) ((p)->densabs)
00228 #define SolAreaProj(p) ((p)->areaproj)
00229 #define SolType(p) ((p)->type)
00230 #define SolGeometria(p) ((p)->geometria)
00231 #define SolFronteira(p) ((p)->fronteira)
00232 #define SolBAreaProj(p) ((p)->bareaproj)
00233 #define SolParam1(p) ((p)->param1)
00234 #define SolParam2(p) ((p)->param2)
00235 #define SolParam3(p) ((p)->param3)
00236 #define SolParam4(p) ((p)->param4)
00237 #define SolPrincDir(p) ((p)->PrincDir)
00238 #define SolCenter(p) ((p)->center)
00239 #define SolAux(p) ((p)->aux)
00240 #define SolPos(p) ((p)->pos)
00241 #define SolPerfil(p) ((p)->corte)
00242 #define SolSurf(p) ((p)->surf)
00243 #define SolCurv(p) ((p)->scurvs)
00244 #endif
00245
00246 #ifdef __VIRTUAL_MEM
00247 #define DDTYPE(pp) ((DTYPE *)access_v_rec(VirtualMemoryBlock[SHELL], pp))
00248 #define SheShellNo(p) DDTYPE(p)->shellno
00249 #define SheNextD(p) DDTYPE(p)->nextd
00250 #define ShePrevD(p) DDTYPE(p)->prevd
00251 #define SheSSolids(p) DDTYPE(p)->ssolids
00252 #define SheSFaces(p) DDTYPE(p)->sfaces
00253 #define SheSEdges(p) DDTYPE(p)->sedges
00254 #define SheSVerts(p) DDTYPE(p)->sverts
00255 #define SheBox(p) DDTYPE(p)->box
00256 #define SheDBits(p) DDTYPE(p)->dbits
00257 #define SheColor(p) DDTYPE(p)->color
00258 #else
00259 #define SheShellNo(p) ((p)->shellno)
00260 #define SheNextD(p) ((p)->nextd)
00261 #define ShePrevD(p) ((p)->prevd)
00262 #define SheSSolids(p) ((p)->ssolids)
00263 #define SheSFaces(p) ((p)->sfaces)
00264 #define SheSEdges(p) ((p)->sedges)
00265 #define SheSVerts(p) ((p)->sverts)
00266 #define SheBox(p) ((p)->box)
00267 #define SheDBits(p) ((p)->dbits)
00268 #define SheColor(p) ((p)->color)
00269 #define SheSurf(p) ((p)->surf)
00270 #define SheCurv(p) ((p)->curv)
00271 #endif
00272
00273 #ifdef __VIRTUAL_MEM
00274 #define FFTYPE(pp) ((FTYPE *)access_v_rec(VirtualMemoryBlock[FACE], pp))
00275 #define FacFaceNo(p) FFTYPE(p)->faceno
00276 #define FacFShell(p) FFTYPE(p)->fshell
00277 #define FacNextF(p) FFTYPE(p)->nextf
00278 #define FacPrevF(p) FFTYPE(p)->prevf
00279 #define FacFLOut(p) FFTYPE(p)->flout
00280 #define FacFLoops(p) FFTYPE(p)->floops
00281 #define FacFeq(p) FFTYPE(p)->feq
00282 #define FacBox(p) FFTYPE(p)->box
00283 #define FacFBits(p) FFTYPE(p)->fbits
00284 #define FacFVisi(p) FFTYPE(p)->fvisi
00285 #define FacColor(p) FFTYPE(p)->color
00286 #define FacFlag(p) FFTYPE(p)->flag
00287 #define FacSurf(p) FFTYPE(p)->surf
00288 #else
00289 #define FacFaceNo(p) ((p)->faceno)
00290 #define FacFShell(p) ((p)->fshell)
00291 #define FacNextF(p) ((p)->nextf)
00292 #define FacPrevF(p) ((p)->prevf)
00293 #define FacFLOut(p) ((p)->flout)
00294 #define FacFLoops(p) ((p)->floops)
00295 #define FacFeq(p) ((p)->feq)
00296 #define FacBox(p) ((p)->box)
00297 #define FacFBits(p) ((p)->fbits)
00298 #define FacFVisi(p) ((p)->fvisi)
00299 #define FacColor(p) ((p)->color)
00300 #define FacFlag(p) ((p)->flag)
00301 #define FacSurf(p) ((p)->surf)
00302 #endif
00303
00304 #ifdef __VIRTUAL_MEM
00305 #define LLTYPE(pp) ((LTYPE *)access_v_rec(VirtualMemoryBlock[LOOP], pp))
00306 #define LooLoopNo(p) LLTYPE(p)->loopno
00307 #define LooLFace(p) LLTYPE(p)->lface
00308 #define LooNextL(p) LLTYPE(p)->nextl
00309 #define LooPrevL(p) LLTYPE(p)->prevl
00310 #define LooLEdg(p) LLTYPE(p)->ledg
00311 #define LooLength(p) LLTYPE(p)->length
00312 #else
00313 #define LooLoopNo(p) ((p)->loopno)
00314 #define LooLFace(p) ((p)->lface)
00315 #define LooNextL(p) ((p)->nextl)
00316 #define LooPrevL(p) ((p)->prevl)
00317 #define LooLEdg(p) ((p)->ledg)
00318 #define LooLength(p) ((p)->length)
00319 #endif
00320
00321 #ifdef __VIRTUAL_MEM
00322 #define EETYPE(pp) ((ETYPE *)access_v_rec(VirtualMemoryBlock[EDGE], pp))
00323 #define EdgEdgeNo(p) EETYPE(p)->edgeno
00324 #define EdgNextE(p) EETYPE(p)->nexte
00325 #define EdgPrevE(p) EETYPE(p)->preve
00326 #define EdgHe1(p) EETYPE(p)->he1
00327 #define EdgHe2(p) EETYPE(p)->he2
00328 #define EdgAngle(p) EETYPE(p)->angle
00329 #define EdgEVis(p) EETYPE(p)->evis
00330 #define EdgEClp(p) EETYPE(p)->eclp
00331 #define EdgSVClp3(p) EETYPE(p)->svclp3
00332 #define EdgEVClp3(p) EETYPE(p)->evclp3
00333 #define EdgSVClp2(p) EETYPE(p)->svclp2
00334 #define EdgEVClp2(p) EETYPE(p)->evclp2
00335 #define EdgColor(p) EETYPE(p)->color
00336 #define EdgFgRound(p) EETYPE(p)->fg_round
00337 #define EdgFgMake(p) EETYPE(p)->fg_make
00338 #define EdgT1(p) EETYPE(p)->t1
00339 #define EdgT2(p) EETYPE(p)->t2
00340 #define EdgT3(p) EETYPE(p)->t3
00341 #define EdgT4(p) EETYPE(p)->t4
00342 #define EdgD(p) EETYPE(p)->d
00343 #else
00344 #define EdgEdgeNo(p) ((p)->edgeno)
00345 #define EdgNextE(p) ((p)->nexte)
00346 #define EdgPrevE(p) ((p)->preve)
00347 #define EdgHe1(p) ((p)->he1)
00348 #define EdgHe2(p) ((p)->he2)
00349 #define EdgAngle(p) ((p)->angle)
00350 #define EdgEVis(p) ((p)->evis)
00351 #define EdgEClp(p) ((p)->eclp)
00352 #define EdgSVClp3(p) ((p)->svclp3)
00353 #define EdgEVClp3(p) ((p)->evclp3)
00354 #define EdgSVClp2(p) ((p)->svclp2)
00355 #define EdgEVClp2(p) ((p)->evclp2)
00356 #define EdgColor(p) ((p)->color)
00357 #define EdgFgRound(p) ((p)->fg_round)
00358 #define EdgFgMake(p) ((p)->fg_make)
00359 #define EdgT1(p) ((p)->t1)
00360 #define EdgT2(p) ((p)->t2)
00361 #define EdgT3(p) ((p)->t3)
00362 #define EdgT4(p) ((p)->t4)
00363 #define EdgD(p) ((p)->d)
00364 #endif
00365
00366 #ifdef __VIRTUAL_MEM
00367 #define HHTYPE(pp) ((HTYPE *)access_v_rec(VirtualMemoryBlock[HALFEDGE], pp))
00368 #define HalWLoop(p) HHTYPE(p)->wloop
00369 #define HalEdg(p) HHTYPE(p)->edg
00370 #define HalNxt(p) HHTYPE(p)->nxt
00371 #define HalPrv(p) HHTYPE(p)->prv
00372 #define HalVtx(p) HHTYPE(p)->vtx
00373 #define HalNextH(p) HHTYPE(p)->nexth
00374 #define HalCurv(p) HHTYPE(p)->curv
00375 #define HalR(p) HHTYPE(p)->r
00376 #else
00377 #define HalWLoop(p) ((p)->wloop)
00378 #define HalEdg(p) ((p)->edg)
00379 #define HalNxt(p) ((p)->nxt)
00380 #define HalPrv(p) ((p)->prv)
00381 #define HalVtx(p) ((p)->vtx)
00382 #define HalCurv(p) ((p)->curv)
00383 #define HalR(p) ((p)->r)
00384 #endif
00385
00386 #ifdef __VIRTUAL_MEM
00387 #define VVTYPE(pp) ((VTYPE *)access_v_rec(VirtualMemoryBlock[VERTEX], pp))
00388 #define VerVertexNo(p) VVTYPE(p)->vertexno
00389 #define VerVEdge(p) VVTYPE(p)->vedge
00390 #define VerNextV(p) VVTYPE(p)->nextv
00391 #define VerPrevV(p) VVTYPE(p)->prevv
00392 #define VerVCoord(p) VVTYPE(p)->vcoord
00393 #define VerFgRound(p) VVTYPE(p)->fg_round
00394 #define VerFgMake(p) VVTYPE(p)->fg_make
00395 #else
00396 #define VerVertexNo(p) ((p)->vertexno)
00397 #define VerVEdge(p) ((p)->vedge)
00398 #define VerNextV(p) ((p)->nextv)
00399 #define VerPrevV(p) ((p)->prevv)
00400 #define VerVCoord(p) ((p)->vcoord)
00401 #define VerFgRound(p) ((p)->fg_round)
00402 #define VerFgMake(p) ((p)->fg_make)
00403 #endif
00404
00405 #ifdef __VIRTUAL_MEM
00406 #define GGTYPE(pp) ((GTYPE *)access_v_rec(VirtualMemoryBlock[GROUP], pp))
00407 #define GrpGroupNo(p) GGTYPE(p)->groupno
00408 #define GrpName(p) GGTYPE(p)->gname
00409 #define GrpParent(p) GGTYPE(p)->parent
00410 #define GrpGAxs(p) GGTYPE(p)->gaxs
00411 #define GrpNextG(p) GGTYPE(p)->nextg
00412 #define GrpPrevG(p) GGTYPE(p)->prevg
00413 #define GrpGColor(p) GGTYPE(p)->gcolor
00414 #else
00415 #define GrpGroupNo(p) ((p)->groupno)
00416 #define GrpName(p) ((p)->gname)
00417 #define GrpParent(p) ((p)->parent)
00418 #define GrpGAxs(p) ((p)->gaxs)
00419 #define GrpNextG(p) ((p)->nextg)
00420 #define GrpPrevG(p) ((p)->prevg)
00421 #define GrpGColor(p) ((p)->gcolor)
00422 #endif
00423
00424 #ifdef __VIRTUAL_MEM
00425 #define AATYPE(pp) ((ATYPE *)access_v_rec(VirtualMemoryBlock[AXIS], pp))
00426 #define AxsType(p) AATYPE(p)->type
00427 #define AxsName(p) AATYPE(p)->aname
00428 #define AxsAxisNo(p) AATYPE(p)->axisno
00429 #define AxsMode(p) AATYPE(p)->amode
00430 #define AxsVector(p) AATYPE(p)->avector
00431 #define AxsCenter(p) AATYPE(p)->acenter
00432 #define AxsNextA(p) AATYPE(p)->nexta
00433 #define AxsPrevA(p) AATYPE(p)->preva
00434 #define AxsAGroup(p) AATYPE(p)->hierarq
00435 #define AxsASolid(p) AATYPE(p)->hierarq
00436 #else
00437 #define AxsType(p) ((p)->type)
00438 #define AxsName(p) ((p)->aname)
00439 #define AxsAxisNo(p) ((p)->axisno)
00440 #define AxsMode(p) ((p)->amode)
00441 #define AxsVector(p) ((p)->avector)
00442 #define AxsCenter(p) ((p)->acenter)
00443 #define AxsNextA(p) ((p)->nexta)
00444 #define AxsPrevA(p) ((p)->preva)
00445 #define AxsAGroup(p) ((p)->hierarq.agroup)
00446 #define AxsASolid(p) ((p)->hierarq.asolid)
00447 #endif
00448
00449 #ifdef __VIRTUAL_MEM
00450 #define SPLSHELL(pp) ((SF *)access_v_rec(SPL01VirtualArray, pp))
00451 #define SPLSOOV(pp) ((VPTYPE *)access_v_rec(SPL02VirtualArray, (pp) * 4))
00452 #define SPLNBR(pp) ((spl_NBR *)access_v_rec(SPL03VirtualArray, pp))
00453 #define SPLSONE(pp) ((HPTYPE *)access_v_rec(SPL02VirtualArray, (pp) * 4 + 1))
00454 #define SPLENDS(pp) ((HPTYPE *)access_v_rec(SPL02VirtualArray, (pp) * 4 + 2))
00455 #define SPLSONF(pp) ((FPTYPE *)access_v_rec(SPL02VirtualArray, (pp) * 4 + 3))
00456 #define SplShellShell(p) SPLSHELL(p)->shell
00457 #define SplShellSign(p) SPLSHELL(p)->sign
00458 #define SplSoov(p) * (SPLSOOV(p))
00459 #define SplNBRC1(p) SPLNBR(p)->c1
00460 #define SplNBRSector(p) SPLNBR(p)->sector
00461 #define SplSone(p) * (SPLSONE(p))
00462 #define SplEnds(p) * (SPLENDS(p))
00463 #define SplSonf(p) * (SPLSONF(p))
00464 #else
00465 #define SplShellShell(p) spl_shellpos[p].shell
00466 #define SplShellSign(p) spl_shellpos[p].sign
00467 #define SplSoov(p) spl_soov[p]
00468 #define SplNBRC1(p) spl_nbr[p].c1
00469 #define SplNBRSector(p) spl_nbr[p].sector
00470 #define SplSone(p) spl_sone[p]
00471 #define SplEnds(p) spl_ends[p]
00472 #define SplSonf(p) spl_sonf[p]
00473 #endif
00474
00475 #ifdef __VIRTUAL_MEM
00476 #define SETASHELL(pp) ((SFF *)access_v_rec(SET01VirtualArray, (pp) * 2))
00477 #define SETBSHELL(pp) ((SFF *)access_v_rec(SET01VirtualArray, (pp) * 2 + 1))
00478 #define SETSONVV(pp) ((SONVV *)access_v_rec(SET03VirtualArray, pp))
00479 #define SETASONVF(pp) ((SONVF *)access_v_rec(SET04VirtualArray, (pp) * 2))
00480 #define SETBSONVF(pp) ((SONVF *)access_v_rec(SET04VirtualArray, (pp) * 2 + 1))
00481 #define SETNBR(pp) ((NBR *)access_v_rec(SET06VirtualArray, pp))
00482 #define SETSECTORS(pp) ((SECTORS *)access_v_rec(SET07VirtualArray, pp))
00483 #define SETANBR(pp) ((NB *)access_v_rec(SET08VirtualArray, (pp) * 2))
00484 #define SETBNBR(pp) ((NB *)access_v_rec(SET08VirtualArray, (pp) * 2 + 1))
00485 #define SETSONEA(pp) ((EPTYPE *)access_v_rec(SET10VirtualArray, (pp) * 6))
00486 #define SETSONEB(pp) ((EPTYPE *)access_v_rec(SET10VirtualArray, (pp) * 6 + 1))
00487 #define SETSONFA(pp) ((FPTYPE *)access_v_rec(SET10VirtualArray, (pp) * 6 + 2))
00488 #define SETSONFB(pp) ((FPTYPE *)access_v_rec(SET10VirtualArray, (pp) * 6 + 3))
00489 #define SETENDSA(pp) ((HPTYPE *)access_v_rec(SET10VirtualArray, (pp) * 6 + 4))
00490 #define SETENDSB(pp) ((HPTYPE *)access_v_rec(SET10VirtualArray, (pp) * 6 + 5))
00491 #define SetASheShell(p) SETASHELL(p)->shell
00492 #define SetASheSign(p) SETASHELL(p)->sign
00493 #define SetBSheShell(p) SETBSHELL(p)->shell
00494 #define SetBSheSign(p) SETBSHELL(p)->sign
00495 #define SetVVva(p) SETSONVV(p)->va
00496 #define SetVVvb(p) SETSONVV(p)->vb
00497 #define SetAVFv(p) SETASONVF(p)->v
00498 #define SetAVFf(p) SETASONVF(p)->f
00499 #define SetBVFv(p) SETBSONVF(p)->v
00500 #define SetBVFf(p) SETBSONVF(p)->f
00501 #define SetNBRC1(p) SETNBR(p)->c1
00502 #define SetNBRSector(p) SETNBR(p)->sector
00503 #define SetSecA(p) SETSECTORS(p)->secta
00504 #define SetSecB(p) SETSECTORS(p)->sectb
00505 #define SetSecs1a(p) SETSECTORS(p)->s1a
00506 #define SetSecs2a(p) SETSECTORS(p)->s2a
00507 #define SetSecs1b(p) SETSECTORS(p)->s1b
00508 #define SetSecs2b(p) SETSECTORS(p)->s2b
00509 #define SetSecInter(p) SETSECTORS(p)->intersect
00510 #define SetSecOnOn(p) SETSECTORS(p)->onon
00511 #define SetANBHe(p) SETANBR(p)->he
00512 #define SetANB1(p) SETANBR(p)->ref1
00513 #define SetANB2(p) SETANBR(p)->ref2
00514 #define SetANB12(p) SETANBR(p)->ref12
00515 #define SetBNBHe(p) SETBNBR(p)->he
00516 #define SetBNB1(p) SETBNBR(p)->ref1
00517 #define SetBNB2(p) SETBNBR(p)->ref2
00518 #define SetBNB12(p) SETBNBR(p)->ref12
00519 #define SetSonea(p) * (SETSONEA(p))
00520 #define SetSoneb(p) * (SETSONEB(p))
00521 #define SetSonfa(p) * (SETSONFA(p))
00522 #define SetSonfb(p) * (SETSONFB(p))
00523 #define SetEndsa(p) * (SETENDSA(p))
00524 #define SetEndsb(p) * (SETENDSB(p))
00525 #else
00526 #define SetASheShell(p) shellposa[p].shell
00527 #define SetASheSign(p) shellposa[p].sign
00528 #define SetBSheShell(p) shellposb[p].shell
00529 #define SetBSheSign(p) shellposb[p].sign
00530 #define SetVVva(p) sonvv[p].va
00531 #define SetVVvb(p) sonvv[p].vb
00532 #define SetAVFv(p) sonva[p].v
00533 #define SetAVFf(p) sonva[p].f
00534 #define SetBVFv(p) sonvb[p].v
00535 #define SetBVFf(p) sonvb[p].f
00536 #define SetNBRC1(p) nbr[p].c1
00537 #define SetNBRSector(p) nbr[p].sector
00538 #define SetSecA(p) sectors[p].secta
00539 #define SetSecB(p) sectors[p].sectb
00540 #define SetSecs1a(p) sectors[p].s1a
00541 #define SetSecs2a(p) sectors[p].s2a
00542 #define SetSecs1b(p) sectors[p].s1b
00543 #define SetSecs2b(p) sectors[p].s2b
00544 #define SetSecInter(p) sectors[p].intersect
00545 #define SetSecOnOn(p) sectors[p].onon
00546 #define SetANBHe(p) nba[p].he
00547 #define SetANBLig(p) nba[p].lig_he
00548 #define SetANB1(p) nba[p].ref1
00549 #define SetANB2(p) nba[p].ref2
00550 #define SetANB12(p) nba[p].ref12
00551 #define SetBNBHe(p) nbb[p].he
00552 #define SetBNBLig(p) nbb[p].lig_he
00553 #define SetBNB1(p) nbb[p].ref1
00554 #define SetBNB2(p) nbb[p].ref2
00555 #define SetBNB12(p) nbb[p].ref12
00556 #define SetSonea(p) sonea[p]
00557 #define SetSoneb(p) soneb[p]
00558 #define SetSonfa(p) sonfa[p]
00559 #define SetSonfb(p) sonfb[p]
00560 #define SetEndsa(p) endsa[p]
00561 #define SetEndsb(p) endsb[p]
00562 #endif
00563
00564
00565
00566 #ifdef __VIRTUAL_MEM
00567 #define SNIL ((long)-1)
00568 #define DNIL ((long)-1)
00569 #define FNIL ((long)-1)
00570 #define LNIL ((long)-1)
00571 #define ENIL ((long)-1)
00572 #define HNIL ((long)-1)
00573 #define VNIL ((long)-1)
00574 #define NNIL ((long)-1)
00575 #define ANIL ((long)-1)
00576 #define GNIL ((long)-1)
00577 #define EuNIL ((long)-1)
00578 #else
00579 #define SNIL ((STYPE *)NIL)
00580 #define DNIL ((DTYPE *)NIL)
00581 #define FNIL ((FTYPE *)NIL)
00582 #define LNIL ((LTYPE *)NIL)
00583 #define ENIL ((ETYPE *)NIL)
00584 #define HNIL ((HTYPE *)NIL)
00585 #define VNIL ((VTYPE *)NIL)
00586 #define NNIL ((NTYPE *)NIL)
00587 #define ANIL ((ATYPE *)NIL)
00588 #define GNIL ((GTYPE *)NIL)
00589 #define EuNIL ((EulerOp *)NIL)
00590 #define CNIL ((CURVE *)NIL)
00591 #endif
00592
00593 #ifndef __VIRTUAL_MEM
00594 #define SPTYPE STYPE *
00595 #define DPTYPE DTYPE *
00596 #define FPTYPE FTYPE *
00597 #define LPTYPE LTYPE *
00598 #define EPTYPE ETYPE *
00599 #define HPTYPE HTYPE *
00600 #define VPTYPE VTYPE *
00601 #define GPTYPE GTYPE *
00602 #define APTYPE ATYPE *
00603 #define NPTYPE NTYPE *
00604 #define PEulerOp EulerOp *
00605 #else
00606 #define PEulerOp long
00607 #define SPTYPE long
00608 #define DPTYPE long
00609 #define FPTYPE long
00610 #define LPTYPE long
00611 #define EPTYPE long
00612 #define HPTYPE long
00613 #define VPTYPE long
00614 #define GPTYPE long
00615 #define APTYPE long
00616 #define NPTYPE long
00617 #endif
00618
00619 #ifdef __VIRTUAL_MEM
00620 #define MSD_checkVertex(x) assert((x) < ArrayBottom[VERTEX] && (x) > -1)
00621 #define MSD_checkHalfedge(x) assert((x) < ArrayBottom[HALFEDGE] && (x) > -1)
00622 #define MSD_checkEdge(x) assert((x) < ArrayBottom[EDGE] && (x) > -1)
00623 #define MSD_checkLoop(x) assert((x) < ArrayBottom[LOOP] && (x) > -1)
00624 #define MSD_checkFace(x) assert((x) < ArrayBottom[FACE] && (x) > -1)
00625 #define MSD_checkShell(x) assert((x) < ArrayBottom[SHELL] && (x) > -1)
00626 #define MSD_checkSolid(x) assert((x) < ArrayBottom[SOLID] && (x) > -1)
00627 #endif
00628 #endif