本文整理汇总了C++中PointVector::at方法的典型用法代码示例。如果您正苦于以下问题:C++ PointVector::at方法的具体用法?C++ PointVector::at怎么用?C++ PointVector::at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointVector
的用法示例。
在下文中一共展示了PointVector::at方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: aggregator
TerrainCoverDrawableObject::NormaleMap
TerrainCoverDrawableObject::GetNormales(const PointVector & pv, const IndexVector & iv)
{
NormaleMap normales;
auto normaleCalculator = [&](int a, int b, int c)
{
const Point3d normale = utils::GetNormaleForTriangleNonNormalized(pv.at(a), pv.at(b), pv.at(c));
normales[a] += normale;
normales[b] += normale;
normales[c] += normale;
};
utils::ContainerAggregator<decltype(normaleCalculator), int, 3> aggregator(normaleCalculator);
boost::for_each(iv, aggregator);
return normales;
}
示例2: testIterator
bool testIterator()
{
PointVector<25,int> aPoint;
PointVector<4, int> avector;
trace.beginBlock("Point Iterator Test");
for (unsigned int i=0;i<25;++i)
aPoint.at(i) = i;
trace.info() << "aPoint="<<aPoint<< std::endl;
trace.info() << "With iterator: ";
for (PointVector<25,int>::Iterator it = aPoint.begin() ; it != aPoint.end(); ++it)
trace.info() << (*it) <<" " ;
trace.info() << std::endl;
trace.endBlock();
return true;
}