CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2010
    Posts
    907

    "Mesh" should be an interface or an abstract class?

    Code:
    class IMesh
    {
     public:
                virtual void update(float dt) = 0;
                virtual void render() = 0;
    };
    
    or
    
    class AMesh
    {
    public:
                virtual void update(float dt) = 0;
                virtual void render() = 0;
    public:
               D3DXFRAME *m_Root;
    };
    Any advices please?
    Thanks
    Jack
    Last edited by lucky6969b; September 5th, 2012 at 05:53 AM. Reason: Server instability

  2. #2
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: "Mesh" should be an interface or an abstract class?

    As long as both IMesh and AMesh contain at least one pure virtual function, both IMesh and AMesh are abstract classes.
    In fact, which is your problem?
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured