本文整理汇总了C++中LMESHptr::cur_mesh方法的典型用法代码示例。如果您正苦于以下问题:C++ LMESHptr::cur_mesh方法的具体用法?C++ LMESHptr::cur_mesh怎么用?C++ LMESHptr::cur_mesh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LMESHptr
的用法示例。
在下文中一共展示了LMESHptr::cur_mesh方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
int
main(int argc, char *argv[])
{
int num_levels = 1;
if (argc == 2)
num_levels = max(atoi(argv[1]), 0);
else if(argc != 1) {
err_msg("Usage: %s [ num_levels ] < mesh.sm > mesh-sub.sm", argv[0]);
return 1;
}
LMESHptr mesh = LMESH::read_jot_stream(cin);
if (!mesh || mesh->empty())
return 1; // didn't work
mesh->set_subdiv_loc_calc(new LoopLoc());
if (Config::get_var_bool("JOT_PRINT_MESH")) {
cerr << "input mesh:" << endl;
mesh->print();
}
if (num_levels > 0)
mesh->update_subdivision(num_levels);
if (Config::get_var_bool("JOT_PRINT_MESH")) {
cerr << "level " << num_levels << " mesh:" << endl;
mesh->cur_mesh()->print();
}
mesh->cur_mesh()->write_stream(cout);
return 0;
}
示例2: HatchingSimplexDataFixed
/////////////////////////////////////
// get_visibility()
/////////////////////////////////////
void
HatchingGroupFixed::get_visibility(TAGformat &d)
{
err_mesg(ERR_LEV_SPAM, "HatchingGroupFixed::get_visibility()");
BMESHptr m = _patch->mesh();
LMESHptr lm = dynamic_pointer_cast<LMESH>(m);
if (lm)
m = lm->cur_mesh();
vector<int>::size_type k;
int ctr=0;
vector<int> indices;
CBface_list& faces = m->faces();
*d >> indices;
for (k=0; k<indices.size(); k++) {
HatchingSimplexDataFixed *hsdf =
HatchingSimplexDataFixed::find(faces[indices[k]]);
if (!hsdf) {
hsdf = new HatchingSimplexDataFixed(faces[indices[k]]);
ctr++;
}
hsdf->add(this);
}
err_mesg(ERR_LEV_SPAM, "HatchingGroupFixed::get_visibility() - Flagged %d tris and added %d new simplex data.", indices.size(), ctr);
}
示例3:
/////////////////////////////////////
// put_visibility()
/////////////////////////////////////
void
HatchingGroupFixed::put_visibility(TAGformat &d) const
{
err_mesg(ERR_LEV_SPAM, "HatchingGroupFixed::put_visibility()");
BMESHptr m = _patch->mesh();
LMESHptr lm = dynamic_pointer_cast<LMESH>(m);
if (lm)
m = lm->cur_mesh();
Bface_list::size_type k;
vector<int> indices;
CBface_list& faces = m->faces();
for (k=0; k< faces.size(); k++) {
HatchingSimplexDataFixed *hsdf = HatchingSimplexDataFixed::find(faces[k]);
if (hsdf) {
if (hsdf->exists(this))
indices.push_back(faces[k]->index());
}
}
err_mesg(ERR_LEV_SPAM, "HatchingGroupFixed::put_visibility() - Stored %d tri indices.", indices.size());
d.id();
*d << indices;
d.end_id();
}