MCPcopy Create free account
hub / github.com/PDAL/PDAL / addPoint

Method addPoint

plugins/trajectory/filters/PulseCollection.cpp:80–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void PulseCollection::addPoint(double time, const Eigen::Vector3d& startPos,
81 const Eigen::Vector3d& endPos, double angle)
82{
83 auto shouldRegister = [](const std::vector<Pulse>& buf, double curTime, double interval) -> bool
84 {
85 if (buf.empty())
86 return false;
87 return std::floor(buf.front().t / interval) != std::floor(curTime / interval);
88 };
89
90 if (usingMulti())
91 {
92 if (shouldRegister(m_multiBuf, time, m_args.dtr))
93 {
94 registerMulti(m_multiBuf);
95 m_multiBuf.clear();
96 }
97 m_multiBuf.push_back(Pulse(time, startPos, endPos, angle));
98 }
99 if (usingSingle())
100 {
101 if (shouldRegister(m_singleBuf, time, m_args.dts))
102 {
103 registerSingle(m_singleBuf);
104 m_singleBuf.clear();
105 }
106 m_singleBuf.push_back(Pulse(time, startPos, angle));
107 }
108}
109
110void PulseCollection::registerMulti(const std::vector<Pulse>& buf)
111{

Callers

nothing calls this directly

Calls 3

PulseClass · 0.85
emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected