Thread: Mesh Class Design problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    64

    Mesh Class Design problem

    I want adding 3d format would be easy. Lets say, I want to support md2 now then later md3 then 3ds then so on.

    I have a mesh manager
    ResourceManager< Mesh > *m_meshManager; // Mesh manager.

    Can anyone here help me on designing my Mesh class?

    So far here's the code

    Code:
    class Mesh : public BoundingVolume
    {
    };
    
    class AnimatedMesh : public Mesh
    {
    };
    class AnimatedMeshMD2 : public AnimatedMesh, public Resource< AnimatedMeshMD2 >
    {
    };
    class AnimatedMeshMD3 : public AnimatedMesh, public Resource< AnimatedMeshMD3 >
    {
    };
    class AnimatedMesh3DS : public AnimatedMesh, public Resource< AnimatedMesh3DS >
    {
    };
    Is there any cleaner way? I want to organize all of my mesh in one manager. I really suck in designing. So I hope this makes sense.

    Sarah

    EDIT: BTW, I found this kind of design in Multiplayer FPS in DirectX but in only supports .X files which uses bones.
    Last edited by sarah22; 05-19-2009 at 01:04 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 06-21-2006, 04:23 AM
  2. singleton class problem
    By ... in forum C++ Programming
    Replies: 6
    Last Post: 12-22-2003, 06:16 PM
  3. Quaternion class problem
    By Lurker in forum C++ Programming
    Replies: 14
    Last Post: 11-18-2003, 06:01 PM
  4. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM
  5. static class problem.
    By Sebastiani in forum C++ Programming
    Replies: 3
    Last Post: 10-16-2002, 03:27 PM

Tags for this Thread