| 148 | //----------------------------------------------------------------------- |
| 149 | |
| 150 | Entity* OctreeNode::getOctreeGrid(SceneManager *sceneManager) |
| 151 | { |
| 152 | if (!mOctreeGrid) |
| 153 | { |
| 154 | mGridPositionCount = 0; |
| 155 | mNodeI++; |
| 156 | ManualObject* manual = sceneManager->createManualObject(); |
| 157 | manual->begin("BaseWhiteNoLighting", RenderOperation::OT_LINE_LIST); |
| 158 | manual->colour((Real)1.0, (Real)0.0, (Real)0.0); |
| 159 | buildOctreeGridLines(manual); |
| 160 | manual->end(); |
| 161 | |
| 162 | StringStream meshName; |
| 163 | meshName << "VolumeOctreeGridMesh" << mNodeI; |
| 164 | manual->convertToMesh(meshName.str()); |
| 165 | StringStream entityName; |
| 166 | entityName << "VolumeOctreeGrid" << mNodeI; |
| 167 | mOctreeGrid = sceneManager->createEntity(entityName.str(), meshName.str()); |
| 168 | } |
| 169 | return mOctreeGrid; |
| 170 | } |
| 171 | |
| 172 | } |
| 173 | } |
no test coverage detected