Level 2 (debug).
This commit is contained in:
parent
96f6da0bb3
commit
4a66ae106b
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.2 2004/12/01 03:24:32 ponchio
|
||||||
|
Level 2.
|
||||||
|
|
||||||
Revision 1.1 2004/12/01 01:15:03 ponchio
|
Revision 1.1 2004/12/01 01:15:03 ponchio
|
||||||
Level 0.
|
Level 0.
|
||||||
|
|
||||||
|
|
@ -198,6 +201,8 @@ void SecondStep(const string &crudefile, const string &output) {
|
||||||
crude.Close();
|
crude.Close();
|
||||||
sorted.Close();
|
sorted.Close();
|
||||||
|
|
||||||
|
/* TODO fix this (after debug!)
|
||||||
|
|
||||||
if(0 != unlink((crudefile + ".crf").c_str())) {
|
if(0 != unlink((crudefile + ".crf").c_str())) {
|
||||||
cerr << "Could not remove " << crudefile << ".crf\n";
|
cerr << "Could not remove " << crudefile << ".crf\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
@ -206,7 +211,7 @@ void SecondStep(const string &crudefile, const string &output) {
|
||||||
cerr << "Could not rename to: " << crudefile + ".crf\n";
|
cerr << "Could not rename to: " << crudefile + ".crf\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
face_remap.Close();
|
face_remap.Close(); */
|
||||||
//TODO remove the file... (after finishing debug!)
|
//TODO remove the file... (after finishing debug!)
|
||||||
// face_remap.Delete();
|
// face_remap.Delete();
|
||||||
}
|
}
|
||||||
|
|
@ -222,6 +227,11 @@ void ThirdStep(const string &crudefile, const string &output,
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VFile<Crude::Face> sorted;
|
||||||
|
if(!sorted.Load(output + ".faces", true)) {
|
||||||
|
cerr << "Could not load sorted faces\n";
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
BlockIndex face_index;
|
BlockIndex face_index;
|
||||||
if(!face_index.Load(output + ".rfi")) {
|
if(!face_index.Load(output + ".rfi")) {
|
||||||
cerr << "Could not load index\n";
|
cerr << "Could not load index\n";
|
||||||
|
|
@ -260,7 +270,9 @@ void ThirdStep(const string &crudefile, const string &output,
|
||||||
int64 &offset = face_index[patch].offset;
|
int64 &offset = face_index[patch].offset;
|
||||||
unsigned int size = face_index[patch].size;
|
unsigned int size = face_index[patch].size;
|
||||||
for(unsigned int i = offset; i < offset + size; i++) {
|
for(unsigned int i = offset; i < offset + size; i++) {
|
||||||
Crude::Face face = crude.GetFace(i);
|
//TODO fix this after debug
|
||||||
|
// Crude::Face face = crude.GetFace(i);
|
||||||
|
Crude::Face face = sorted[i];
|
||||||
if(face[0] == face[1] || face[1] == face[2] || face[0] == face[2])
|
if(face[0] == face[1] || face[1] == face[2] || face[0] == face[2])
|
||||||
continue; //degenerate
|
continue; //degenerate
|
||||||
for(int j = 0; j < 3; j++) {
|
for(int j = 0; j < 3; j++) {
|
||||||
|
|
@ -314,7 +326,7 @@ void ThirdStep(const string &crudefile, const string &output,
|
||||||
for(unsigned int i = 0; i < nexus.index.size(); i++)
|
for(unsigned int i = 0; i < nexus.index.size(); i++)
|
||||||
nexus.sphere.Add(nexus.index[i].sphere);
|
nexus.sphere.Add(nexus.index[i].sphere);
|
||||||
|
|
||||||
/* Nexus::Update update;
|
Nexus::Update update;
|
||||||
for(unsigned int i = 1; i < nexus.index.size(); i++) {
|
for(unsigned int i = 1; i < nexus.index.size(); i++) {
|
||||||
update.created.push_back(i);
|
update.created.push_back(i);
|
||||||
}
|
}
|
||||||
|
|
@ -325,7 +337,7 @@ void ThirdStep(const string &crudefile, const string &output,
|
||||||
for(unsigned int i = 1; i < nexus.index.size(); i++) {
|
for(unsigned int i = 1; i < nexus.index.size(); i++) {
|
||||||
update.erased.push_back(i);
|
update.erased.push_back(i);
|
||||||
}
|
}
|
||||||
nexus.history.push_back(update);*/
|
nexus.history.push_back(update);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue