Package Functions | |
Automator () | |
void | renderSelf () |
void | state (int newstate) |
VisNode | travel (VisNode start) |
VisNode | getRandomChild (VisNode n) |
String | getRandomSource (VisKeyword kn) |
boolean | loveClass (Class c) |
Package Attributes | |
VisNode | focus |
final int | IDLE = 1 |
final int | ATTEND = 2 |
final int | FETCH = 3 |
final int | FETCHED = 4 |
int | state = IDLE |
float | time = 0 |
final float | P_CHILD = .9f |
final float | P_PARENT = .4f |
final Class[] | goodClasses |
VisNode | comeFrom = null |
this is a simple state engine, featuring four states:
IDLE doesn't last long (restless...) and smart-randomly decides which node ATTEND to.
ATTEND waits till the viewpoint reaches the selected node ("focus") and then dispatch some action on it: -VisKeywords are fetched from a random source (transition to FETCH) -VisImagefields are relayouted -VisImages are opened to hud viewer
FETCH waits till a source fetch spilled its results to the space and the usual transition of viewpoint begins: FETCHED.
FETCHED waits till the viewpoint arrives the new fetched nodes, and set the focus to its tree, so the virtual user is interested in what he just fetched. we then IDLE.
for all actions except fetching this gives a simple IDLE-ATTEND loop traveling the visible nodes and do some actions on them. when fetching this is a little more complex (IDLE-ATTEND-FETCH-FETCHED) as we encourage the simulated user to take interest in the eagerly awaited fetched nodes.
the behaviour can be adjusted by some propabilities which are used in decision which node to attend next.
Definition at line 45 of file Automator.java.
org.hfbk.vis.visnode.Automator.Automator | ( | ) | [package] |
void org.hfbk.vis.visnode.Automator.renderSelf | ( | ) | [package, virtual] |
doesn't display anything but dispatches control actions on other node inside the whole tree this is placed under up to getRoot(), on the client itself and its hud.
we just use the VisNode class to get a frequent update.
Implements org.hfbk.vis.visnode.VisNode.
Definition at line 85 of file Automator.java.
References org.hfbk.vis.visnode.Automator.ATTEND, org.hfbk.vis.visnode.VisHUD.clear(), org.hfbk.vis.visnode.VisRoot.client, org.hfbk.vis.VisClient.dt, org.hfbk.vis.visnode.Automator.FETCH, org.hfbk.vis.visnode.VisRoot.fetch(), org.hfbk.vis.visnode.Automator.FETCHED, org.hfbk.vis.visnode.Automator.focus, org.hfbk.vis.visnode.Automator.getRandomSource(), org.hfbk.vis.visnode.VisNode.getRoot(), org.hfbk.vis.VisClient.hud, org.hfbk.vis.visnode.Automator.IDLE, org.hfbk.vis.visnode.VisRoot.lastVisNode, org.hfbk.vis.VisClient.setViewpoint(), org.hfbk.vis.visnode.Automator.state, org.hfbk.vis.visnode.Automator.time, org.hfbk.vis.VisClient.transViewpoint, org.hfbk.vis.visnode.Automator.travel(), and org.hfbk.vis.visnode.VisNode.traverse().
Here is the call graph for this function:
void org.hfbk.vis.visnode.Automator.state | ( | int | newstate | ) | [package] |
Definition at line 141 of file Automator.java.
References org.hfbk.vis.visnode.Automator.state, and org.hfbk.vis.visnode.Automator.time.
smart randomly traverse the node tree, usually a short distance (go to parent node or some sibling for example.).
start | node to start travel |
Definition at line 155 of file Automator.java.
References org.hfbk.vis.visnode.Automator.comeFrom, org.hfbk.vis.visnode.Automator.getRandomChild(), org.hfbk.vis.visnode.VisNode.getRoot(), org.hfbk.vis.visnode.Automator.loveClass(), org.hfbk.vis.visnode.Automator.P_CHILD, org.hfbk.vis.visnode.Automator.P_PARENT, and org.hfbk.vis.visnode.VisNode.parent.
Referenced by org.hfbk.vis.visnode.Automator.renderSelf().
Here is the call graph for this function:
Here is the caller graph for this function:
Definition at line 197 of file Automator.java.
References org.hfbk.vis.visnode.VisNode.children.
Referenced by org.hfbk.vis.visnode.Automator.travel().
Here is the caller graph for this function:
String org.hfbk.vis.visnode.Automator.getRandomSource | ( | VisKeyword | kn | ) | [package] |
Definition at line 204 of file Automator.java.
References org.hfbk.vis.visnode.VisKeyword.menuitems.
Referenced by org.hfbk.vis.visnode.Automator.renderSelf().
Here is the caller graph for this function:
boolean org.hfbk.vis.visnode.Automator.loveClass | ( | Class | c | ) | [package] |
Definition at line 209 of file Automator.java.
References org.hfbk.vis.visnode.Automator.goodClasses.
Referenced by org.hfbk.vis.visnode.Automator.travel().
Here is the caller graph for this function:
VisNode org.hfbk.vis.visnode.Automator.focus [package] |
Definition at line 47 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.renderSelf().
final int org.hfbk.vis.visnode.Automator.IDLE = 1 [package] |
Definition at line 49 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.renderSelf().
final int org.hfbk.vis.visnode.Automator.ATTEND = 2 [package] |
Definition at line 49 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.renderSelf().
final int org.hfbk.vis.visnode.Automator.FETCH = 3 [package] |
Definition at line 49 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.renderSelf().
final int org.hfbk.vis.visnode.Automator.FETCHED = 4 [package] |
Definition at line 49 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.renderSelf().
int org.hfbk.vis.visnode.Automator.state = IDLE [package] |
Definition at line 50 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.renderSelf(), and org.hfbk.vis.visnode.Automator.state().
float org.hfbk.vis.visnode.Automator.time = 0 [package] |
Definition at line 52 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.renderSelf(), and org.hfbk.vis.visnode.Automator.state().
final float org.hfbk.vis.visnode.Automator.P_CHILD = .9f [package] |
some propabilities to tune behaviour
always set P_CHILD+P_PARENT > 1 or deadlocks may occur.
Definition at line 61 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.travel().
final float org.hfbk.vis.visnode.Automator.P_PARENT = .4f [package] |
Definition at line 61 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.travel().
final Class [] org.hfbk.vis.visnode.Automator.goodClasses [package] |
Initial value:
{ VisText.class, VisKeyword.class, VisImage.class, VisImagefield.class, VisKeycloud.class }
Definition at line 66 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.loveClass().
VisNode org.hfbk.vis.visnode.Automator.comeFrom = null [package] |
Definition at line 146 of file Automator.java.
Referenced by org.hfbk.vis.visnode.Automator.travel().