"Mesh" should be an interface or an abstract class?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

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

  1. #1
    Join Date
    Dec 2010
    Posts
    587

    "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
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,021

    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 Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center