|
||||||||||
| 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.actor.Actor
com.threerings.tudey.data.actor.Mobile
public class Mobile
An actor capable of moving by itself.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
com.threerings.io.Streamable.Closure |
| Field Summary | |
|---|---|
static int |
LAST_FLAG
The value of the last flag defined in this class. |
static int |
MOVING
A flag indicating that the actor is in motion. |
| Fields inherited from class com.threerings.tudey.data.actor.Actor |
|---|
WARP |
| Constructor Summary | |
|---|---|
Mobile()
No-arg constructor for deserialization. |
|
Mobile(ConfigReference<ActorConfig> config,
int id,
int created,
Vector2f translation,
float rotation)
Creates a new mobile actor. |
|
| Method Summary | |
|---|---|
void |
addStepLimiter(StepLimiter limiter)
Adds a step limiter. |
Object |
copy(Object dest)
Creates a copy of this object, (re)populating the supplied destination object if possible. |
ActorAdvancer |
createAdvancer(ActorAdvancer.Environment environment,
int timestamp)
Creates an advancer for the actor. |
boolean |
equals(Object other)
|
Actor |
extrapolate(float elapsed,
int timestamp,
Actor result)
Extrapolates the state of this actor after the specified time interval, in seconds (which may be negative). |
float |
getDirection()
Returns the direction of motion. |
float |
getMaxStep()
Returns the max translation amount. |
float |
getMaxStepSquared()
Returns the max translation amount squared. |
float |
getSpeed()
Returns the (base) speed of the actor. |
int |
getTurnDirection()
Returns the direction of rotation (+1 if counterclockwise, -1 if clockwise, 0 if none). |
float |
getTurnRate()
Returns the rate of turning (radians per second). |
int |
hashCode()
|
void |
removeStepLimiter(StepLimiter limiter)
Removes a step limiter. |
void |
setDirection(float direction)
Sets the direction of motion. |
void |
setMaxStep(float maxStep)
Sets the max step amount. |
void |
step(float elapsed,
int timestamp)
Takes an Euler step of the specified duration. |
| Methods inherited from class com.threerings.tudey.data.actor.Actor |
|---|
canCollide, canCollide, clear, getCollisionFlags, getCollisionMask, getConfig, getCreated, getDestroyed, getFlags, getId, getOriginal, getPreloads, getRotation, getTranslation, init, interpolate, isClientControlled, isDirty, isSet, maybeCreateAdvancer, set, set, setConfig, setDestroyed, setDirty, setFlags, setRotation, setTranslation, toString |
| Methods inherited from class com.threerings.util.DeepObject |
|---|
clone, copy |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MOVING
public static final int LAST_FLAG
| Constructor Detail |
|---|
public Mobile(ConfigReference<ActorConfig> config,
int id,
int created,
Vector2f translation,
float rotation)
public Mobile()
| Method Detail |
|---|
public void setDirection(float direction)
public float getDirection()
public void setMaxStep(float maxStep)
public float getMaxStep()
public float getMaxStepSquared()
public int getTurnDirection()
public float getTurnRate()
public void addStepLimiter(StepLimiter limiter)
public void removeStepLimiter(StepLimiter limiter)
public float getSpeed()
public void step(float elapsed,
int timestamp)
timestamp - the timestamp at the end of the step.
public Actor extrapolate(float elapsed,
int timestamp,
Actor result)
Actor
extrapolate in class Actor
public ActorAdvancer createAdvancer(ActorAdvancer.Environment environment,
int timestamp)
Actor
createAdvancer in class Actorpublic Object copy(Object dest)
Copyable
copy in interface Copyablecopy in class Actorpublic boolean equals(Object other)
equals in class Actorpublic int hashCode()
hashCode in class Actor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||