inline bool is_border(Bsimplex* s) { if (is_face(s)) return false; if (is_edge(s)) return ((Bedge*)s)->is_border(); if (is_vert(s)) return ((Bvert*)s)->is_border(); return false; }
inline Wvec bc2norm(Bsimplex* s, CWvec& bc) { Wvec ret; if (is_face(s)) { ((Bface*)s)->bc2norm_blend(bc, ret); } else if (is_edge(s)) { ret = ((Bedge*)s)->norm(); } else if (is_vert(s)) { ret = ((Bvert*)s)->norm(); } return ret; }
void SubdivUpdater::update_vert(Lvert* v) { // Update the given vertex if needed. // If it has a boss meme, skip it (already updated). if (!v || Bbase::has_boss(v)) return; // Find its subdivision parent Bsimplex* p = v->parent(); if (!p) return; // Have the parent compute the subdiv loc of our vert: if (is_edge(p)) ((Ledge*)p)->update_subdivision(); else if (is_vert(p)) ((Lvert*)p)->update_subdivision(); }
//******** SOLE JOB ******** virtual bool accept(CBsimplex* s) const { return is_vert(s); }