本文整理汇总了C++中Files::GetPoints方法的典型用法代码示例。如果您正苦于以下问题:C++ Files::GetPoints方法的具体用法?C++ Files::GetPoints怎么用?C++ Files::GetPoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Files
的用法示例。
在下文中一共展示了Files::GetPoints方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
const std::vector<boost::shared_ptr<ribi::Coordinat3D> >
ribi::foam::Mesh::CreatePoints(const Files& files)
{
std::vector<boost::shared_ptr<ribi::Coordinat3D> > v;
assert(files.GetPoints());
for (const PointsFileItem& item: files.GetPoints()->GetItems())
{
static_assert(std::is_same<PointsFileItem,Point>(),
"Point is a typedef for PointsFileItem"
);
const boost::shared_ptr<ribi::Coordinat3D> p {
new ribi::Coordinat3D(item.GetCoordinat())
};
assert(p);
v.push_back(p);
}
return v;
}
示例2: f
ribi::foam::Mesh::Mesh(
const std::vector<boost::shared_ptr<Boundary>>& boundaries,
const std::vector<boost::shared_ptr<Cell>>& cells,
const std::vector<boost::shared_ptr<Face>>& faces,
const std::vector<boost::shared_ptr<ribi::Coordinat3D>>& points
)
: m_boundaries(boundaries),
m_cells(cells),
m_faces(faces),
m_points(points)
{
#ifndef NDEBUG
Test();
for (const boost::shared_ptr<Face> face: m_faces)
{
assert(face);
assert(face->GetOwner());
assert( (face->GetNeighbour() || !face->GetNeighbour() )
&& "internalMesh faces have a neighbour, defaultWall faces don't"
);
}
#endif
if (!AreFacesOrdered())
{
std::cout << "Reordering faces" << std::endl;
ReorderFaces();
}
#ifndef NDEBUG
assert(AreFacesOrdered());
const Files f(this->CreateFiles());
assert(f.GetFaces()->GetItems().size() == faces.size());
assert(f.GetBoundary()->GetItems().size() == boundaries.size());
assert(f.GetPoints()->GetItems().size() == points.size());
#endif
}