I'd advise you make a factory to which you can delegate the creation/deletion of meshes. And you'd probably want only a few functions/methods to be able to create a mesh(example MeshFactory::createCube(), MeshFactory::loadMesh(char* filename), MeshFactory::createSphere(unsigned int segments)).
Basically something like this:
class Mesh
{
//various variables go here - the Mesh may have an empty constructor
}
class MeshFactory
{
private:
std::map<ID, Mesh*> m_meshes; //keep track of meshes by id
private:
//various details
//...
ID createMeshFromBuffers(const std::vector<Vertex>& vertexBuffer, const std::vector<UINT>& indexBuffer)
{
//you'll need the d3d device to create the ID3D11Buffers from the given buffers
}
public:
ID createCube()
{
//make the vertex and index buffer vectors
//...
return createMeshFromBuffers(vertexBuffer, indexBuffer);
}
//etc.
}
You could choose a different architecture of course, there are plenty of books out there that use various architectures when it comes to a 3d renderer.
I have not much experience wiht C++.
Well I'd advise you get some experience with C++ before going into 3d. I don't believe it's a good idea to be studying 3d rendering in C++ if you don't know well enough the language. Rastertek has some pretty good tutorials, other things would be Frank Luna's book, Jason Zink's book, Jason Gregory's book, but as I said - before you delve into 3d with C++ and direct3d you might want to take some time to study C++.