12.08.2013 Views

The AR Workbench: A Complete Co-located Reach-in Mirror-Based ...

The AR Workbench: A Complete Co-located Reach-in Mirror-Based ...

The AR Workbench: A Complete Co-located Reach-in Mirror-Based ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Marlon Richert, Master’s <strong>The</strong>sis, Friday, 23 February, 2007<br />

conjunction. F<strong>in</strong>ally, the VoidPythonMap executes the actual call to the Interaction<br />

that created the callback structure.<br />

Figure 17 Interaction callback structure <strong>in</strong> the case of two Pivots (object<br />

diagram).<br />

Figure 18 then shows a model of the generic case. Let us call this structure a<br />

callback unit. <strong>The</strong>n, you can comb<strong>in</strong>e several of these units to construct a callback<br />

structure like the one shown <strong>in</strong> Figure 17 but then for an arbitrary number of pivots<br />

as follows: Create a callback unit for all Pivots except one. Next, cha<strong>in</strong> the units<br />

together by substitut<strong>in</strong>g each unit’s MapB<strong>in</strong>d for the undef<strong>in</strong>ed B<strong>in</strong>d on the right side<br />

of the figure. Next, replace the only rema<strong>in</strong><strong>in</strong>g undef<strong>in</strong>ed B<strong>in</strong>d with an EditorB<strong>in</strong>d<br />

and l<strong>in</strong>k the only rema<strong>in</strong><strong>in</strong>g Pivot to <strong>in</strong> the same way that the other Pivots <strong>in</strong> Figure<br />

17 and Figure 18 connect to an EditorB<strong>in</strong>d. F<strong>in</strong>ally, l<strong>in</strong>k the only rema<strong>in</strong><strong>in</strong>g MapB<strong>in</strong>d<br />

to a VoidPythonMap, as shown <strong>in</strong> Figure 17. Thus, all Pivots l<strong>in</strong>k together <strong>in</strong> a logical<br />

conjunction that executes the code <strong>in</strong> the VoidPythonMap whenever it evaluates to<br />

True.<br />

Table 7 shows the code that implements the Interaction constructor, which<br />

creates the callback structure. It takes away many repetitive tasks the application<br />

programmer would normally have to perform and automates them. In addition,<br />

these tasks are quite complicated to perform and prone to error. Automat<strong>in</strong>g them<br />

reduces the risk of errors, reduces the amount of doma<strong>in</strong> knowledge required and<br />

frees up the programmer’s time for implement<strong>in</strong>g the actual ways <strong>in</strong> which the<br />

virtual objects will <strong>in</strong>teract by implement<strong>in</strong>g subclasses of Role.<br />

An explanation of the code <strong>in</strong> Table 7 is <strong>in</strong> order. Figure 19 shows the first part of<br />

the Interaction system. Every frame cycle—that is, every time before it draws a<br />

frame on screen—IPF tells all of its B<strong>in</strong>ds to update. Each B<strong>in</strong>d checks whether its<br />

<strong>in</strong>puts depend on the output of another b<strong>in</strong>d. If so, it waits for the B<strong>in</strong>ds it depends<br />

on to update their output first before updat<strong>in</strong>g itself. Thus, <strong>in</strong> the Interaction system,<br />

32

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

Saved successfully!

Ooh no, something went wrong!