1

Closed

Implement polyhedron as geometric primitive

description

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 10:23 PM by walbourn

comments

walbourn wrote May 22, 2013 at 10:22 PM

walbourn wrote May 22, 2013 at 10: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 6: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.

wrote May 29, 2013 at 10:23 PM

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