|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.cast.ComponentClass
public class ComponentClass
Denotes a class of components to which CharacterComponent
objects belong. Examples include "Hat", "Head", and "Feet". A component
class dictates a component's rendering priority so that components can
be rendered in an order that causes them to overlap properly.
Components support render priority overrides for particular actions, orientations or combinations of actions and orientations. The system is currently structured with the expectation that the overrides will be relatively few (less than fifteen, say) for any given component class. A system that relied on many overrides for its components would want to implement a more scalable algorithm for determining which, if any, override matches a particular action and orientation combination.
| Nested Class Summary | |
|---|---|
static class |
ComponentClass.PriorityOverride
Used to effect custom render orders for particular actions, orientations, etc. |
| Field Summary | |
|---|---|
protected ComparableArrayList<ComponentClass.PriorityOverride> |
_overrides
A list of render priority overrides. |
String[] |
colors
The color classes to use when recoloring components of this class. |
String |
mask
The class name of the layer from which this component class obtains a mask to limit rendering to certain areas. |
String |
name
The component class name. |
int |
renderPriority
The default render priority. |
String |
shadow
Indicates the class name of the shadow layer to which this component class contributes a shadow. |
float |
shadowAlpha
1.0 for a normal component, the alpha value of the pre-composited shadow for the special "shadow" component class. |
boolean |
translate
Whether or not components of this class will have translations applied. |
| Constructor Summary | |
|---|---|
ComponentClass()
Creates an uninitialized instance suitable for unserialization or population during XML parsing. |
|
| Method Summary | |
|---|---|
void |
addPriorityOverride(ComponentClass.PriorityOverride override)
Adds the supplied render priority override record to this component class. |
boolean |
equals(Object other)
Classes with the same name are the same. |
int |
getRenderPriority(String action,
int orientation)
Deprecated. |
int |
getRenderPriority(String action,
String component,
int orientation)
Returns the render priority appropriate for the specified action, orientation and component. |
int |
hashCode()
Hashcode is based on component class name. |
boolean |
isShadow()
Returns true if this component class is a shadow layer rather than a normal component class. |
boolean |
isShadowed()
Returns true if this component class contributes a shadow to a particular shadow layer. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public String name
public int renderPriority
public String[] colors
public String mask
public String shadow
public float shadowAlpha
public boolean translate
protected ComparableArrayList<ComponentClass.PriorityOverride> _overrides
| Constructor Detail |
|---|
public ComponentClass()
| Method Detail |
|---|
@Deprecated
public int getRenderPriority(String action,
int orientation)
getRenderPriority(String, String, int)
to handle potential per-component priority overrides.
public int getRenderPriority(String action,
String component,
int orientation)
public void addPriorityOverride(ComponentClass.PriorityOverride override)
public boolean isShadowed()
isShadow().
public boolean isShadow()
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||