Files Classes Functions Hierarchy
#include <d3fan.h>
Public Member Functions | |
| d3fan (d3tess &tess_) | |
| void | eval (uintc w_) |
| ostream & | print (ostream &os) const |
Public Attributes | |
| map< simplexface, uint > | stot |
| set< simplexface > | dead |
Definition at line 27 of file d3fan.h.
| d3fan::d3fan | ( | d3tess & | tess_ | ) |
| void d3fan::eval | ( | uintc | w_ | ) |
Definition at line 70 of file d3fan.cpp.
References d3tess::cpsimplexfaceset(), dead, d3tess::debugcheck(), d3minoperator::eval(), simplexface::face, d3tess::minimizer, stot, d3tess::surfaceleft(), d3tess::surfaceright(), d3tess::surfaceviewable(), and virtualtriangle::v.
00071 { 00072 w = w_; 00073 dead.clear(); 00074 stot.clear(); 00075 process.clear(); 00076 00077 tess.debugcheck(); 00078 00079 assert(tess.surfaceviewable(w)); 00080 00081 addspike(); 00082 00083 // k is the current surface face being processed. 00084 simplexface k; 00085 // kt is an index into the central triangle K. 00086 uint kt; 00087 // The points of vs at cp on the boundary. 00088 uint p[2]; 00089 00090 uint sz = process.size(); 00091 for ( ; sz!=0; sz = process.size() ) 00092 { 00093 k = process[ sz-1 ]; 00094 assert(k.face<3); 00095 process.pop_back(); 00096 dead.insert(k); 00097 00098 // The current triangle must have vs's base viewable to w. 00099 tess.cpsimplexfaceset(k); 00100 assert(tess.surfaceviewable(w)); 00101 00102 for (uint i=0; i<2; ++i) 00103 p[i] = vi[cp].pi[ vs.v[i] ]; 00104 00105 kt = stot[k]; 00106 00107 tess.surfaceleft(); 00108 link(kt,vi[kt].piInverse(p[1]),0); 00109 00110 tess.surfaceright(); 00111 tess.surfaceright(); 00112 link(kt,vi[kt].piInverse(p[0]),1); 00113 00114 } 00115 00116 // Iterate over surface connecting the surface with 00117 // the fan. 00118 00119 for (map<simplexface,uint>::iterator i=stot.begin(); 00120 i!=stot.end(); ++i) 00121 { 00122 tess.cpsimplexfaceset(i->first); 00123 vi[ cp ].ni[ vs.v[2] ] = i->second; 00124 } 00125 00126 tess.debugcheck(); 00127 00128 // Apply minimization to each new triangle with 00129 // an already existing triangle on the old surface. 00130 for (map<simplexface,uint>::iterator i=stot.begin(); 00131 i!=stot.end(); ++i) 00132 tess.minimizer->eval( (i->first).id, i->second ); 00133 00134 }
Definition at line 143 of file d3fan.cpp.
References stot.
Referenced by operator<<().
00144 { 00145 os << "w=" << w << endl; 00146 // os << "surf" << endl << " "; 00147 // for( set<simplexface>::const_iterator i = surf.begin(); 00148 // i!=surf.end(); ++i) 00149 // os << *i << ":" << vi[(*i).id] << endl; 00150 // os << endl; 00151 00152 // os << "dead" << endl << " "; 00153 // for( set<simplexface>::const_iterator i = dead.begin(); 00154 // i!=dead.end(); ++i) 00155 // os << *i << " "; 00156 // os << endl; 00157 00158 os << "stot" << endl << " "; 00159 for( map<simplexface,uint>::const_iterator i = stot.begin(); 00160 i!=stot.end(); ++i) 00161 os << i->first << "->" << i->second << ": " << vi[i->second] << endl; 00162 os << endl; 00163 00164 os << "process" << endl << " "; 00165 for ( uint i=0; i<process.size(); ++i) 00166 os << process[i] << " "; 00167 os << endl; 00168 00169 return os; 00170 }
| set< simplexface > d3fan::dead |
| map<simplexface,uint> d3fan::stot |
1.5.8