forest-net
an overlay networks for large-scale virtual worlds
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
AvatarStatus.java
1
package
mygame;
2
7
public
class
AvatarStatus
{
8
9
int
id;
// identifier - based on Avatar's Forest address
10
int
when;
// timestamp in ms
11
double
x;
// Avatar's x position
12
double
y;
// Avatar's y position
13
double
dir;
// direction facing (in degrees)
14
int
numVisible;
// number of visible Avatars
15
int
numNear;
// number of nearby Avatars
16
int
comtree;
// comtree that report relates to
17
22
public
void
copyFrom
(
AvatarStatus
other) {
23
id
= other.id;
24
when = other.when;
25
x = other.x;
26
y = other.y;
27
dir = other.dir;
28
numVisible = other.numVisible;
29
numNear = other.numNear;
30
comtree = other.comtree;
31
}
32
34
@Override
35
public
String
toString
() {
36
return
((
id
>> 16) & 0xffff) +
"."
+ (
id
& 0xffff)
37
+
" "
+ when +
" ("
+ x +
","
+ y +
")/"
+ dir +
" "
38
+ numVisible +
" "
+ numNear;
39
}
40
}
forest-net
cpp
vworld1
jmeDriveAvatar
AvatarStatus.java
Generated on Mon Aug 4 2014 11:13:36 for forest-net by
1.8.4