62 indexArray subClouds = buffer->getIndexArray(
"sub_clouds", numSubClouds, dummy);
64 vector<indexPair> pairs;
65 pairs.reserve(numSubClouds);
66 for (
size_t i = 0; i < numSubClouds; i++)
68 pairs[i].first = subClouds[i*2 + 0];
69 pairs[i].second = subClouds[i*2 + 1];
72 vector<indexPair>::iterator it;
75 size_t n = buffer->numPoints();
77 floatArr points = buffer->getPointArray();
80 for(it = pairs.begin(); it != pairs.end(); it ++)
86 for(
size_t a =
p.first; a <=
p.second; a++)
94 pc->
addPoint(points[a*3 + 0], points[a*3 + 1], points[a*3 + 2], 255, 0, 0);
131 vector<uColorVertex>::iterator p_it;
142 floatArr pointBuffer(
new float[3 * c]);
143 ucharArr colorBuffer(
new unsigned char[3 * c]);
151 vector<uColorVertex>::iterator p_it;
154 size_t bufferPos = 3 * c;
157 pointBuffer[bufferPos ] = v.
x;
158 pointBuffer[bufferPos + 1] = v.
y;
159 pointBuffer[bufferPos + 2] = v.
z;
161 colorBuffer[bufferPos ] = v.
r;
162 colorBuffer[bufferPos + 1] = v.
g;
163 colorBuffer[bufferPos + 2] = v.
b;
171 pcBuffer->setPointArray(pointBuffer, c);
172 pcBuffer->setColorArray(colorBuffer, c);
175 modelPtr->m_pointCloud = pcBuffer;