com.threerings.miso.data
Class ObjectInfo

java.lang.Object
  extended by com.threerings.io.SimpleStreamableObject
      extended by com.threerings.miso.data.ObjectInfo
All Implemented Interfaces:
com.threerings.io.Streamable, Cloneable

public class ObjectInfo
extends com.threerings.io.SimpleStreamableObject
implements Cloneable

Contains information about an object in a Miso scene.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
com.threerings.io.Streamable.Closure
 
Field Summary
 String action
          The action associated with this object or null if it has no action.
 byte priority
          Don't access this directly unless you are serializing this instance.
 byte sorient
          The orientation of the "spot" associated with this object.
 byte sx
          A "spot" associated with this object (specified as an offset from the fine coordinates of the object's origin tile).
 byte sy
          A "spot" associated with this object (specified as an offset from the fine coordinates of the object's origin tile).
 int tileId
          The fully qualified object tile id.
 int x
          The x and y tile coordinates of the object.
 int y
          The x and y tile coordinates of the object.
 int zations
          Up to two colorization assignments for this object.
 
Constructor Summary
ObjectInfo()
          Zero argument constructor needed for unserialization.
ObjectInfo(int tileId, int x, int y)
          Convenience constructor.
ObjectInfo(ObjectInfo other)
          Creates an object info that is a copy of the supplied info.
 
Method Summary
 ObjectInfo clone()
           
 boolean equals(Object other)
           
 int getPrimaryZation()
          Returns the primary colorization assignment.
 int getPriority()
          Returns the render priority of this object tile.
 int getQuaternaryZation()
          Returns the quaternary colorization assignment.
 int getSecondaryZation()
          Returns the secondary colorization assignment.
 int getTertiaryZation()
          Returns the tertiary colorization assignment.
 int hashCode()
           
 boolean isInteresting()
          Returns true if this object info contains non-default data for anything other than the tile id and coordinates.
 void setZations(byte primary, byte secondary, byte tertiary, byte quaternary)
          Sets the primary and secondary colorization assignments.
 String tileIdToString()
          Enhances our SimpleStreamableObject.toString() output.
 
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

tileId

public int tileId
The fully qualified object tile id.


x

public int x
The x and y tile coordinates of the object.


y

public int y
The x and y tile coordinates of the object.


priority

public byte priority
Don't access this directly unless you are serializing this instance. Use getPriority() instead.


action

public String action
The action associated with this object or null if it has no action.


sx

public byte sx
A "spot" associated with this object (specified as an offset from the fine coordinates of the object's origin tile).


sy

public byte sy
A "spot" associated with this object (specified as an offset from the fine coordinates of the object's origin tile).


sorient

public byte sorient
The orientation of the "spot" associated with this object.


zations

public int zations
Up to two colorization assignments for this object.

Constructor Detail

ObjectInfo

public ObjectInfo(int tileId,
                  int x,
                  int y)
Convenience constructor.


ObjectInfo

public ObjectInfo(ObjectInfo other)
Creates an object info that is a copy of the supplied info.


ObjectInfo

public ObjectInfo()
Zero argument constructor needed for unserialization.

Method Detail

getPriority

public int getPriority()
Returns the render priority of this object tile.


getPrimaryZation

public int getPrimaryZation()
Returns the primary colorization assignment.


getSecondaryZation

public int getSecondaryZation()
Returns the secondary colorization assignment.


getTertiaryZation

public int getTertiaryZation()
Returns the tertiary colorization assignment.


getQuaternaryZation

public int getQuaternaryZation()
Returns the quaternary colorization assignment.


setZations

public void setZations(byte primary,
                       byte secondary,
                       byte tertiary,
                       byte quaternary)
Sets the primary and secondary colorization assignments.


isInteresting

public boolean isInteresting()
Returns true if this object info contains non-default data for anything other than the tile id and coordinates.


equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public ObjectInfo clone()
Overrides:
clone in class Object

tileIdToString

public String tileIdToString()
Enhances our SimpleStreamableObject.toString() output.