ajon542 / GameEngine

Experimenting with OpenTK inside WPF
0 stars 0 forks source link

Make a Hierarchy View #32

Open ajon542 opened 8 years ago

ajon542 commented 8 years ago

The HierarchyView will be used to store the scene hierarchy. It should have a single root game object. Come up with some requirements for the HierarchyView and begin the design and implementation. It should be another tab/window selectable from the menu.

ajon542 commented 8 years ago

This will involve some more in depth interaction between the scene and the WPF components.

ajon542 commented 8 years ago

http://www.codeproject.com/Articles/26288/Simplifying-the-WPF-TreeView-by-Using-the-ViewMode

ajon542 commented 8 years ago

If we use the TreeView component we could bind it to the GameObject hierarchy (possibly) and this will allow us to show the game objects in a tree view. Alternatively, we could create a copy of the game object tree using only the GUIDs. When any modification is made, send message with the appropriate GUID to the SceneViewModel and have the operation performed. This shouldn't be too slow since we usually perform operations through user interaction.

ajon542 commented 8 years ago

In the HierarchyViewModel we should keep a GameObjectTree structure that contains the name and guid. When CreateGameObject is selected through the MeneView, a message should be sent to the HierarchyViewModel first. This adds the object to the tree under the selected node. The message is then sent to the SceneViewModel. Essentially, everything should go through the HierarchyViewModel as that will be the data source for the game objects.