|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.tudey.util.TilePainter
public class TilePainter
Encapsulates the logic used to "paint" ground and wall tiles.
| Field Summary | |
|---|---|
protected ConfigManager |
_cfgmgr
The config manager used to resolve configuration references. |
protected EntryManipulator |
_manipulator
The object used to modify the entries. |
protected TudeySceneModel |
_scene
The scene into which we paint. |
| Constructor Summary | |
|---|---|
TilePainter(ConfigManager cfgmgr,
TudeySceneModel scene,
EntryManipulator manipulator)
Creates a new tile painter. |
|
| Method Summary | |
|---|---|
protected void |
addEntry(TudeySceneModel.TileEntry entry,
Rectangle region,
TudeySceneModel.Paint paint)
Adds the specified entry, removing any entries underneath it. |
protected void |
paintFloor(CoordSet coords,
ConfigReference<GroundConfig> ground,
int elevation)
Paints floor tiles in the specified region. |
void |
paintGround(CoordSet coords,
ConfigReference<GroundConfig> ground,
int elevation)
Paints the specified coordinates with ground. |
void |
paintGround(CoordSet coords,
ConfigReference<GroundConfig> ground,
int elevation,
boolean erase,
boolean revise)
Paints the specified coordinates with ground. |
void |
paintWall(CoordSet coords,
ConfigReference<WallConfig> wall,
int elevation)
Paints the specified coordinates with wall. |
void |
paintWall(CoordSet coords,
ConfigReference<WallConfig> wall,
int elevation,
boolean erase,
boolean revise)
Paints the specified coordinates with wall. |
protected void |
removeEntries(CoordSet coords)
Removes all entries intersecting the given coordinates. |
protected void |
removeEntries(Rectangle region)
Removes all entries within the specified region. |
protected void |
updateGroundEdges(CoordSet coords,
CoordSet inner,
ConfigReference<GroundConfig> ground,
int elevation,
boolean revise)
Updates the edge tiles in the specified coordinate set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ConfigManager _cfgmgr
protected TudeySceneModel _scene
protected EntryManipulator _manipulator
| Constructor Detail |
|---|
public TilePainter(ConfigManager cfgmgr,
TudeySceneModel scene,
EntryManipulator manipulator)
| Method Detail |
|---|
public void paintGround(CoordSet coords,
ConfigReference<GroundConfig> ground,
int elevation)
public void paintGround(CoordSet coords,
ConfigReference<GroundConfig> ground,
int elevation,
boolean erase,
boolean revise)
erase - if true, erase the ground within the coordinates.revise - if true, replace existing tiles with new variants.
public void paintWall(CoordSet coords,
ConfigReference<WallConfig> wall,
int elevation)
public void paintWall(CoordSet coords,
ConfigReference<WallConfig> wall,
int elevation,
boolean erase,
boolean revise)
erase - if true, erase the wall within the coordinates.revise - if true, replace existing tiles with new variants.
protected void paintFloor(CoordSet coords,
ConfigReference<GroundConfig> ground,
int elevation)
protected void updateGroundEdges(CoordSet coords,
CoordSet inner,
ConfigReference<GroundConfig> ground,
int elevation,
boolean revise)
inner - the inner region to exclude from the update.
protected void addEntry(TudeySceneModel.TileEntry entry,
Rectangle region,
TudeySceneModel.Paint paint)
protected void removeEntries(Rectangle region)
protected void removeEntries(CoordSet coords)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||