MCPcopy Create free account
hub / github.com/OctoMap/octomap / initGLArrays

Method initGLArrays

octovis/src/OcTreeDrawer.cpp:255–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253 }
254
255 void OcTreeDrawer::initGLArrays(const unsigned int& num_cubes,
256 unsigned int& glArraySize,
257 GLfloat*** glArray, GLfloat** glColorArray) {
258
259 clearCubes(glArray, glArraySize, glColorArray);
260
261 // store size of GL arrays for drawing
262 glArraySize = num_cubes * 4 * 3;
263
264 // allocate cube arrays, 6 quads per cube
265 *glArray = new GLfloat* [6];
266 for (unsigned i = 0; i<6; ++i){
267 (*glArray)[i] = new GLfloat[glArraySize];
268 }
269 // setup quad color array, if given
270 if (glColorArray != NULL)
271 *glColorArray = new GLfloat[glArraySize * 4 *4];
272 }
273
274 void OcTreeDrawer::initCubeTemplate(const octomath::Pose6D& origin,
275 std::vector<octomath::Vector3>& cube_template) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected