本文整理汇总了C++中DLIList::is_in_list方法的典型用法代码示例。如果您正苦于以下问题:C++ DLIList::is_in_list方法的具体用法?C++ DLIList::is_in_list怎么用?C++ DLIList::is_in_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DLIList
的用法示例。
在下文中一共展示了DLIList::is_in_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
template <class X> inline void DLIList<X>::intersect ( const DLIList<X>& merge_list )
{
if ( &merge_list == this )
return;
const int itemCount = listArray.size();
std::vector<X> tmp;
for ( int i=0; i<itemCount; i++ )
{
if (merge_list.is_in_list(listArray[i]))
{
tmp.push_back(listArray[i]);
}
}
this->listArray.swap(tmp);
index = 0;
}
示例2: simplify_curves_in_volume
CubitStatus SimplifyTool::simplify_curves_in_volume(
DLIList<RefEdge*> ref_edge_list,
double angle_in,
DLIList<RefEdge*> respect_edge_list,
DLIList<RefVertex*> respect_vertex_list,
CubitBoolean respect_imprints,
CubitBoolean local_normals,
CubitBoolean preview)
{
if(local_normals){
PRINT_WARNING("When simplifying curves, 'local_normals' is currently ignored.\n");
}
if(ref_edge_list.size()==0)
{
PRINT_ERROR("No curves specified for simplification\n");
return CUBIT_FAILURE;
}
else if(ref_edge_list.size() == 1)
{
PRINT_ERROR("Only one curve specified for simplification\n");
return CUBIT_FAILURE;
}
RefVolume* ref_volume = ref_edge_list.get()->ref_volume();
if (NULL == ref_volume)
{
PRINT_WARNING("Simplifying free curves is not supported.\n");
return CUBIT_FAILURE;
}
DLIList<RefEdge*> seed_edges;
DLIList<RefVertex*> preview_vertices;
DLIList<RefVertex*> preview_removed;
if(preview)
ref_volume->ref_vertices(preview_vertices);
int j,k;
int new_edge_count = 0;
int combined_edge_count = 0;
ProgressTool *prog_ptr = 0;
if(ref_edge_list.size() > 100 )
{
char title[200];
if(preview)
sprintf(title, "Previewing Volume %d",ref_volume->id());
else
sprintf(title, "Simplifying Curves in Volume %d",ref_volume->id());
prog_ptr = AppUtil::instance()->progress_tool();
assert(prog_ptr != NULL);
prog_ptr->start(0,100, title);
}
int start_edge_count = ref_edge_list.size();
while(ref_edge_list.size())
{
DLIList<RefEdge*> composite_edges;
seed_edges.append_unique(ref_edge_list.pop());
for ( j = ref_edge_list.size(); j--; )
ref_edge_list.get_and_step()->marked( CUBIT_FALSE );
while(seed_edges.size())
{
RefEdge *seed_ref_edge = seed_edges.pop();
seed_ref_edge->marked(CUBIT_TRUE);
composite_edges.append(seed_ref_edge);
// Get the vertices
DLIList<RefVertex*> ref_vertex_list;
seed_ref_edge->ref_vertices( ref_vertex_list );
RefVertex *ref_vertex_ptr;
RefEdge *ref_edge_ptr;
for( k = ref_vertex_list.size(); k--; )
{
ref_vertex_ptr = ref_vertex_list.get_and_step();
// Don't go propagate across surface splits if the user asks for it
GeometryFeatureTool* gft = GeometryFeatureTool::instance();
if( respect_imprints &&
gft->feature_type(ref_vertex_ptr) == GeometryFeatureEngine::FEATURE_IMPRINT)
continue;
// Don't cross a curve if we want it respected
if(respect_vertex_list.is_in_list(ref_vertex_ptr))
continue;
DLIList<RefEdge*> attached_ref_edges;
ref_vertex_ptr->ref_edges( attached_ref_edges );
attached_ref_edges.remove(seed_ref_edge);
ref_edge_ptr = attached_ref_edges.size()!=0?attached_ref_edges.get():0;
// keep the face if we want it respected
if(attached_ref_edges.size() == 1 &&
respect_edge_list.is_in_list(attached_ref_edges.get()))
continue;
//.........这里部分代码省略.........