本文整理汇总了C++中CBvert_list类的典型用法代码示例。如果您正苦于以下问题:C++ CBvert_list类的具体用法?C++ CBvert_list怎么用?C++ CBvert_list使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CBvert_list类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: chain_path
bool
OVERSKETCH::match_substrip(CPIXEL_list& pts, CBvert_list& chain, EdgeStrip& strip)
{
err_adv(debug, "OVERSKETCH::match_substrip:");
if (!chain.forms_chain()) {
err_adv(debug, " non-chain");
return false;
}
const double MAX_DIST = 8;
PIXEL_list chain_path(chain.wpts());
int k0 = get_near_index(chain_path, pts.front(), MAX_DIST);
int k1 = get_near_index(chain_path, pts.back(), MAX_DIST);
if (!(0 <= k0 && k0 < (int)chain.size() && 0 <= k1 && k1 < (int)chain.size())) {
err_adv(debug, " bad k0/k1: %d/%d", k0, k1);
return false;
} if (k0 == k1) {
err_adv(debug, " bad k0/k1: %d == %d", k0, k1);
return false;
}
make_strip(chain, k0, k1, strip);
return true;
}
示例2: get_offset_scales
inline ARRAY<double>
get_offset_scales(CBvert_list& skels, CSimplexFilter& filter)
{
ARRAY<double> ret(skels.num());
for (int i=0; i<skels.num(); i++)
ret += offset_scale(skels[i], filter);
return ret;
}
示例3: show_yardstick
inline void
show_yardstick(CBvert_list& verts, double yardstick)
{
vector<Wline> lines(verts.size());
for (Bvert_list::size_type i=0; i<verts.size(); i++)
lines[i] = Wline(verts[i]->loc(), verts[i]->norm()*yardstick);
GL_VIEW::draw_lines(lines, Color::yellow, 0.8, 1, false);
}
示例4: get_pixels
inline PIXEL_list
get_pixels(CBvert_list& verts, ProxySurface* p)
{
PIXEL_list ret(verts.num());
for (int i=0; i<verts.num(); i++) {
ret += PixelsData::get_pix(verts[i], p);
}
return ret;
}
示例5: copy_verts
inline Bvert_list
copy_verts(CBvert_list& verts, LMESHptr mesh)
{
Bvert_list ret(verts.size());
for (Bvert_list::size_type i=0; i<verts.size(); i++) {
ret.push_back(mesh->add_vertex(verts[i]->loc()));
}
return ret;
}
示例6: centroids
inline Wpt_list
centroids(CBvert_list& verts)
{
Wpt_list ret(verts.num());
for (int i=0; i<verts.num(); i++) {
ret += verts[i]->qr_centroid();
}
return ret;
}
示例7: ret
Bvert_list
Skin::sticky_verts(CBvert_list& verts) const
{
Bvert_list ret(verts.num());
for (int i=0; i<verts.num(); i++) {
SkinMeme* m = SkinMeme::upcast(find_meme(verts[i]));
if (m && m->is_sticky()) {
ret += m->vert();
}
}
return ret;
}
示例8: show_verts
inline void
show_verts(CBvert_list& verts, int size, CCOLOR& c0, CCOLOR& c1)
{
if (verts.empty())
return;
if (verts.size() == 1)
show_vert(verts[0], size, c0);
// ramp the colors
double di = 1.0/(verts.size()-1);
for (Bvert_list::size_type i=0; i<verts.size(); i++)
show_vert(verts[i], size, interp(c0, c1, i*di));
}
示例9: ret
VertMemeList
Bbase::find_boss_vmemes(CBvert_list& verts)
{
// Convenience: lookup boss memes for a whole list of vertices
VertMemeList ret(verts.num());
for (int i=0; i<verts.num(); i++) {
VertMeme* vm = find_boss_vmeme(verts[i]);
if (vm)
ret += vm;
}
return ret;
}
示例10: get_parents
inline void
get_parents(CBvert_list& verts, Bvert_list& vp, Bedge_list& ep)
{
// Helper method used below in get_parents();
// from the given list of vertices, return the parent
// simplices in two lists: one of Lverts, one of Ledges.
if (verts.empty())
return;
assert(dynamic_pointer_cast<LMESH>(verts.mesh()));
for (Bvert_list::size_type i=0; i<verts.size(); i++)
add_p((Lvert*)verts[i], vp, ep);
}
示例11: get_parents
inline void
get_parents(CBvert_list& verts, Bvert_list& vp, Bedge_list& ep)
{
// Helper method used below in get_parents();
// from the given list of vertices, return the parent
// simplices in two lists: one of Lverts, one of Ledges.
if (verts.empty())
return;
assert(LMESH::isa(verts.mesh()));
for (int i=0; i<verts.num(); i++)
add_p((Lvert*)verts[i], vp, ep);
}
示例12: update_verts
inline void
update_verts(CBvert_list& verts)
{
// helper for LMESH::update_subdivision(CBface_list& faces)
for (int i=0; i<verts.num(); i++)
((Lvert*)verts[i])->update_subdivision();
}
示例13: join
inline bool
join(CBvert_list& o, CBvert_list& c, MULTI_CMDptr& cmd, Cstr_ptr& msg)
{
// Used in Skin::join_to_skel() to join seams of a mesh together.
JOIN_SEAM_CMDptr join = new JOIN_SEAM_CMD(o, c);
if (join->doit()) {
err_adv(debug, " joined %s (%d verts to %d verts)",
**msg, o.num(), c.num());
cmd->add(join);
return true;
} else {
err_adv(debug, " error: can't join %s", **msg);
return false;
}
}
示例14: gen_twins
// Do a whole list of vertices at a shot:
static bool gen_twins(CBvert_list& verts, double h,
CSimplexFilter& filter) {
bool ret = true;
for (int i=0; i<verts.num(); i++)
ret = gen_twins(verts[i], h, filter) && ret;
return ret;
}
示例15: update_verts
inline void
update_verts(CBvert_list& verts)
{
// helper for LMESH::update_subdivision(CBface_list& faces)
for (Bvert_list::size_type i=0; i<verts.size(); i++)
((Lvert*)verts[i])->update_subdivision();
}