|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.presents.dobj.DEvent
com.threerings.tudey.dobj.SceneDeltaEvent
public class SceneDeltaEvent
Represents an update to the dynamic state of the scene. Each delta represents difference between the current state and the last state (either the baseline state or the result of applying the last acknowledged delta). These events are published on the client object, rather than the scene object, because they are targeted at specific clients.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
protected int |
_acknowledge
The timestamp of the latest input frame received by the server. |
protected Actor[] |
_addedActors
The actors added to the scene since the referenced update (or null). |
protected Effect[] |
_effectsFired
The effects fired since the last delta (or null). |
protected short |
_elapsed
The amount of time elapsed since the previous tick. |
protected short |
_ping
The estimated ping time. |
protected int |
_reference
The timestamp of the update that serves as a basis of comparison for this delta (either the last delta known to be acknowledged by the client, or 0 for the baseline). |
protected int[] |
_removedActorIds
The ids of the actors removed since the referenced update (or null). |
protected int |
_sceneOid
The oid of the scene to which this event applies. |
protected int |
_timestamp
The timestamp of the delta. |
protected ActorDelta[] |
_updatedActorDeltas
The deltas of the actors updated since the referenced update (or null
|
| Fields inherited from class com.threerings.presents.dobj.DEvent |
|---|
_actualTransport, _soid, _toid, _transport, eventId, UNSET_OLD_ENTRY, UNSET_OLD_VALUE |
| Constructor Summary | |
|---|---|
SceneDeltaEvent(int targetOid,
int sceneOid,
int acknowledge,
short ping,
int reference,
int timestamp,
short elapsed,
Actor[] addedActors,
ActorDelta[] updatedActorDeltas,
int[] removedActorIds,
Effect[] effectsFired)
Creates a new delta event. |
|
| Method Summary | |
|---|---|
boolean |
applyToObject(DObject target)
|
int |
getAcknowledge()
Returns the timestamp of the last input frame received by the server. |
Actor[] |
getAddedActors()
Returns a reference to the array of actors added to the scene since the last delta, or null for none. |
Effect[] |
getEffectsFired()
Returns the array of effects fired since the last delta, or null for none. |
short |
getElapsed()
Returns the time elapsed since the last tick. |
short |
getPing()
Returns the ping time estimate. |
int |
getReference()
Returns the timestamp of the update that serves as a basis of comparison for this delta (either the last delta known to be acknowledged by the client, or 0 for the baseline). |
int[] |
getRemovedActorIds()
Returns a reference to the array of ids of actors removed from the scene since the last delta, or null for none. |
int |
getSceneOid()
Returns the oid of the scene to which this delta applies. |
int |
getTimestamp()
Returns the timestamp of the delta. |
ActorDelta[] |
getUpdatedActorDeltas()
Returns a reference to the array of deltas for actors updated since the last delta, or null for none. |
protected void |
notifyListener(Object listener)
|
protected void |
toString(StringBuilder buf)
|
| Methods inherited from class com.threerings.presents.dobj.DEvent |
|---|
alreadyApplied, getActualTransport, getSourceOid, getTargetOid, getTransport, isPrivate, noteActualTransport, readField__toid, setSourceOid, setTargetOid, setTransport, toString, writeField__toid |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int _sceneOid
protected int _acknowledge
protected short _ping
protected int _reference
protected int _timestamp
protected short _elapsed
protected Actor[] _addedActors
null).
protected ActorDelta[] _updatedActorDeltas
null
protected int[] _removedActorIds
null).
protected Effect[] _effectsFired
null).
| Constructor Detail |
|---|
public SceneDeltaEvent(int targetOid,
int sceneOid,
int acknowledge,
short ping,
int reference,
int timestamp,
short elapsed,
Actor[] addedActors,
ActorDelta[] updatedActorDeltas,
int[] removedActorIds,
Effect[] effectsFired)
| Method Detail |
|---|
public int getSceneOid()
public int getAcknowledge()
public short getPing()
public int getReference()
public int getTimestamp()
public short getElapsed()
public Actor[] getAddedActors()
null for none.
public ActorDelta[] getUpdatedActorDeltas()
null for none.
public int[] getRemovedActorIds()
null for none.
public Effect[] getEffectsFired()
null for none.
public boolean applyToObject(DObject target)
throws ObjectAccessException
applyToObject in class DEventObjectAccessExceptionprotected void notifyListener(Object listener)
notifyListener in class DEventprotected void toString(StringBuilder buf)
toString in class DEvent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||