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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Methods def<strong>in</strong>ed here:<br />

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

__<strong>in</strong>it__(self, name, actor, sensors)<br />

Creates a new Role with the given name and Sensors for the given Actor.<br />

param name an alphanumeric str<strong>in</strong>g<br />

param actor an Actor<br />

param sensors an iterable of Sensors<br />

act(self, <strong>in</strong>teraction)<br />

Tells this Role to evaluate the given Interaction and act on behalf of its<br />

Actor on the Target of the Interaction.<br />

Automatically called by Interaction.perform(...).<br />

Abstract method. Subclasses should override and implement this method to<br />

provide the desired evaluation behavior.<br />

raises NotImplementedError if a subclass does not override this method<br />

addInteraction(self, <strong>in</strong>teraction)<br />

Adds the given <strong>in</strong>teraction to this Role. If this Role already has an<br />

Interaction for the same Target, it silently replaces it.<br />

Automatically called by Interaction.__<strong>in</strong>it__(...).<br />

raises ValueError if <strong>in</strong>teraction.getRole() does not return this Role<br />

getActor(self)<br />

Returns this Role's Actor.<br />

getInteraction(self, target)<br />

Returns this Role's Interaction for the given Target.<br />

raises KeyError if this Role does not have an Interaction for the given<br />

Target<br />

getName(self)<br />

Returns this Role's name.<br />

getSensor(self, name)<br />

Returns this Role's Sensor with the given name.<br />

raises KeyError if this Role does not have a Sensor with the given name<br />

<strong>in</strong>teractions(self)<br />

Returns a list of this Role's Interactions.<br />

sensors(self)<br />

Returns a list of this Role's Sensors.<br />

targets(self)<br />

Returns a list of the Targets for which this Role has Interactions.<br />

55

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

Saved successfully!

Ooh no, something went wrong!