------------------------------------------------------------------------------------------------ Create a subdivision sphere
| 349 | // ------------------------------------------------------------------------------------------------ |
| 350 | // Create a subdivision sphere |
| 351 | void StandardShapes::MakeSphere(unsigned int tess, |
| 352 | std::vector<aiVector3D> &positions) { |
| 353 | // Reserve enough storage. Every subdivision |
| 354 | // splits each triangle in 4, the icosahedron consists of 60 verts |
| 355 | positions.reserve(positions.size() + 60 * integer_pow(4, tess)); |
| 356 | |
| 357 | // Construct an icosahedron to start with |
| 358 | MakeIcosahedron(positions); |
| 359 | |
| 360 | // ... and subdivide it until the requested output |
| 361 | // tessellation is reached |
| 362 | for (unsigned int i = 0; i < tess; ++i) |
| 363 | Subdivide(positions); |
| 364 | } |
| 365 | |
| 366 | // ------------------------------------------------------------------------------------------------ |
| 367 | // Build a cone |
nothing calls this directly
no test coverage detected