本文整理汇总了C++中PointViewPtr::point方法的典型用法代码示例。如果您正苦于以下问题:C++ PointViewPtr::point方法的具体用法?C++ PointViewPtr::point怎么用?C++ PointViewPtr::point使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointViewPtr
的用法示例。
在下文中一共展示了PointViewPtr::point方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processOne
void E57Writer::write(const PointViewPtr view)
{
for (PointId id = 0; id < view->size(); ++id)
{
PointRef point = view->point(id);
processOne(point);
}
}
示例2: processOne
bool processOne(PointRef& point)
{
PointRef bulkPoint = m_view->point(m_cnt);
bulkPoint.getPackedData(m_dims, m_bulkBuf.data());
point.getPackedData(m_dims, m_buf.data());
EXPECT_EQ(memcmp(m_buf.data(), m_bulkBuf.data(),
m_view->pointSize()), 0);
m_cnt++;
return true;
}
示例3: read
point_count_t FauxReader::read(PointViewPtr view, point_count_t count)
{
for (PointId idx = 0; idx < count; ++idx)
{
PointRef point = view->point(idx);
if (!processOne(point))
break;
if (m_cb)
m_cb(*view, idx);
}
return count;
}
示例4: read
point_count_t TileDBReader::read(PointViewPtr view, point_count_t count)
{
PointRef point = view->point(0);
PointId id;
for (id = 0; id < count; ++id)
{
point.setPointId(id);
if (!processOne(point))
break;
}
return id;
}
示例5: filter
void HAGFilter::filter(PointView& view)
{
PointViewPtr gView = view.makeNew();
PointViewPtr ngView = view.makeNew();
std::vector<PointId> gIdx, ngIdx;
// First pass: Separate into ground and non-ground views.
for (PointId i = 0; i < view.size(); ++i)
{
double c = view.getFieldAs<double>(Dimension::Id::Classification, i);
if (c == 2)
{
gView->appendPoint(view, i);
gIdx.push_back(i);
}
else
{
ngView->appendPoint(view, i);
ngIdx.push_back(i);
}
}
// Bail if there weren't any points classified as ground.
if (gView->size() == 0)
throwError("Input PointView does not have any points classified "
"as ground");
// Build the 2D KD-tree.
KD2Index kdi(*gView);
kdi.build();
// Second pass: Find Z difference between non-ground points and the nearest
// neighbor (2D) in the ground view.
for (PointId i = 0; i < ngView->size(); ++i)
{
PointRef point = ngView->point(i);
double z0 = point.getFieldAs<double>(Dimension::Id::Z);
auto ids = kdi.neighbors(point, 1);
double z1 = gView->getFieldAs<double>(Dimension::Id::Z, ids[0]);
view.setField(Dimension::Id::HeightAboveGround, ngIdx[i], z0 - z1);
}
// Final pass: Ensure that all ground points have height value pegged at 0.
for (auto const& i : gIdx)
view.setField(Dimension::Id::HeightAboveGround, i, 0.0);
}
示例6: run
PointViewSet RangeFilter::run(PointViewPtr inView)
{
PointViewSet viewSet;
if (!inView->size())
return viewSet;
PointViewPtr outView = inView->makeNew();
for (PointId i = 0; i < inView->size(); ++i)
{
PointRef point = inView->point(i);
if (processOne(point))
outView->appendPoint(*inView, i);
}
viewSet.insert(outView);
return viewSet;
}
示例7: read
point_count_t SbetReader::read(PointViewPtr view, point_count_t count)
{
PointId nextId = view->size();
PointId idx = m_index;
point_count_t numRead = 0;
seek(idx);
while (numRead < count && idx < m_numPts)
{
PointRef point = view->point(nextId);
processOne(point);
if (m_cb)
m_cb(*view, nextId);
idx++;
nextId++;
numRead++;
}
m_index = idx;
return numRead;
}