Dynamic scenes loading Based on an #XML description…


Dynamic scenes loading.

Based on an description of the project, that looks like this:

  • <polymorph version=”0.1″ date=”20161124″>
    • <scenes>
      • <scene id=”3″>
        • <pobjects>
          • <plight name=”main_sun” visible=”1″ debug=”1″>
          • <pnode name=”floor” visible=”1″ debug=”0″>

and so on, it is easy to load a new scene. The deletion and creation job is managed by a cool object call “PObjectManager” see: http://polymorph.cool/doxygen/classpolymorph_1_1_p_object_manager.html (thanks, doxygen!)

In the example.1.xml, the key ‘n’ is binded to the method PObjectManager.nextScene().

A little note: in the scene 1 (the middle one), the pile of plates has been done via a special tag:

<repeat count=”20″ offset_pos=”0,10,0″ offset_dir=”0,5,0″ offset_scale=”-2,0,-2″ />

When placed in a pnode, it will generate copies of the object automatically. Similar to array modifier of blender.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.