Results 1 to 3 of 3

Thread: Good use of the MVC pattern for 3d editors.

  1. #1
    Join Date
    Jun 2010
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Good use of the MVC pattern for 3d editors.

    As many people, I want to do my first basic 3d game editor based on Qt. The editor word here is just huge cause what I want to do is very simple.

    Anyway, I have been messing with Qt for a few months now, doing a 2d editor, and I'm almost getting addicted to it, although I know I'm certainly not using it at its best. One of the main things I didn't like, for example, was syncing the Qt model (QStandardItemModel) with Ogre's Scene Manager (the graphics engine scene manager).

    I used the QStandarditemModel to store all the logic of the 2d scene itself. I would have an element per row and columns for names, positions, dimensions, showing/hiding, textures, etc, etc. This allowed me to use this model as a center for all the views; like, the elements view, texture view, etc. But most of the time I would catch an event, change the model then change the scene, which I always thought it was an error prone way of doing things, but it was the best I could do by that time.

    I have discovered many cool things about Qt, but since a lot of users have used it before to create 3d editors too, I would like to know how did you guys end up implementing the model view controller pattern in graphic editors, or how, for example, do you sync the graphic's engine world scene in a tree view.

    Thanks!

  2. #2
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Good use of the MVC pattern for 3d editors.

    Hi,

    You can take a look at Qt/3D. It has scene management classes that I think would be usefull for an editor.

    Unfortunately I haven't had time to look into it myself.

    Best regards,
    Marc

  3. #3
    Join Date
    Jun 2010
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Good use of the MVC pattern for 3d editors.

    Using Ogre is mandatory in my case. But the real question is how to maintain both the 3d world and the Qt Gui synced up. Is there a better way of doing things, that what I did before? Having the graphic model and a logic model?

Similar Threads

  1. UML Editors based on Qt
    By npclaudiu in forum General Programming
    Replies: 1
    Last Post: 25th March 2010, 22:08
  2. Replies: 0
    Last Post: 28th August 2009, 09:49
  3. QTableWidget and multiple editors -- how to get them?
    By macias in forum Qt Programming
    Replies: 2
    Last Post: 25th June 2007, 17:49
  4. Closing all editors in a view?
    By smacchia in forum Qt Programming
    Replies: 2
    Last Post: 10th April 2007, 14:29
  5. Drag & Drop QTreeWidgetItem with editors
    By Mad Max in forum Qt Programming
    Replies: 3
    Last Post: 25th January 2007, 09:09

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.