Create a 4-face pyramid mesh.
| 153 | |
| 154 | // Create a 4-face pyramid mesh. |
| 155 | PlyMesh MakePyramidMesh() { |
| 156 | PlyMesh mesh; |
| 157 | mesh.vertices = { |
| 158 | PlyMeshVertex(0.0f, 0.0f, 0.0f), |
| 159 | PlyMeshVertex(1.0f, 0.0f, 0.0f), |
| 160 | PlyMeshVertex(1.0f, 1.0f, 0.0f), |
| 161 | PlyMeshVertex(0.0f, 1.0f, 0.0f), |
| 162 | PlyMeshVertex(0.5f, 0.5f, 1.0f), |
| 163 | }; |
| 164 | mesh.faces = { |
| 165 | PlyMeshFace(0, 1, 4), |
| 166 | PlyMeshFace(1, 2, 4), |
| 167 | PlyMeshFace(2, 3, 4), |
| 168 | PlyMeshFace(3, 0, 4), |
| 169 | }; |
| 170 | return mesh; |
| 171 | } |
| 172 | |
| 173 | // Create a 12-face cube mesh (2 triangles per face). |
| 174 | PlyMesh MakeCubeMesh() { |
no test coverage detected