I suspect the world of gaming would be a far poorer place without the wonders of doughnuts, inner tubes and other torus related items, so it seems only right to explore how to construct one programmatically.
As with all the other recipes in this chapter, a mesh building framework, such as the one described in the Modeling triangles recipe of this chapter, is required. However, the choice isn't limited to any particular one.
To create a disc programmatically:
VertexPositionTextureNormalGeometricBufferFactory: var factory = new VertexPositionNormalTextureGeometricBufferFactory();
var majorRadius = 2f; var majorSegmentCount = 16; ...