本文整理汇总了C++中vtkSmartPointer::FindPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ vtkSmartPointer::FindPoint方法的具体用法?C++ vtkSmartPointer::FindPoint怎么用?C++ vtkSmartPointer::FindPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vtkSmartPointer
的用法示例。
在下文中一共展示了vtkSmartPointer::FindPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Mesh
//.........这里部分代码省略.........
// int numLines = poly->GetNumberOfLines();
// vtkIdType * pts;
// // vtkIdList * pts2;
// for ( vtkIdType lineId=0; lineId<numLines; lineId++ )
// {
// vtkIdType numPoints;
// pEdges->GetOutput()->GetLines()->GetCell( lineId, numPoints, pts );
// // pEdges->GetOutput()->GetCellPoints( cellId, pts2 );
//
// if ( numPoints!=2 )
// {
// std::cout << "AAAAAAAAH!" << std::endl;
// continue;
// }
// // make sure we're dealing with an actual *edge* here.
// TEUCHOS_ASSERT_EQUALITY( numPoints, 2 );
// std::cout << pts[0] << " " << pts[1] << std::endl;
// }
// std::cout << "W0" << std::endl;
// poly->GetLines()->Print( std::cout );
//
// std::cout << "W1" << std::endl;
// poly->GetPoints()->Print( std::cout );
//
// std::cout << "W2" << std::endl;
double x[3];
// Teuchos::ArrayRCP<bool> boundaryPoints( numPoints, false );
Teuchos::ArrayRCP<bool> isBoundaryNodes( numPoints );
for ( int k=0; k<poly->GetNumberOfPoints(); k++ )
{
poly->GetPoint( k, x );
vtkIdType ptId = vtkMesh->FindPoint( x );
isBoundaryNodes[ ptId ] = true;
}
mesh->setBoundaryNodes( isBoundaryNodes );
// for ( int k=0; k<boundaryPoints.size(); k++ )
// std::cout << boundaryPoints[k] << std::endl;
// std::cout << "WWW" << std::endl;
// poly->Print( std::cout );
// vtkCellArray * verts = poly->GetVerts();
// verts->Print( std::cout );
// std::cout << "XXX" << std::endl;
// poly->GetData()->Print( std::cout );
// int numBoundaryPoints = poly->GetNumberOfPoints();
// Teuchos::ArrayRCP<Teuchos::Tuple<double,3> > boundaryPoints( numBoundaryPoints );
// for ( unsigned int k=0; k<numBoundaryPoints; k++ )
// poly->GetPoint( k, boundaryPoints[k].getRawPtr() );
// mesh->setBoundaryNodes( boundaryPoints );
// for ( int k=0; k<points.size(); k++ )
// std::cout << boundaryPoints[k] << std::endl;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// get cells
int globalNumElems = vtkMesh->GetNumberOfCells();
// create an appropriate map
Teuchos::RCP<const Epetra_Map> elemsMap =
Teuchos::rcp ( new Epetra_Map ( globalNumElems, 0, *comm ) );
int localNumElems = elemsMap->NumMyElements();