|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.tile.TileSet
com.threerings.media.tile.SwissArmyTileSet
com.threerings.media.tile.ObjectTileSet
public class ObjectTileSet
The object tileset supports the specification of object information for object tiles in addition to all of the features of the swiss army tileset.
ObjectTile,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.media.tile.TileSet |
|---|
TileSet.Colorizer |
| Field Summary | |
|---|---|
protected String[][] |
_constraints
Lists of constraints associated with our tiles. |
protected int[] |
_oheights
The height (in tile units) of our object tiles. |
protected int[] |
_owidths
The width (in tile units) of our object tiles. |
protected byte[] |
_priorities
The default render priorities of our objects. |
protected byte[] |
_sorients
The orientation of the "spots" associated with our tiles. |
protected int[] |
_xorigins
The x offset in pixels to the origin of the tile images. |
protected short[] |
_xspots
The x offset to the "spots" associated with our tiles. |
protected int[] |
_yorigins
The y offset in pixels to the origin of the tile images. |
protected short[] |
_yspots
The y offset to the "spots" associated with our tiles. |
protected String[] |
_zations
Colorization classes that apply to our objects. |
static String |
ATTACH
A constraint prefix indicating that the object must be attached to a wall facing the suffixed direction (N, E, S, or W). |
static String |
LOW
The low suffix for walls and attachments. |
static String |
ON_SURFACE
A constraint indicating that the object must be placed on a surface. |
static String |
ON_WALL
A constraint prefix indicating that the object must be placed on a wall facing the suffixed direction (N, E, S, or W). |
static String |
SPACE
A constraint prefix indicating that the object must have empty space in the suffixed direction (N, E, S, or W). |
static String |
SURFACE
A constraint indicating that the object is a surface (e.g., table). |
static String |
WALL
A constraint prefix indicating that the object is a wall facing the suffixed direction (N, E, S, or W). |
| Fields inherited from class com.threerings.media.tile.SwissArmyTileSet |
|---|
_gapSize, _heights, _numTiles, _offsetPos, _tileCounts, _widths |
| Fields inherited from class com.threerings.media.tile.TileSet |
|---|
_atiles, _cacheStatThrottle, _imagePath, _improv, _key, _name |
| Constructor Summary | |
|---|---|
ObjectTileSet()
|
|
| Method Summary | |
|---|---|
protected Tile |
createTile()
Creates a blank tile of the appropriate type for this tileset. |
int |
getBaseHeight(int tileIdx)
Returns the base height for the specified object index. |
int |
getBaseWidth(int tileIdx)
Returns the base width for the specified object index. |
String[] |
getColorizations()
Returns the colorization classes that should be used to recolor objects in this tileset. |
protected Colorization[] |
getColorizations(int tileIndex,
TileSet.Colorizer rizer)
Returns colorizations for the specified tile image. |
String[] |
getConstraints(int tileIdx)
Returns the list of constraints associated with the specified tile index, or null if the index has no constraints. |
int |
getSpotOrient(int tileIdx)
Returns the orientation of the spot associated with the specified tile index. |
int |
getXSpot(int tileIdx)
Returns the x coordinate of the spot associated with the specified tile index. |
int |
getYSpot(int tileIdx)
Returns the y coordinate of the spot associated with the specified tile index. |
boolean |
hasConstraint(int tileIdx,
String constraint)
Checks whether the tile at the specified index has the given constraint. |
protected void |
initTile(Tile tile,
int tileIndex,
Colorization[] zations)
Initializes the supplied tile. |
void |
setColorizations(String[] zations)
Provides a set of colorization classes that apply to objects in this tileset. |
void |
setConstraints(String[][] constraints)
Sets the lists of constraints associated with our object tiles. |
void |
setObjectHeights(int[] objectHeights)
Sets the heights (in unit tile count) of the objects in this tileset. |
void |
setObjectWidths(int[] objectWidths)
Sets the widths (in unit tile count) of the objects in this tileset. |
void |
setPriorities(byte[] priorities)
Sets the default render priorities for our object tiles. |
void |
setSpotOrients(byte[] sorients)
Sets the orientation of the "spots" associated with our object tiles. |
void |
setXOrigins(int[] xorigins)
Sets the x offset in pixels to the image origin. |
void |
setXSpots(short[] xspots)
Sets the x offset to the "spots" associated with our object tiles. |
void |
setYOrigins(int[] yorigins)
Sets the y offset in pixels to the image origin. |
void |
setYSpots(short[] yspots)
Sets the y offset to the "spots" associated with our object tiles. |
protected void |
toString(StringBuilder buf)
Derived classes can override this, calling super.toString(buf) and then
appending additional information to the buffer. |
| Methods inherited from class com.threerings.media.tile.SwissArmyTileSet |
|---|
computeTileBounds, computeTileCount, getHeights, getTileCount, getTileCounts, getWidths, setGapSize, setHeights, setOffsetPos, setTileCounts, setWidths |
| Methods inherited from class com.threerings.media.tile.TileSet |
|---|
checkTileIndex, clone, clone, getImagePath, getName, getRawTileImage, getRawTileSetImage, getTile, getTile, getTile, getTileMirage, getTileMirage, getTileMirages, reportCachePerformance, setImagePath, setImageProvider, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String SPACE
public static final String SURFACE
public static final String ON_SURFACE
public static final String WALL
public static final String ON_WALL
public static final String ATTACH
public static final String LOW
protected int[] _owidths
protected int[] _oheights
protected int[] _xorigins
protected int[] _yorigins
protected byte[] _priorities
protected String[] _zations
protected short[] _xspots
protected short[] _yspots
protected byte[] _sorients
protected String[][] _constraints
| Constructor Detail |
|---|
public ObjectTileSet()
| Method Detail |
|---|
public void setObjectWidths(int[] objectWidths)
setObjectHeights(int[]).
public void setObjectHeights(int[] objectHeights)
setObjectWidths(int[]).
public void setXOrigins(int[] xorigins)
public void setYOrigins(int[] yorigins)
public void setPriorities(byte[] priorities)
public void setColorizations(String[] zations)
public void setXSpots(short[] xspots)
public void setYSpots(short[] yspots)
public void setSpotOrients(byte[] sorients)
public void setConstraints(String[][] constraints)
public int getXSpot(int tileIdx)
public int getYSpot(int tileIdx)
public int getSpotOrient(int tileIdx)
public String[] getConstraints(int tileIdx)
null if the index has no constraints.
public boolean hasConstraint(int tileIdx,
String constraint)
public String[] getColorizations()
RecolorableTileSet
getColorizations in interface RecolorableTileSetpublic int getBaseWidth(int tileIdx)
BaseSizableTileSet
getBaseWidth in interface BaseSizableTileSetpublic int getBaseHeight(int tileIdx)
BaseSizableTileSet
getBaseHeight in interface BaseSizableTileSetprotected void toString(StringBuilder buf)
TileSetsuper.toString(buf) and then
appending additional information to the buffer.
toString in class SwissArmyTileSet
protected Colorization[] getColorizations(int tileIndex,
TileSet.Colorizer rizer)
TileSetTileSet.clone(Colorization[]),
however derived classes may have dynamic colorization policies that look up colorization
assignments from the supplied colorizer.
getColorizations in class TileSetprotected Tile createTile()
TileSet
createTile in class TileSet
protected void initTile(Tile tile,
int tileIndex,
Colorization[] zations)
TileSetsuper.initTile().
initTile in class TileSettile - the tile to initialize.tileIndex - the index of the tile.zations - the colorizations to be used when generating the tile image.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||