⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isob.c

📁 一个开源的火灾动力模拟的系统
💻 C
📖 第 1 页 / 共 5 页
字号:
void FreeBlockInfo(bbyte *pbToFree){  blockinfo *pbi, *pbiPrev;  pbiPrev = NULL;  for (pbi = pbiHead; pbi != NULL; pbi = pbi->pbiNext){    if(fPtrEqual(pbi->pb, pbToFree)){      if(pbiPrev == NULL){        pbiHead = pbi->pbiNext;      }      else{        pbiPrev->pbiNext = pbi->pbiNext;      }      break;    }    pbiPrev = pbi;  }  ASSERT(pbi != NULL);  if(sizeofDebugByte!=0)ASSERT((char)*(pbi->pb+pbi->size)==(char)debugByte);  free(pbi);}/* ------------------ UpdateBlockInfo ------------------------ */void UpdateBlockInfo(bbyte *pbOld, bbyte *pbNew, size_t sizeNew){  blockinfo *pbi;  ASSERT(pbNew != NULL && sizeNew != 0);  pbi = GetBlockInfo(pbOld);  ASSERT(pbOld == pbi->pb);  pbi->pb = pbNew;  pbi->size = sizeNew;}/* ------------------ sizeofBlock ------------------------ */size_t sizeofBlock(bbyte *pb){  blockinfo *pbi;  pbi = GetBlockInfo(pb);  ASSERT(pb==pbi->pb);  if(sizeofDebugByte!=0)ASSERT((char)*(pbi->pb+pbi->size)==(char)debugByte);  return(pbi->size);}/* ------------------ ValidPointer ------------------------ */mallocflag ValidPointer(void *pv, size_t size){  blockinfo *pbi;  bbyte *pb = (bbyte *)pv;  ASSERT(pv != NULL && size != 0);  pbi = GetBlockInfo(pb);  ASSERT(pb==pbi->pb);  ASSERT(fPtrLessEq(pb+size,pbi->pb + pbi->size));  if(sizeofDebugByte!=0)ASSERT((char)*(pbi->pb+pbi->size)==(char)debugByte);  return(1);}/* ------------------ strcpy ------------------------ */char *_strcpy(char *s1, const char *s2){  blockinfo *pbi;  int offset;  CheckMemory;  pbi = GetBlockInfo_nofail(s1);  if(pbi!=NULL){    offset = s1 - pbi->pb;    ASSERT(pbi->size - offset >= strlen(s2)+1);  }  return strcpy(s1,s2);}/* ------------------ strcat ------------------------ */char *_strcat(char *s1, const char *s2){  blockinfo *pbi;  int offset;  CheckMemory;  pbi = GetBlockInfo_nofail(s1);  if(pbi!=NULL){    offset = s1 - pbi->pb;    ASSERT(pbi->size - offset >= strlen(s1)+strlen(s2)+1);  }  return strcat(s1,s2);}#endif/*lint -e534 *//*lint -e553 *//*lint -e537 *//*lint -e732 loss of sign *//*lint -e774 boolean within if always evaluates to True *//*lint -e785 *//*lint -e736 *//*lint -e818 *//*lint -e747 *//*lint -e524 *//*lint -e834 *//*lint -e725 *//*lint -e539 *//*lint -e525 *//*lint -e19 Expecting ; *//*lint -e10 Useless declaration */#include <stdlib.h>#ifdef pp_DRAWISO#include <GL/glut.h>#endif#include <math.h>#include <stdio.h>#define IN_ISOBOXunsigned short *vertices=NULL;int *rank=NULL,*sortedlist=NULL,*closestnodes=NULL;int edge2vertex[12][2]={  {0,1},{1,2},{2,3},{0,3},  {0,4},{1,5},{2,6},{3,7},  {4,5},{5,6},{6,7},{4,7}};int compcase[]={0,0,0,-1,0,0,-1,-1,0,0,0,0,-1,-1,0};int edgelist[15][13]={  { 0                             },  { 3,0,4, 3                      },  { 4,0,4, 7, 2                   },  { 6,0,4, 3, 7,11,10             },  { 6,0,4, 3, 6,10, 9             },  { 5,0,3, 7, 6, 5                },  { 7,0,4, 7, 2, 6,10,9           },  { 9,4,8,11, 2, 3, 7,6,10,9      },  { 4,4,7, 6, 5                   },  { 6,2,6, 9, 8, 4, 3             },  { 8,0,8,11, 3,10, 9,1, 2        },  { 6,4,3, 2,10, 9, 5             },  { 8,4,8,11, 0, 3, 7,6, 5        },  {12,0,4, 3, 7,11,10,2, 6,1,8,5,9},  { 6,3,7, 6, 9, 8, 0             }};int edgelist2[15][16]={  { 0                             },  { 0},  { 0},  { 8,3,0,10,7,0,4,11,10},  { 0},  { 0},  { 11, 7,10,9,4,0,4,9,0,9,6,2},  { 9,7,10,11,3,4,8,9,6,2},  { 0},  { 0},  { 8,0,8,9,1,3,2,10,11},  { 0},  { 8,0,3,4,8,11,7,6,5},  { 12,4,11,8,0,5,1,7,3,2,9,10,6},  { 0}};int pathcclist[15][13]={  { 0},  { 3,0,1,2},  { 6,0,1,2,2,3,0},  { 6,0,1,2,3,4,5},  { 6,0,1,2,3,4,5},  { 9,0,1,2,2,3,4,0,2,4},  { 9,0,1,2,2,3,0,4,5,6},  { 9,0,1,2,3,4,5,6,7,8},  { 6,0,1,2,2,3,0},  {12,0,1,5,1,4,5,1,2,4,2,3,4},  {12,0,1,2,0,2,3,4,5,6,4,6,7},  {12,0,1,5,1,4,5,1,2,4,2,3,4},  {12,0,1,2,3,4,5,3,5,6,3,6,7},  {12,0,1,2,3,4,5,6,7,8,9,10,11},  {12,0,1,5,1,4,5,1,2,4,2,3,4}};int pathcclist2[15][19]={  { 0},  { 0},  { 0},  { 12,0,1,2,0,2,3,4,5,6,4,6,7},  { 0},  { 0},  { 15,0,1,2,0,2,3,4,5,6,7,8,9,7,9,10},  { 15,0,1,2,3,4,5,3,5,7,3,7,8,5,6,7},  { 0},  { 0},  { 12,0,1,2,0,2,3,4,5,6,4,6,7},  { 0},  { 12,0,1,2,3,4,6,3,6,7,4,5,6},  { 12,0,1,2,3,4,5,6,7,8,9,10,11},  { 0}};int pathccwlist[15][13]={  { 0},  { 3,0,2,1},  { 6,0,2,1,0,3,2},  { 6,0,2,1,3,5,4},  { 6,0,2,1,3,5,4},  { 9,0,2,1,2,4,3,0,4,2},  { 9,0,2,1,0,3,2,4,6,5},  { 9,0,2,1,3,5,4,6,8,7},  { 6,0,2,1,0,3,2},  {12,0,5,1,1,5,4,1,4,2,2,4,3},  {12,0,2,1,0,3,2,4,6,5,4,7,6},  {12,0,5,1,1,5,4,1,4,2,2,4,3},  {12,0,2,1,3,5,4,3,6,5,3,7,6},  {12,0,2,1,3,5,4,6,8,7,9,11,10},  {12,0,5,1,1,5,4,1,4,2,2,4,3}};int pathccwlist2[15][19]={  { 0},  { 0},  { 0},  { 12,0,2,1,0,3,2,4,6,5,4,7,6},  { 0},  { 0},  { 15,0,2,1,0,3,2,4,6,5,7,9,8,7,10,9},  { 15,0,2,1,3,5,4,3,7,5,3,8,7,5,7,6},  { 0},  { 0},  { 12,0,2,1,0,3,2,4,6,5,4,7,6},  { 0},  { 12,0,2,1,3,6,4,3,7,6,4,6,5},  { 12,0,2,1,3,5,4,6,8,7,9,11,10},  { 0}};int cases[256][10]={{0,0,0,0,0,0,0,0, 0,  0},{0,1,2,3,4,5,6,7, 1,  1},{1,2,3,0,5,6,7,4, 1,  2},{1,2,3,0,5,6,7,4, 2,  3},{2,3,0,1,6,7,4,5, 1,  4},{0,4,5,1,3,7,6,2, 3,  5},{2,3,0,1,6,7,4,5, 2,  6},{3,0,1,2,7,4,5,6, 5,  7},{3,0,1,2,7,4,5,6, 1,  8},{0,1,2,3,4,5,6,7, 2,  9},{3,7,4,0,2,6,5,1, 3, 10},{2,3,0,1,6,7,4,5, 5, 11},{3,0,1,2,7,4,5,6, 2, 12},{1,2,3,0,5,6,7,4, 5, 13},{0,1,2,3,4,5,6,7, 5, 14},{0,1,2,3,4,5,6,7, 8, 15},{4,0,3,7,5,1,2,6, 1, 16},{4,5,1,0,7,6,2,3, 2, 17},{1,2,3,0,5,6,7,4, 3, 18},{5,1,0,4,6,2,3,7, 5, 19},{2,3,0,1,6,7,4,5, 4, 20},{4,5,1,0,7,6,2,3, 6, 21},{2,3,0,1,6,7,4,5, 6, 22},{3,0,1,2,7,4,5,6,14, 23},{4,5,1,0,7,6,2,3, 3, 24},{7,4,0,3,6,5,1,2, 5, 25},{2,6,7,3,1,5,4,0, 7, 26},{3,0,1,2,7,4,5,6, 9, 27},{2,6,7,3,1,5,4,0, 6, 28},{4,0,3,7,5,1,2,6,11, 29},{0,1,2,3,4,5,6,7,12, 30},{0,0,0,0,0,0,0,0, 0,  0},{5,4,7,6,1,0,3,2, 1, 32},{0,3,7,4,1,2,6,5, 3, 33},{1,0,4,5,2,3,7,6, 2, 34},{4,5,1,0,7,6,2,3, 5, 35},{2,3,0,1,6,7,4,5, 3, 36},{3,7,4,0,2,6,5,1, 7, 37},{6,2,1,5,7,3,0,4, 5, 38},{0,1,2,3,4,5,6,7, 9, 39},{3,0,1,2,7,4,5,6, 4, 40},{3,7,4,0,2,6,5,1, 6, 41},{5,6,2,1,4,7,3,0, 6, 42},{3,0,1,2,7,4,5,6,11, 43},{3,0,1,2,7,4,5,6, 6, 44},{1,2,3,0,5,6,7,4,12, 45},{0,1,2,3,4,5,6,7,14, 46},{0,0,0,0,0,0,0,0, 0,  0},{5,1,0,4,6,2,3,7, 2, 48},{1,0,4,5,2,3,7,6, 5, 49},{0,4,5,1,3,7,6,2, 5, 50},{4,5,1,0,7,6,2,3, 8, 51},{4,7,6,5,0,3,2,1, 6, 52},{1,0,4,5,2,3,7,6,12, 53},{4,5,1,0,7,6,2,3,11, 54},{0,0,0,0,0,0,0,0, 0,  0},{5,1,0,4,6,2,3,7, 6, 56},{1,0,4,5,2,3,7,6,14, 57},{0,4,5,1,3,7,6,2,12, 58},{0,0,0,0,0,0,0,0, 0,  0},{4,0,3,7,5,1,2,6,10, 60},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{6,7,3,2,5,4,0,1, 1, 64},{0,1,2,3,4,5,6,7, 4, 65},{1,0,4,5,2,3,7,6, 3, 66},{0,4,5,1,3,7,6,2, 6, 67},{2,1,5,6,3,0,4,7, 2, 68},{6,7,3,2,5,4,0,1, 6, 69},{5,6,2,1,4,7,3,0, 5, 70},{0,1,2,3,4,5,6,7,11, 71},{3,0,1,2,7,4,5,6, 3, 72},{0,1,2,3,4,5,6,7, 6, 73},{7,4,0,3,6,5,1,2, 7, 74},{2,3,0,1,6,7,4,5,12, 75},{7,3,2,6,4,0,1,5, 5, 76},{1,2,3,0,5,6,7,4,14, 77},{1,2,3,0,5,6,7,4, 9, 78},{0,0,0,0,0,0,0,0, 0,  0},{4,0,3,7,5,1,2,6, 3, 80},{0,3,7,4,1,2,6,5, 6, 81},{2,3,0,1,6,7,4,5, 7, 82},{5,1,0,4,6,2,3,7,12, 83},{2,1,5,6,3,0,4,7, 6, 84},{0,1,2,3,4,5,6,7,10, 85},{5,6,2,1,4,7,3,0,12, 86},{0,0,0,0,0,0,0,0, 0,  0},{0,1,2,3,4,5,6,7, 7, 88},{7,4,0,3,6,5,1,2,12, 89},{3,0,1,2,7,4,5,6,13, 90},{0,0,0,0,0,0,0,0, 0,  0},{7,3,2,6,4,0,1,5,12, 92},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{5,4,7,6,1,0,3,2, 2, 96},{6,2,1,5,7,3,0,4, 6, 97},{2,1,5,6,3,0,4,7, 5, 98},{2,1,5,6,3,0,4,7,14, 99},{1,5,6,2,0,4,7,3, 5,100},{1,5,6,2,0,4,7,3,12,101},{1,5,6,2,0,4,7,3, 8,102},{0,0,0,0,0,0,0,0, 0,  0},{5,4,7,6,1,0,3,2, 6,104},{0,4,5,1,3,7,6,2,10,105},{2,1,5,6,3,0,4,7,12,106},{0,0,0,0,0,0,0,0, 0,  0},{5,6,2,1,4,7,3,0,11,108},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{7,6,5,4,3,2,1,0, 5,112},{0,4,5,1,3,7,6,2,11,113},{6,5,4,7,2,1,0,3, 9,114},{0,0,0,0,0,0,0,0, 0,  0},{1,5,6,2,0,4,7,3,14,116},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{7,6,5,4,3,2,1,0,12,120},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{7,6,5,4,3,2,1,0, 1,128},{0,1,2,3,4,5,6,7, 3,129},{1,2,3,0,5,6,7,4, 4,130},{1,2,3,0,5,6,7,4, 6,131},{7,4,0,3,6,5,1,2, 3,132},{1,5,6,2,0,4,7,3, 7,133},{1,5,6,2,0,4,7,3, 6,134},{3,0,1,2,7,4,5,6,12,135},{3,2,6,7,0,1,5,4, 2,136},{4,0,3,7,5,1,2,6, 5,137},{7,4,0,3,6,5,1,2, 6,138},{2,3,0,1,6,7,4,5,14,139},{6,7,3,2,5,4,0,1, 5,140},{2,3,0,1,6,7,4,5, 9,141},{1,2,3,0,5,6,7,4,11,142},{0,0,0,0,0,0,0,0, 0,  0},{4,0,3,7,5,1,2,6, 2,144},{3,7,4,0,2,6,5,1, 5,145},{7,6,5,4,3,2,1,0, 6,146},{1,0,4,5,2,3,7,6,11,147},{4,0,3,7,5,1,2,6, 6,148},{3,7,4,0,2,6,5,1,12,149},{1,0,4,5,2,3,7,6,10,150},{0,0,0,0,0,0,0,0, 0,  0},{0,3,7,4,1,2,6,5, 5,152},{4,0,3,7,5,1,2,6, 8,153},{0,3,7,4,1,2,6,5,12,154},{0,0,0,0,0,0,0,0, 0,  0},{0,3,7,4,1,2,6,5,14,156},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{5,1,0,4,6,2,3,7, 3,160},{1,2,3,0,5,6,7,4, 7,161},{1,0,4,5,2,3,7,6, 6,162},{4,5,1,0,7,6,2,3,12,163},{3,0,1,2,7,4,5,6, 7,164},{0,1,2,3,4,5,6,7,13,165},{6,2,1,5,7,3,0,4,12,166},{0,0,0,0,0,0,0,0, 0,  0},{3,2,6,7,0,1,5,4, 6,168},{4,0,3,7,5,1,2,6,12,169},{1,2,3,0,5,6,7,4,10,170},{0,0,0,0,0,0,0,0, 0,  0},{6,7,3,2,5,4,0,1,12,172},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{6,5,4,7,2,1,0,3, 5,176},{0,4,5,1,3,7,6,2, 9,177},{0,4,5,1,3,7,6,2,14,178},{0,0,0,0,0,0,0,0, 0,  0},{6,5,4,7,2,1,0,3,12,180},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{5,4,7,6,1,0,3,2,11,184},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{7,3,2,6,4,0,1,5, 2,192},{6,5,4,7,2,1,0,3, 6,193},{7,3,2,6,4,0,1,5, 6,194},{0,3,7,4,1,2,6,5,10,195},{3,2,6,7,0,1,5,4, 5,196},{3,2,6,7,0,1,5,4,12,197},{3,2,6,7,0,1,5,4,14,198},{0,0,0,0,0,0,0,0, 0,  0},{2,6,7,3,1,5,4,0, 5,200},{0,3,7,4,1,2,6,5,11,201},{2,6,7,3,1,5,4,0,12,202},{0,0,0,0,0,0,0,0, 0,  0},{3,2,6,7,0,1,5,4, 8,204},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{5,4,7,6,1,0,3,2, 5,208},{3,7,4,0,2,6,5,1,14,209},{5,4,7,6,1,0,3,2,12,210},{0,0,0,0,0,0,0,0, 0,  0},{4,7,6,5,0,3,2,1,11,212},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{6,7,3,2,5,4,0,1, 9,216},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{4,7,6,5,0,3,2,1, 5,224},{4,7,6,5,0,3,2,1,12,225},{1,5,6,2,0,4,7,3,11,226},{0,0,0,0,0,0,0,0, 0,  0},{7,6,5,4,3,2,1,0, 9,228},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{2,6,7,3,1,5,4,0,14,232},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{5,4,7,6,1,0,3,2, 8,240},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0},{0,0,0,0,0,0,0,0, 0,  0}};/* ------------------ GetIsobox ------------------------ */void GetIsobox(float *x, float *y, float *z, float *vals, float *tvals, int *nodeindexes, float level,               float *xvert, float *yvert, float *zvert, float *tvert, int *closestnodes, int *nvert,               int *triangles, int *ntriangles){       /*       INPUT       -----       x - x[0] = min x value           x[1] = max x value       y - y[0] = min y value           y[1] = max y value       z - z[0] = min z value           z[1] = max z value      vals - values at box formed by x,y,z      tvals- values at box formed by x,y,z      level - desired iso-surface level       OUTPUT       -----       xvert, yvert, zvert - array of x,y,z coordinates that have iso-surface value        nvert - number of vertices       triangles - set of 3 integer indices for each triangle pointing into xvert, yvert, zvert arrays       ntriangles - number of indices in triangles       */  float vmin, vmax;  float xxval[8],yyval[8],zzval[8];  int bigger, casenum, type, sign;  int ixmin[4]={0,1,4,5}, ixmax[4]={2,3,6,7};  int iymin[4]={0,3,4,7}, iymax[4]={1,2,5,6};  int izmin[4]={0,1,2,3}, izmax[4]={4,5,6,7};  int n;  int edge,*edges=NULL, nedges, *path=NULL, *case2=NULL, npath;  int v1, v2;  float val1, val2, denom, factor;  float xx, yy, zz;  int outofbounds;  int prods[]={1,2,4,8,16,32,64,128};  int thistype;/* determine min and max solution values */  vmin = vals[0]; vmax = vals[0];  for(n=0;n<12;n++){closestnodes[n]=0;}  for(n=1;n<8;n++){    if(vals[n]<vmin){vmin=vals[n];}    if(vals[n]>vmax){vmax=vals[n];}  }/* if the iso-surface level is not bounded by the vals data then there is nothing to do */  *nvert = 0;  *ntriangles = 0;  if(vmin>level||vmax<level)return;/* determine which of 256 cases this is */  casenum = 0; bigger = 0;  sign = 1;  for(n=0;n<8;n++){    if(vals[n]>level){      bigger++;       casenum |= prods[n];    }  }/* there are more nodes greater than the iso-surface level than below, so    solve the complementary problem */  if(bigger>4){    sign=-1; casenum=0;    for(n=0;n<8;n++){      if(vals[n]<level)casenum |= prods[n];    }  }/* stuff min and max grid data into a more convenient form   assuming the following grid numbering scheme       5-------6     / |      /|    /   |     / |   4 -------7   |  |    |   |   |    Z    1---|---2  |  Y     |  /  |/       |/  0--X-----3       */  for(n=0;n<4;n++){    xxval[ixmin[n]] = x[0];    xxval[ixmax[n]] = x[1];    yyval[iymin[n]] = y[0];    yyval[iymax[n]] = y[1];    zzval[izmin[n]] = z[0];    zzval[izmax[n]] = z[1];  }  if(casenum<=0||casenum>=255)return; /* no iso-surface */  case2 = &(cases[casenum][0]);  type = case2[8];  if(type==0)return;  if(compcase[type]==-1){thistype=sign;}  else{thistype=1;}   if(thistype!=-1){    edges = &(edgelist[type][1]);    if(sign>0)path = &(pathcclist[type][1]);   /* construct triangles clock wise */     else{path = &(pathccwlist[type][1]);}     /* construct triangles counter clockwise */  }  else{    edges = &(edgelist2[type][1]);    if(sign>0)path = &(pathcclist2[type][1]);   /* construct triangles clock wise */     else{path = &(pathccwlist2[type][1]);}     /* construct triangles counter clockwise */  }  npath = path[-1];  nedges = edges[-1];/* calculate where iso-surface level crosses each edge */  outofbounds=0;  for(n=0;n<nedges;n++){

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -