Text archives Help
- From: hansong@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r683 - branches/itanium2/Model/Groups
- Date: Mon, 31 Oct 2005 16:51:35 -0700 (MST)
Author: hansong
Date: Mon Oct 31 16:51:35 2005
New Revision: 683
Modified:
branches/itanium2/Model/Groups/KDTreeLoader.cc
Log:
load .igg file as a means of removing incorrect parts from the model
(optional)
Modified: branches/itanium2/Model/Groups/KDTreeLoader.cc
==============================================================================
--- branches/itanium2/Model/Groups/KDTreeLoader.cc (original)
+++ branches/itanium2/Model/Groups/KDTreeLoader.cc Mon Oct 31 16:51:35
2005
@@ -510,6 +510,27 @@
}
}
+ // read the "ignore geometry" file (.igg)
+ strcpy(filename, fn);
+ strcat(filename, ".igg");
+ if ((f = fopen(filename, "rb")) != NULL) {
+ // there is a igg file, read it
+ while (! feof(f)) {
+ char buf[128];
+ long long iggbegin, iggend;
+ fgets(buf, 128, f);
+ int n = sscanf(buf, "%lld%lld", &iggbegin, &iggend);
+ if (n!=2) {
+ fprintf(stderr, "error processing file %s\n",
filename);
+ break;
+ }
+ for (long long i=iggbegin; i<=iggend; i++)
+ memset(&kdtree->tris->get(i), 0,
sizeof(Triangle));
+ }
+ fclose(f);
+ }
+
+
// can do picking by default
kdtree->__setPicking(true);
@@ -563,6 +584,10 @@
offset++;
}
fprintf(stderr, "Total %d groups\n",
kdtree->groupToNameMap->getLen());
+
+ kdtree->triFlags = new VArray<unsigned char>(nTris);
+ kdtree->triFlags->setLen(nTris);
+ kdtree->triFlags->clear();
return 1;
}
- [MANTA] r683 - branches/itanium2/Model/Groups, hansong, 10/31/2005
Archive powered by MHonArc 2.6.16.