cz.cuni.pogamut.MessageObjects
Class AutoTraceRay
java.lang.Object
cz.cuni.pogamut.MessageObjects.MessageObject
cz.cuni.pogamut.MessageObjects.AutoTraceRay
- All Implemented Interfaces:
- Visible, java.io.Serializable, java.lang.Cloneable
public class AutoTraceRay
- extends MessageObject
- implements java.io.Serializable, java.lang.Cloneable
AutoTraceRay notification message
contains:
- ID: id of the ray query
- from: location from which the ray is emitted
- to: location to which the ray is sended
- result: true if it hit something, false if not
- hitNormal: normal vector to the trace ray in the point of hit
- hitId: id of hitted actor
- hitLocation: point of the hit
- traceActors: whether to care about other actors in the game
- fastTrace: switch to fastTrace way of evaluation of trace
synchronous message - sended every turn
NOTE that it is not delta compressed
- See Also:
- Serialized Form
Constructor Summary |
AutoTraceRay()
|
AutoTraceRay(int ID,
java.lang.String UnrealID,
boolean visible,
Triple from,
Triple to,
boolean fastTrace,
boolean result,
Triple hitNormal,
Triple hitLocation,
boolean traceActors,
int hitID)
|
Method Summary |
java.lang.Object |
clone()
clone object - for hard copying |
boolean |
diff(MessageObject old)
change this object that all properties that are same as old will be set to null or 0 or similar. |
boolean |
hasID()
|
java.lang.String |
toString()
|
void |
update(MessageObject newMsgObj)
Writes non-null information from newMsgObj to current one. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
from
public Triple from
to
public Triple to
fastTrace
public boolean fastTrace
result
public boolean result
hitNormal
public Triple hitNormal
hitLocation
public Triple hitLocation
traceActors
public boolean traceActors
hitId
public int hitId
AutoTraceRay
public AutoTraceRay()
AutoTraceRay
public AutoTraceRay(int ID,
java.lang.String UnrealID,
boolean visible,
Triple from,
Triple to,
boolean fastTrace,
boolean result,
Triple hitNormal,
Triple hitLocation,
boolean traceActors,
int hitID)
clone
public java.lang.Object clone()
- Description copied from class:
MessageObject
- clone object - for hard copying
- Overrides:
clone
in class MessageObject
diff
public boolean diff(MessageObject old)
- Description copied from class:
MessageObject
- change this object that all properties that are same as old will be set to null or 0 or similar.
in case all properties are same as old, return false, else true.
If old differs from current, update old.
- Overrides:
diff
in class MessageObject
- Parameters:
old
- Object we use as reference for change.
- Returns:
- true if the objects are not different
update
public void update(MessageObject newMsgObj)
- Description copied from class:
MessageObject
- Writes non-null information from newMsgObj to current one.
Remember that you have to overide this method if you creates a new
descendant, so the Parser and Client can work correctly.
- Overrides:
update
in class MessageObject
hasID
public boolean hasID()
- Overrides:
hasID
in class MessageObject
toString
public java.lang.String toString()
- Overrides:
toString
in class MessageObject