本文整理汇总了C++中FaceList::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ FaceList::push_back方法的具体用法?C++ FaceList::push_back怎么用?C++ FaceList::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FaceList
的用法示例。
在下文中一共展示了FaceList::push_back方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: f_handler
bool PLY2Reader::loadPLY2Mesh(std::shared_ptr<Shape> shape, std::string fname)
{
std::ifstream f_handler(fname);
if (!f_handler)
{
std::cout << "Open file failed.\n";
return false;
}
std::string line;
std::stringstream ss;
int num_vertex = 0;
int num_face = 0;
VertexList vertexList;
FaceList faceList;
STLVectorf UVList;
getline(f_handler, line);
ss.str(line);
ss >> num_vertex;
getline(f_handler, line);
ss.str(line);
ss >> num_face;
for (int i = 0; i < num_vertex; ++i)
{
float v;
for (int j = 0; j < 3; ++j)
{
getline(f_handler, line);
ss.str(line);
ss >> v;
vertexList.push_back(v);
}
}
for (int i = 0; i < num_face; ++i)
{
int f;
for (int j = 0; j < 3; ++j)
{
getline(f_handler, line);
ss.str(line);
ss >> f;
faceList.push_back(f);
}
}
shape->init(vertexList, faceList, UVList);
return true;
}
示例2: FaceList
/**
* Prints the polyhedra on the screen by calculating the intersection of three meshes
* each time.
*/
FaceList *
Polyhedron::print()
{
FaceList * printing = new FaceList();
FaceList::iterator iter;
/* Going through the list of points and copy them into the new list. */
for (iter = faces.begin(); iter != faces.end(); iter++) {
printing->push_back((*iter)->transform(org, angle));
}
return printing;
}
示例3: findNeighbors
void PolyMesh::findNeighbors( Face* f, FaceList& flist )
{
unsigned int size = f->_pts.size();
for ( unsigned int i=0; i<size; ++i )
{
Edge* edge = getEdge( (*f)[i%size], (*f)[(i+1)%size], _edges );
if ( !edge ) continue;
for ( FaceList::iterator itr=edge->_faces.begin();
itr!=edge->_faces.end();
++itr )
{
if ( *itr!=f )
flist.push_back( *itr );
}
}
}