Forest.
More...
|
void | simpleInitApp () |
|
void | onAction (String binding, boolean value, float tpf) |
| These are our custom actions triggered by key presses. More...
|
|
void | simpleUpdate (float tpf) |
| This is the main loop; Moving happens here, as does packet sending/receiving The second half is logic from the while(true) loop of ShowWorld.
|
|
void | sendStatus (int now) |
| send the current status of this avatar to the Forest network More...
|
|
Forest.PktBuffer | receive () |
| receive packet from Forest network More...
|
|
void | connect () |
| send connect packet to Forest network
|
|
void | disconnect () |
| send disconnect packet to Forest router
|
|
void | send (Forest.PktBuffer b, int length) |
| Send packet to proxy or Forest network. More...
|
|
void | sendCtlPkt2CC (boolean join, int comt) |
| Send packet to the comtree controller to leave/join a comtree. More...
|
|
boolean | isVis (int g1, int g2) |
|
boolean | linesIntersect (double ax, double ay, double bx, double by, double cx, double cy, double dx, double dy) |
|
void | readWalls () |
| read into the walls array from the mapfile
|
|
void | setupVisibility () |
| read the map file and create visibility sets as necessary
|
|
int | groupNum (int x1, int y1) |
|
void | unsubscribe (ArrayList< Integer > glist) |
| Send unsubscribe packet for all group numbers in glist.
|
|
void | subscribe (ArrayList< Integer > glist) |
|
void | updateSubs () |
|
void | draw (Forest.PktBuffer b) |
|
void | updateNearby (Forest.PktBuffer b) |
|
int | getX () |
|
int | getY () |
|
int | getDirection () |
| Computes direction based on physics directions. More...
|
|
|
static void | main (String[] args) |
|
|
void | login () |
|
void | setUpWalls () |
|
void | setUpLight () |
|
void | setUpKeys () |
| We over-write some navigational key mappings here, so we can add physics-controlled flying:
|
|
|
final boolean | LET_ME_FLY = false |
|
Spatial | sceneModel |
|
BulletAppState | bulletAppState |
|
RigidBodyControl | landscape |
|
CharacterControl | player |
|
Vector3f | walkDirection = new Vector3f() |
|
boolean | left = false |
|
int | comtree = 1001 |
|
HashMap< Integer, AvatarGraphic > | status |
|
HashSet< Integer > | recentIds |
|
int | idCounter |
|
SocketChannel | chan |
|
DatagramSocket | udpSock |
|
final int | CM_PORT = 30140 |
|
final int | CP_PORT = 30182 |
|
ByteBuffer | buf |
|
String | uname = "user" |
|
String | pword = "pass" |
|
int | rtrAdr |
|
int | myAdr |
|
int | rtrIpAdr |
|
int | ccAdr |
|
long | seqNum |
|
int[] | walls |
|
final int | GRID = 10000 |
|
final int | MAXNEAR = 1000 |
|
final int | STATUS_REPORT = 1 |
|
final int | UPDATE_PERIOD = 50 |
|
HashSet< Integer >[] | visSet |
|
HashSet< Integer > | mySubs |
|
HashMap< Integer, Integer > | nearAvatars |
|
HashMap< Integer, Integer > | visibleAvatars |
|
int | numNear |
|
int | numVisible |
|
boolean | waiting4comtCtl |
|
int | newcomt |
|
int | now |
|
int | nextTime |
|
int | cpIpAdr |
|
int | cpPort |
|
int | cpForestPort |
|
|
static int | worldSize |
|
static String | hostname |
|
static String | mapfile |
|
static int | myIpAdr |
|
static boolean | needCliProxy |
|
Forest.
- Author
- Logan Stafman
Definition at line 48 of file Main.java.
int mygame.Main.getDirection |
( |
) | |
|
|
inline |
Computes direction based on physics directions.
- Returns
- direction in degrees, 0 pointing upwards
Definition at line 1118 of file Main.java.
int mygame.Main.groupNum |
( |
int |
x1, |
|
|
int |
y1 |
|
) |
| |
|
inline |
- Parameters
-
x1 | current x in forest context |
y1 | current y in forest context |
- Returns
- multicast group number
Definition at line 930 of file Main.java.
boolean mygame.Main.isVis |
( |
int |
g1, |
|
|
int |
g2 |
|
) |
| |
|
inline |
- Parameters
-
g1 | is groupNum of one group |
g2 | is groupNum of the other group |
- Returns
- true if g1 can be seen from g2, false otherwise
Definition at line 672 of file Main.java.
boolean mygame.Main.linesIntersect |
( |
double |
ax, |
|
|
double |
ay, |
|
|
double |
bx, |
|
|
double |
by, |
|
|
double |
cx, |
|
|
double |
cy, |
|
|
double |
dx, |
|
|
double |
dy |
|
) |
| |
|
inline |
- Parameters
-
ax | x of point a on line 1 |
ay | y of point a on line 1 |
bx | x of point b on line 1 |
by | y of point b on line 1 |
cx | x of point c on line 2 |
cy | y of point c on line 2 |
dx | x of point d on line 2 |
dy | y of point d on line 2 |
- Returns
- true if the lines intersect, false otherwise
Definition at line 761 of file Main.java.
void mygame.Main.onAction |
( |
String |
binding, |
|
|
boolean |
value, |
|
|
float |
tpf |
|
) |
| |
|
inline |
These are our custom actions triggered by key presses.
We do not walk yet, we just keep track of the direction the user pressed.
Definition at line 416 of file Main.java.
Forest.PktBuffer mygame.Main.receive |
( |
) | |
|
|
inline |
receive packet from Forest network
- Returns
- the buffer of the new packet, or null if none is available
Definition at line 536 of file Main.java.
void mygame.Main.send |
( |
Forest.PktBuffer |
b, |
|
|
int |
length |
|
) |
| |
|
inline |
Send packet to proxy or Forest network.
- Parameters
-
b | buffer to be sent |
length | length of packet to be sent |
Definition at line 616 of file Main.java.
void mygame.Main.sendCtlPkt2CC |
( |
boolean |
join, |
|
|
int |
comt |
|
) |
| |
|
inline |
Send packet to the comtree controller to leave/join a comtree.
- Parameters
-
join | whether to join or leave comtree |
comt | the comtree to join or leave |
Definition at line 645 of file Main.java.
void mygame.Main.sendStatus |
( |
int |
now) | |
|
|
inline |
send the current status of this avatar to the Forest network
- Parameters
-
Definition at line 511 of file Main.java.
The documentation for this class was generated from the following file:
- forest-net/cpp/vworld1/jmeDriveAvatar/Main.java