13.07.2015 Views

CashFlow, A Visualization Framework for 3D Flow - Studierstube ...

CashFlow, A Visualization Framework for 3D Flow - Studierstube ...

CashFlow, A Visualization Framework for 3D Flow - Studierstube ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Implementation4.2. UML Inheritance Diagram4.2.1 UML Sequence Diagram of Data AccessThe concept of SoAction & SoElement from OpenInventor [Coi00] is very importantto understand, because the dynamic data flow model of the <strong>Cash<strong>Flow</strong></strong> framework isbased on this concept. SoActions 6 can either be created by events or being generatedrepeatedly like the SoGLRender action. SoActions traverse the scene graph and useSoElements 7 to carry in<strong>for</strong>mation from one node to another nodes. SoActions andSoElements have a life cycle including a repeated creation and destruction. Once anSoAction is initialized, it creates the utilized SoElements. The SoElements only existwhile the SoAction is not terminated. As soon as the SoAction is terminated it deletesall its SoElements in a post–mortem step. All nodes touched by the traversal can accessthe SoElements (see figure 4.4 on page 70).The UML sequence diagram in figure 4.6 on page 73 shows the interaction betweenscene graph nodes, one SoAction and three SoElements. The UML sequence diagramcan be divided into four phases:1. Initialization Phase <strong>for</strong> SoElements2. Register Phase where nodes register to their corresponding SoElements3. Access Phase where nodes exchange data using the SoElements as dispatchers.4. Deallocation Phase where the SoElements are destroyed during the post–mortemstep of the SoAction.When using a larger scene graph like on page 51 in figure 3.10 phase 2) and phase 3)are passed through several times. The scene graph used <strong>for</strong> the UML sequence diagramin figure 4.6 consists of the following nodes.GridNode → DataAccess Node → MultiData Node → Render NodeThe SoAction creates [ init ] the three new Elements Grid Element, DataAccess Elementand MultiData Element. The initialization phase is now finished. The next stepis traversing the scene graph. The Action calls the method [ doAction ] <strong>for</strong> each nodethat is touched by the traversal. In our simple example all nodes are effected by thetraversal, since no SoSwitch nodes are used in the scene graph.The three nodes GridNode, DataAccessNode and MultiDataNode register themselvesto their corresponding Elements [ register(this) ]. The GridNode stores a uniquekey pointing to at least one DataAccessNode. The DataAccessNode holds severalDataAccessMaps , which define virtual arrays in the MultiDataNodes. Last node in traversalorder is the RenderNode. It queries the Grid Element <strong>for</strong> the current GridNode[ getGrid ] and reads the in<strong>for</strong>mation from the GridNode [ getGrid ]. Based on that in<strong>for</strong>mationfrom the GridNode the RenderNode requests the required DataAccessNodefrom the DataAccess Element [ getGrid ]. The DataAccessNode links to a Multi-DataNode via the MultiData Element [ getData ]. Finally the RenderNode is able togenerate the image [ render ]. In the last phase the Action is terminated and removesits Elements [ destroy ], while all nodes await the next scene graph traversal.6 <strong>for</strong> details on SoAction see Coin<strong>3D</strong>[Coi00]7 <strong>for</strong> details on SoElements see Coin<strong>3D</strong>[Coi00]72

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!