| 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) { |
nothing calls this directly
no outgoing calls
no test coverage detected