Class Diagram and some Q&A with myself

2007-05-24

Class Diagram and some Q&A with myself

Permalink 03:33:13 am, Categories: World Editor  

Now that exams are over, I can start the real work on the CS editor.

I decided to start off by trying to make a class diagram of the editor. This allows me visualize the system and locate problem areas in the design.

Class Diagram

There are a few issues that I've identified right now:

  1. What type do I use for the selections?

    Since I'm allowing heterogeneous selections, I need an array which can hold basically any CS engine object, including factories. I'm thinking a csWeakRefArray of iBase will work. It should use weak references since, we don't want to keep objects around if they deleted. Perhaps I need to call csWeakRefArray::Compact() before any function dealing with the selection, so I don't need to deal with invalid objects.



  2. How do I get the property editor for the selected objects?

    Each SCF interface will have its own property category, and each of these categories will be registered with the main property editor. To display the appropriate property editor for the selection, for each object, I should query each possible SCF interface until I find a match. The downside of this is that it has to test each and every interface for each object.

    Something like:

    class MeshWrapperPropertyCategory {
    public:
      // Pretty name for the category
      const char* GetCategory() {
        return "Mesh Wrapper";
      }
    
      bool AddToEditor(iBase* obj, PropertyEditor* propEditor) {
        iMeshWrapper* mesh = scfQueryInterface<iMeshWrapper>(obj);
        if (!mesh) return false;
    
        // ...
        // Add properties to propEditor.
        // These will also setup property change handlers which will call the interface's functions.
        // ...
    
        return true;
      }
    
    private:
      // Property change handlers go here.
    };
    

    This should allow you to edit objects of different types as long as they share some common SCF interface. The property editor will only show the interfaces in common. This will also reduce the amount of querying being done, since if the first object doesn't have interface X, we don't have to check if the next object has it.



  3. How do I register the tools with the toolbox?

    When a tool will registers itself with the tool manager, the tool manager should publish a ToolAdded event to its listeners. Among the listeners will be the ToolboxPanel. This should solve that.



  4. How to draw special stuff like the selection, manipulators for the move, rotate, and scale tools, or billboard icons for lights so you can select them visually?

    These should be handled in different classes.

    The CS view should draw the selection bounding box and the billboards for lights.
    The move, rotate, and scale tools should draw the manipulators.


  5. Where to use SCF interfaces in the code?

    I think one of the annoyances of CStudio was that everything was an interface and you had to put up with a lot of SCF boilerplate and interface querying to do anything. That said, I think that parts of the editor which are meant to be implemented by plugins should use SCF so that I can leave the dirty work of plugin loading to SCF. So, you'll probably end up seeing iTool, iPanel, and iAction. I'll have to read up more on SCF and talk to my mentor to make sure this is what I want.

Still, the diagram is missing some detail, e.g. tool and property category registration, various events/listeners, settings manager, and many tools/actions are not shown.

I will try to come up with a more complete diagram tomorrow and then I'll try to sort out any further difficulties. Hopefully I can get my hands on some code soon. In the meantime, to entertain my thirst for action rather than abstract thinking, I will try to set up the build system to work with wxAUI and wxPropertyGrid.

Trackback address for this post:

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Comments, Trackbacks, Pingbacks:

Comment from: bypass captcha key [Visitor] · http://captchaboss.com
Can you tell us more about this? I'd care to find out some additional information.
PermalinkPermalink 2012-07-06 @ 03:00
Comment from: download decaptcha [Visitor] · http://newdecaptcher.com
This is a very good tip especially to those new to the blogosphere.
Short but very accurate information… Many thanks for sharing this one.
A must read article!
PermalinkPermalink 2012-09-10 @ 07:53
Comment from: hindi video songs free [Visitor] · http://amarsobkisu.com/category/download-hindi-mp3/
Hey there! I know this is kinda off topic but I was wondering which blog
platform are you using for this website? I'm getting sick and tired of Wordpress because I've had issues with hackers and I'm looking at alternatives for another platform. I would be awesome if you could point me in the direction of a good platform.
PermalinkPermalink 2012-09-10 @ 07:54
Comment from: best captcha service [Visitor] · http://Bypass-Captcha.com
I am sure this paragraph has touched all the internet users,
its really really good article on building up new blog.
PermalinkPermalink 2012-09-12 @ 08:49
Comment from: Captcha decoder [Visitor] · http://expertdecoders.com
Hi! I could have sworn I've been to this website before but after checking through some of the post I realized it's new to me.
Nonetheless, I'm definitely glad I found it and I'll be book-marking and checking back frequently!
PermalinkPermalink 2012-09-12 @ 08:56
Comment from: bypass captcha program [Visitor] · http://decaptcher.org
Hello just wanted to give you a quick heads up.

The words in your content seem to be running off the screen in Chrome.
I'm not sure if this is a format issue or something to do with internet browser compatibility but I thought I'd post to let you know.
The design look great though! Hope you get the issue fixed soon.
Kudos
PermalinkPermalink 2012-09-12 @ 09:13
Comment from: bypassing captcha [Visitor] · http://bypasscaptcha.net
What's up to all, the contents existing at this web site are really awesome for people experience, well, keep up the good work fellows.
PermalinkPermalink 2012-09-12 @ 09:20
Comment from: bypass captcha codes [Visitor] · http://CaptchaBypass.org
Do you mind if I quote a few of your posts as long as I provide credit and sources back to your site?

My blog is in the very same niche as yours and my visitors
would definitely benefit from a lot of the information you present here.

Please let me know if this ok with you. Appreciate
it!
PermalinkPermalink 2012-09-12 @ 09:25
Comment from: captcher [Visitor] · http://Thedecaptcher.com/
Having read this I believed it was very enlightening. I appreciate you spending some time
and energy to put this information together. I once again find myself personally spending a lot of time both reading and commenting.

But so what, it was still worth it!
PermalinkPermalink 2012-09-12 @ 14:04
Comment from: captcha killer 2.0 [Visitor] · http://fullgospeltabernacleinc.com/page17.php
I am really enjoying the theme/design of your site. Do you ever run into any web browser
compatibility problems? A few of my blog visitors have complained
about my website not operating correctly in Explorer but looks
great in Chrome. Do you have any suggestions to help fix this problem?
PermalinkPermalink 2012-09-12 @ 19:13
Hi there to every body, it's my first pay a visit of this website; this webpage carries awesome and really good information for readers.
PermalinkPermalink 2012-09-13 @ 15:04
Comment from: javio [Visitor] Email
Hi, this is a very interesting web page and I have enjoyed read­ing many of the arti­cles and posts con­tained on the web­site, keep up the good work and hope to read some more inter­est­ing con­tent in the future. Thank you so much.
PermalinkPermalink 2012-10-31 @ 04:24
Comment from: javio [Visitor] Email · http://isdownorjustme.com/
Very informative post. Thanks for taking the time to share your view with us.
PermalinkPermalink 2012-10-31 @ 04:24
Comment from: javio [Visitor] Email · http://isdownorjustme.com/
Hi, this is a very interesting web page and I have enjoyed read­ing many of the arti­cles and posts con­tained on the web­site, keep up the good work and hope to read some more inter­est­ing con­tent in the future. Thank you so much.
http://isitdownforjustme.com/
PermalinkPermalink 2012-10-31 @ 04:26
Comment from: Architectual CPD Association CPD Certification Services [Visitor] Email · http://www.acpd.org.uk
We are looking to add a blog to our site which features Architects and Architectural Technologists training seminars. The blog will run for the CPD Certification section here http://www.acpd.org.uk/cpd-certification.htm We have been visiting several blogs on the web to get an idea for the design but we are not sure which is the easiest platform to use. We were advised to use Wordpress because we are setting it up ourseleves (not through an agency) and we told this is the easiest to use. We would appreciate any comments/recommendations. Thanks
PermalinkPermalink 2012-12-28 @ 15:40
Comment from: Register Themes [Visitor] Email · http://www.registerthemes.com
Commission received from Organic themes $248.40 USD(jan 25,2013 ) http://www.registerthemes.com/p/blog-page_25.html
PermalinkPermalink 2013-03-29 @ 17:28

Comments are not allowed from anonymous visitors.

December 2014
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Search

Categories

Archives

Misc

XML Feeds

What is this?

powered by
b2evolution