Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

vertex.h

Go to the documentation of this file.
00001 00006 /* Copyright (C) 2004 Luiz Velho. */ 00007 00008 #ifndef VERTEX_H 00009 #define VERTEX_H 00010 00011 00012 namespace A48 { 00013 00020 class Vertex : public Markable, public MxHeapable { 00021 friend class Mesh; 00022 friend class Face; 00023 00024 int l_; 00025 Hedge* s_; 00026 00027 public: 00028 00030 Vertex() {l_ = 0; s_ = NULL;}; 00031 00034 int level() { return l_; }; 00035 00038 bool is_bdry() { return s_->edge()->is_bdry(); }; 00039 00044 bool is_inbase() { return (level() == 0); }; 00045 00051 bool is_weld(Face *exclude = NULL) { 00052 int n = 0, k = 0; 00053 for (Hedge *e = star_first(); e != NULL; e = star_next(e), k++) { 00054 Face *f = e->face(); 00055 if (f != NULL && f->weld_vertex() == this && f != exclude) n++; 00056 } 00057 return (n > 0 && k > 2); 00058 } 00059 00062 Hedge* star_first() const { return s_; }; 00063 00067 Hedge* star_next(Hedge* h) const { 00068 if (h->face() == NULL ) return NULL; // other side of boundary 00069 else { Hedge *n = h->next()->mate(); return (n == s_)? NULL : n; } 00070 } 00071 00072 private: 00073 00076 void set_level(int l) { l_ = l; }; 00077 00080 void set_star(Hedge* h) { s_ = h; }; 00081 }; 00082 00083 } 00084 00085 #endif

Generated on Mon Oct 11 19:32:08 2004 for A48 by doxygen 1.3.7