当前位置: 首页>>代码示例>>C++>>正文


C++ CBvert_list类代码示例

本文整理汇总了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;
}
开发者ID:QuLogic,项目名称:jot-lib,代码行数:28,代码来源:oversketch.cpp

示例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;
}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:8,代码来源:skin.C

示例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);
}
开发者ID:QuLogic,项目名称:jot-lib,代码行数:8,代码来源:oversketch.cpp

示例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;
}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:9,代码来源:proxy_surface.C

示例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;
}
开发者ID:QuLogic,项目名称:jot-lib,代码行数:9,代码来源:paper_doll.cpp

示例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;
}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:9,代码来源:skin.C

示例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;
}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:12,代码来源:skin.C

示例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));
}
开发者ID:QuLogic,项目名称:jot-lib,代码行数:13,代码来源:tess_debug.hpp

示例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;
}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:13,代码来源:bbase.C

示例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);
}
开发者ID:QuLogic,项目名称:jot-lib,代码行数:15,代码来源:lmesh.cpp

示例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);
}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:15,代码来源:lmesh.C

示例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();
}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:7,代码来源:lmesh.C

示例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;
   }
}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:16,代码来源:skin.C

示例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;
 }
开发者ID:QuLogic,项目名称:jot-lib,代码行数:8,代码来源:inflate_vert_data.hpp

示例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();
}
开发者ID:QuLogic,项目名称:jot-lib,代码行数:7,代码来源:lmesh.cpp


注:本文中的CBvert_list类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。