com.threerings.cast
Class CharacterDescriptor

java.lang.Object
  extended by com.threerings.cast.CharacterDescriptor

public class CharacterDescriptor
extends Object

The character descriptor object details the components that are pieced together to create a single character image.


Field Summary
protected  int[] _components
          The component identifiers comprising the character.
protected  Point[] _xlations
          The translations to apply when compositing this character.
protected  Colorization[][] _zations
          The colorizations to apply when compositing this character.
 
Constructor Summary
CharacterDescriptor(int[] components, Colorization[][] zations)
          Constructs a character descriptor.
 
Method Summary
 boolean equals(Object other)
           
 Colorization[][] getColorizations()
          Returns an array of colorization arrays to be applied to the components when compositing action images (one array per component).
 int[] getComponentIds()
          Returns an array of the component identifiers comprising the character described by this descriptor.
 Point[] getTranslations()
          Returns the array of translations to be applied to the components when compositing action images.
 int hashCode()
           
 void setColorizations(Colorization[][] zations)
          Updates the colorizations to be used by this character descriptor.
 void setTranslations(Point[] xlations)
          Updates the translations to be used by this character descriptor.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_components

protected int[] _components
The component identifiers comprising the character.


_zations

protected Colorization[][] _zations
The colorizations to apply when compositing this character.


_xlations

protected Point[] _xlations
The translations to apply when compositing this character.

Constructor Detail

CharacterDescriptor

public CharacterDescriptor(int[] components,
                           Colorization[][] zations)
Constructs a character descriptor.

Parameters:
components - the component ids of the individual components that make up this character.
zations - the colorizations to apply to each of the character component images when compositing actions (an array of colorizations for each component, elements of which can be null to make it easier to support per-component specialized colorizations). This can be null if image recolorization is not desired.
Method Detail

getComponentIds

public int[] getComponentIds()
Returns an array of the component identifiers comprising the character described by this descriptor.


getColorizations

public Colorization[][] getColorizations()
Returns an array of colorization arrays to be applied to the components when compositing action images (one array per component).


setColorizations

public void setColorizations(Colorization[][] zations)
Updates the colorizations to be used by this character descriptor.


getTranslations

public Point[] getTranslations()
Returns the array of translations to be applied to the components when compositing action images.


setTranslations

public void setTranslations(Point[] xlations)
Updates the translations to be used by this character descriptor.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

toString

public String toString()
Overrides:
toString in class Object