void SkinMeme::set_offset(double h) { _h = h; assert(bbase()); bbase()->invalidate(); }
CWpt& SkinMeme::compute_update() { static bool debug = ::debug || Config::get_var_bool("DEBUG_SKIN_UPDATE",false); // compute 3D vertex location WRT track simplex if (_is_sticky) { // this meme is supposed to follow the skeleton surface if (is_tracking()) { // it actually is following it return _update = skin_loc(track_simplex(), _bc, _h); } // supposed to follow, but has no track point: do nothing return _update = loc(); } // this meme is not following the skeleton surface; // it computes its location via smooth subdivision. // but it may still track the closest point on the skeleton // surface to avoid penetrating inside the skeleton surface. if (vert()->parent() == 0) _update = loc(); else _update = vert()->detail_loc_from_parent(); track_to_target(_update); if (_non_penetrate && is_tracking()) { Wvec d = penetration_correction(_update, track_simplex(), _bc, _stay_out); if (debug && !d.is_null()) err_msg("SkinMeme::compute_update: correcting penetration, level %d", bbase()->subdiv_level()); _update += d; } return _update; }
Bpoint* point() const { return (Bpoint*) bbase(); }