本文整理汇总了C++中TupleList::get_int方法的典型用法代码示例。如果您正苦于以下问题:C++ TupleList::get_int方法的具体用法?C++ TupleList::get_int怎么用?C++ TupleList::get_int使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TupleList
的用法示例。
在下文中一共展示了TupleList::get_int方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: construct_cells
ErrorCode ReadCCMIO::construct_cells(TupleList &face_map,
#ifndef TUPLE_LIST
SenseList &sense_map,
#endif
TupleList & /* vert_map */,
std::map<int,int> &cell_topo_types,
std::vector<EntityHandle> &new_cells)
{
std::vector<EntityHandle> facehs;
std::vector<int> senses;
EntityHandle cell;
ErrorCode tmp_rval, rval = MB_SUCCESS;
EntityType this_type = MBMAXTYPE;
bool has_mid_nodes = false;
#ifdef TUPLE_LIST
unsigned int i = 0;
while (i < face_map.n) {
// pull out face handles bounding the same cell
facehs.clear();
int this_id = face_map.get_int(i);
unsigned int inext = i;
while (face_map.get_int(inext) == this_id && inext <= face_map.n) {
inext++;
EntityHandle face = face_map.get_ulong(inext);
facehs.push_back(face);
senses.push_back(face_map.get_short(inext));
}
this_type = MBMAXTYPE;
has_mid_nodes = false;
#else
std::map<int,std::vector<EntityHandle> >::iterator fmit;
std::map<int,std::vector<int> >::iterator smit;
std::map<int,int>::iterator typeit;
for (fmit = face_map.begin(), smit = sense_map.begin();
fmit != face_map.end(); fmit++, smit++) {
// pull out face handles bounding the same cell
facehs.clear();
int this_id = (*fmit).first;
facehs = (*fmit).second;
senses.clear();
senses = (*smit).second;
typeit = cell_topo_types.find(this_id);
if (typeit != cell_topo_types.end()) {
rval = ccmio_to_moab_type(typeit->second, this_type, has_mid_nodes);
}
else {
this_type = MBMAXTYPE;
has_mid_nodes = false;
}
#endif
tmp_rval = create_cell_from_faces(facehs, senses, this_type, has_mid_nodes, cell);
if (MB_SUCCESS != tmp_rval) rval = tmp_rval;
else {
new_cells.push_back(cell);
// tag cell with global id
tmp_rval = mbImpl->tag_set_data(mGlobalIdTag, &cell, 1, &this_id);
if (MB_SUCCESS != tmp_rval) rval = tmp_rval;
}
}
return rval;
}
ErrorCode ReadCCMIO::ccmio_to_moab_type(int ccm_type, EntityType &moab_type, bool &has_mid_nodes)
{
switch (ccm_type) {
case 1:
moab_type = MBVERTEX;
break;
case 2:
case 28:
moab_type = MBEDGE;
break;
case 29:
moab_type = MBMAXTYPE;
break;
case 3:
case 4:
moab_type = MBQUAD;
break;
case 11:
case 21:
moab_type = MBHEX;
break;
case 12:
case 22:
moab_type = MBPRISM;
break;
case 13:
case 23:
moab_type = MBTET;
break;
case 14:
case 24:
moab_type = MBPYRAMID;
break;
case 255:
moab_type = MBPOLYHEDRON;
break;
//.........这里部分代码省略.........