This project has moved and is read-only. For the latest updates, please go here.


Implement polyhedron as geometric primitive


DirectXTK implements a number of GeometricPrimitives, but it is missing several shapes supported by OpenGL's glut library.
  • glut*Dodecahedron
  • glut*Octahedron
  • glut*Tetrahedron
  • glut*Icosahedron
This combined with the existing Cube implementation make up the 'platonic solids'

PS: It's also missing glut*Cone, but that's covered by 921
Closed May 29, 2013 at 11:23 PM by walbourn


walbourn wrote May 22, 2013 at 11:42 PM

Note that one difference between DirectXTK and OpenGL's glUT is that DirectXTK supports texture coordinates as well as normal on all GeometricPrimitive shapes. glut supports normals but not texture coordinates except on the Utah teapot.

walbourn wrote May 24, 2013 at 7:22 AM

Vertex and connectivity information for these shapes is pretty easy to come by

Schneider & Eberly, Geometric Tools for Computer Graphics, pg 346-351

Normals for these shapes are 'face-normals' necessitating vertex duplication. but should also be fairly easy to derive.

The real challenge is going to be to provide reasonable texture coordinates. It looks like 'gift-wrapping' or just projection of a sphere are the choices here.

walbourn wrote May 29, 2013 at 11:23 PM

Resolved with changeset 28163: More Geometric Primitives (Cone, Tetrahedron, Octahedron, Dodecahedron, Icosahedron)