|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.io.SimpleStreamableObject
com.threerings.stage.data.StageLocation
public class StageLocation
Contains information on a scene occupant's position and orientation.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
byte |
orient
The user's orientation (defined by DirectionCodes). |
int |
x
The user's x position (interpreted by the display system). |
int |
y
The user's y position (interpreted by the display system). |
| Constructor Summary | |
|---|---|
StageLocation()
A zero-argument constructor used when unserializing instances. |
|
StageLocation(int x,
int y,
byte orient)
Constructs a location with the specified coordinates and orientation. |
|
| Method Summary | |
|---|---|
StageLocation |
clone()
Locations are cloneable. |
boolean |
equals(Object other)
Location equality is determined by coordinates. |
boolean |
equivalent(Location oloc)
Location equivalence means that the coordinates and orientation are the same. |
Location |
getOpposite()
Get a new Location instance that is equals() to this one but that has an orientation facing the opposite direction. |
int |
hashCode()
Computes a reasonable hashcode for location instances. |
String |
orientToString()
Object.toString() helper function. |
| Methods inherited from class com.threerings.io.SimpleStreamableObject |
|---|
toString, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int x
public int y
public byte orient
DirectionCodes).
| Constructor Detail |
|---|
public StageLocation()
public StageLocation(int x,
int y,
byte orient)
| Method Detail |
|---|
public String orientToString()
Object.toString() helper function.
public Location getOpposite()
Location
getOpposite in interface Locationpublic boolean equivalent(Location oloc)
equivalent in interface Locationpublic boolean equals(Object other)
equals in interface Locationequals in class Objectpublic int hashCode()
hashCode in interface LocationhashCode in class Objectpublic StageLocation clone()
Location
clone in interface Locationclone in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||