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.

Software Design3.6. MultiData NodeThe MultiData node is accessed by the DataConsumer node using the DataAccessnode as described in figure 3.9 on page 49. The DataConsumer node receives thenecessary in<strong>for</strong>mation on the virtual array from the DataAccess node. Using thatin<strong>for</strong>mation the DataConsumer node can read and write data to the virtual array.In order to be able to render the grids properly and be able to use mapping algorithmson different grids, the type of grid must be taken into account also. The naiveapproach would be to implement the same mapping algorithm <strong>for</strong> different grids, whichwould result in a large number of classes doing basically the same thing. To avoid sucha bad design we separate the topology data from the vertex data. The in<strong>for</strong>mation ontopology is stored in the grid node.3.6.1 Scripting, Unique Key ConceptUsing a scene graph also carries some inconvenience. Well known concepts like sharedmemory are not so easy to port to scene graphs, because the scene graph should remainscriptable. To provide this some conditions have to be met.• Insert generated data into existing nodeNodes creating new data, that needs to be inserted into the scene graph must useexisting storage nodes. Otherwise it is not possible to refer to that data, whichis generated during runtime in a script. For example let’s assume that node Ggenerates new data and node A is traversed after node G. If another node D isinserted into the scene graph and node G stores the generated data into node D itis trivial to link node A to node D.Thus the condition is, that each node generating data is not allowed to create anew node inside the scene graph. Each node generating data must use an existingMultiData node to store the data.• Bind DataAccess node to MultiData nodeData stored in a MultiData node is always associated with a correspondingDataAccess node. The DataAccess node holds in<strong>for</strong>mation on the virtual arraydefined on top of the real memory. Instead of addressing a MultiData nodedirectly the DataAccess node is accessed.• Define a unique key per nodeEach MultiData node and each DataAccess node have a unique key. EachDataAccess node stores the key to the MultiData node it is bound to. TheDataConsumer node or rather its derived classes, stores the key to theDataAccess node. This level of indirection allows to use the DataAccess nodeas a filter executed during runtime.52

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

Saved successfully!

Ooh no, something went wrong!