|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectviewer.Interaction
public class Interaction
Bridges the gap between input and the functions that need to be called to interact with the viewer.
| Field Summary | |
|---|---|
static int |
LOOK_DOWN
|
static int |
LOOK_LEFT
|
static int |
LOOK_RIGHT
|
static int |
LOOK_UP
|
static int |
MOVE_BACKWARD
|
static int |
MOVE_FORWARD
|
static int |
MOVE_LEFT
|
static int |
MOVE_RIGHT
|
| Constructor Summary | |
|---|---|
Interaction(Viewer viewer,
GLViewer glViewer,
Console console,
Options options,
Client client)
create a new interaction instance and establish to links to everything it might interact with |
|
| Method Summary | |
|---|---|
void |
attachInteractionListener(InteractionListener interactionListener)
add an interaction listener to since we have to send some commands there |
void |
decreaseSensitivity()
Decrease the sensitivity of movement |
void |
execute(java.lang.String command)
parse and execute a command |
void |
executeFile(java.lang.String filename)
execute all commands in a file |
int |
getHeight()
get the height of the glCanvas |
double |
getSensitivity()
Return the current sensitivity setting |
int |
getWidth()
get the width of the glCanvas |
void |
increaseSensitivity()
Increase the sensitivity of movement |
void |
move(int dir,
boolean state)
move in a certain direction |
void |
quit()
we probably want to quit in some way |
void |
say(java.lang.String text)
simply print something to stdout |
void |
serverExecute(java.lang.String command)
parse commands the server send us mostly just send them to execute, but we might not want to execute all commands the server sends us |
void |
setFreeMove(java.lang.String enable)
allow or disallow the user to move in the z-dimension |
void |
setSensitivity(double sens)
set the sensitivity to a specific amount |
void |
spawn()
go back to the spawn (start) point |
void |
takeScreenshot()
Take a screenshot |
void |
toggleConsole()
toggle whether to display the console or not |
void |
toggleOptions()
toggle whether to display the options pane or not |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MOVE_FORWARD
public static final int MOVE_BACKWARD
public static final int MOVE_RIGHT
public static final int MOVE_LEFT
public static final int LOOK_UP
public static final int LOOK_DOWN
public static final int LOOK_RIGHT
public static final int LOOK_LEFT
| Constructor Detail |
|---|
public Interaction(Viewer viewer,
GLViewer glViewer,
Console console,
Options options,
Client client)
| Method Detail |
|---|
public void attachInteractionListener(InteractionListener interactionListener)
interactionListener - the interactionListeer to attach topublic void executeFile(java.lang.String filename)
filename - the name of the file to executepublic void serverExecute(java.lang.String command)
command - the command to executepublic void execute(java.lang.String command)
command - the command to executepublic void say(java.lang.String text)
text -
public void move(int dir,
boolean state)
dir - the direction to movestate - true if we should move in that directionpublic void spawn()
public void toggleConsole()
public void toggleOptions()
public int getHeight()
public int getWidth()
public double getSensitivity()
public void setSensitivity(double sens)
sens - the level to set the sensitivity atpublic void increaseSensitivity()
public void decreaseSensitivity()
public void takeScreenshot()
public void quit()
public void setFreeMove(java.lang.String enable)
enable - true to allow movement along the z-axis
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||