|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.util.DeepObject
com.threerings.tudey.data.InputFrame
public class InputFrame
Represents a single frame of user input.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
protected float |
_direction
The direction of movement requested by the user. |
protected int |
_flags
The user's input flags. |
protected float |
_rotation
The rotation requested by the user. |
protected int |
_timestamp
The timestamp of the input frame. |
protected Vector2f |
_translation
The user's computed translation. |
static int |
LAST_FLAG
The value of the last flag defined in this class. |
static int |
MOVE
Indicates that the user wants to move. |
| Constructor Summary | |
|---|---|
InputFrame()
No-arg constructor for deserialization. |
|
InputFrame(int timestamp,
float rotation,
float direction,
int flags)
Creates a new input frame. |
|
| Method Summary | |
|---|---|
int |
getApproximateSize()
Returns the approximate size of the frame in bytes (including its two-byte class code). |
float |
getDirection()
Returns the direction of movement requested by the user. |
int |
getFlags()
Returns the user's input flags. |
float |
getRotation()
Returns the rotation requested by the user. |
int |
getTimestamp()
Returns the timestamp of this frame. |
Vector2f |
getTranslation()
Returns a reference to the computed translation. |
boolean |
isSet(int flag)
Determines whether a flag is set. |
void |
readObject(ObjectInputStream in)
Custom deserialization method. |
void |
setTranslation(Vector2f translation)
Sets the computed translation reference. |
String |
toString()
|
void |
writeObject(ObjectOutputStream out)
Custom serialization method. |
| Methods inherited from class com.threerings.util.DeepObject |
|---|
clone, copy, copy, equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MOVE
public static final int LAST_FLAG
protected int _timestamp
protected transient Vector2f _translation
protected float _rotation
protected float _direction
protected int _flags
| Constructor Detail |
|---|
public InputFrame(int timestamp,
float rotation,
float direction,
int flags)
public InputFrame()
| Method Detail |
|---|
public int getTimestamp()
public void setTranslation(Vector2f translation)
public Vector2f getTranslation()
public float getRotation()
public float getDirection()
public int getFlags()
public boolean isSet(int flag)
public int getApproximateSize()
public void writeObject(ObjectOutputStream out)
throws IOException
IOException
public void readObject(ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundExceptionpublic String toString()
toString in class DeepObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||