dispmap/svpointcloud.cpp

28 lines
551 B
C++
Raw Normal View History

2014-07-23 20:50:12 +04:00
#include "svpointcloud.h"
2014-07-25 11:32:00 +04:00
SvPointCloud::SvPointCloud(uint width, uint height)
2014-07-23 20:50:12 +04:00
{
2014-07-25 11:32:00 +04:00
m_pointFiledHeight = height;
m_pointFiledWidth = width;
m_pointField = new SvPoint* [height];
for (uint y = 0; y < height; y++) {
m_pointField[y] = new SvPoint[width];
}
2014-07-23 20:50:12 +04:00
}
2014-07-25 11:32:00 +04:00
SvPointCloud::~SvPointCloud()
2014-07-23 20:50:12 +04:00
{
2014-07-25 11:32:00 +04:00
for (uint y = 0; y < m_pointFiledHeight; y++) {
delete[] m_pointField[y];
}
2014-07-23 20:50:12 +04:00
2014-07-25 11:32:00 +04:00
delete[] m_pointField;
}
void SvPointCloud::addPoint(SvFrameId frame, SvPoint point)
{
m_pointField[point.y()][point.x()] = point;
2014-07-23 20:50:12 +04:00
}