how to create a mesh? RRS feed

  • Question

  • Now, I want to create a mesh through a mesh's boundingsphere.

    Whether XNA have some classes or functions to create mesh, 

    or it have functions like 'D3DXCreateSphere' and 'D3DXCreateBox'  in D3D of C++?


    Wednesday, November 8, 2006 7:56 AM


  • XNA doesn't have any functions to create a mesh at runtime, although you could always just create a vertex buffer of your own and then call SetData on it to specify the vertex positions.

    If you write a new content pipeline processor, you can use the MeshBuilder class to construct a MeshContent object, then pass this to the built in ModelProcessor to convert it into a Model instance.
    Wednesday, November 8, 2006 6:18 PM