Skip to content

Commit

Permalink
add diagram of node class hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
EkkiD committed Oct 30, 2014
1 parent 7c8da75 commit 40b29ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modeller/chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ tree. As it traverses, it keeps a stack of modelview matrices used for conversio
At each step, it pushes the current modelview matrix onto the stack, and when it completes rendering of all child nodes,
it pops the matrix off the stack, leaving the parent node's modelview matrix at the top of the stack.


![The hierarchy of Node subclasses.](nodes.jpg?raw=true)

By making the `Node` class extensible in this way, we can add new types of shapes to the scene without changing any of the other code for scene
manipulation and rendering. Using `Node` concept to abstract away the fact that one `Scene` object may have many children is known as the Composite Design Pattern.

Expand Down
Binary file added modeller/nodes.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 40b29ba

Please sign in to comment.