}
}
+// returns a list of triangle indices
static int_list make_best_fan( const triele_list& master_tris,
const int center, const int_list& local_tris )
{
fan_list FGGenFans::greedy_build( triele_list tris ) {
cout << "starting greedy build of fans" << endl;
+ fans.clear();
+
while ( ! tris.empty() ) {
reverse_list by_node;
by_node.clear();
}
++counter;
}
- cout << "master triangle pool = " << tris.size() << endl;
+ cout << "triangle pool = " << tris.size() << endl;
cout << "biggest_group = " << biggest_group.size() << endl;
cout << "center node = " << index << endl;
// make the best fan we can out of this group
int_list best_fan = make_best_fan( tris, index, biggest_group );
+ // generate point form of best_fan
+ int_list node_list;
+ node_list.clear();
+
+ int_list_iterator i_start = best_fan.begin();
+ int_list_iterator i_current = i_start;
+ int_list_iterator i_last = best_fan.end();
+ for ( ; i_current != i_last; ++i_current ) {
+ FGTriEle t = canonify( tris[*i_current], index );
+ if ( i_start == i_current ) {
+ node_list.push_back( t.get_n1() );
+ node_list.push_back( t.get_n2() );
+ }
+ node_list.push_back( t.get_n3() );
+ }
+ cout << "best list size = " << node_list.size() << endl;
+
// add this fan to the fan list
- fans.push_back( best_fan );
+ fans.push_back( node_list );
// delete the triangles in best_fan out of tris and repeat
triele_list_iterator t_current = tris.begin();
counter = 0;
for ( ; t_current != t_last; ++t_current ) {
if ( in_fan(counter, best_fan) ) {
- // cout << "erasing " << counter << " from master tri pool"
- // << endl;
+ cout << "erasing " << counter << " from master tri pool"
+ << endl;
tris.erase( t_current );
}
++counter;
// $Log$
+// Revision 1.2 1999/03/30 23:50:15 curt
+// Fannifier is clearly bugging ... working on debugging it. I suspect there
+// is a problem related to deleting triangles from the triangle pool as they
+// are combined into fans.
+//
// Revision 1.1 1999/03/29 13:08:35 curt
// Initial revision.
//