com.threerings.tudey.config
Class GroundConfig.Original

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.tudey.config.GroundConfig.Implementation
          extended by com.threerings.tudey.config.GroundConfig.Original
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Enclosing class:
GroundConfig

public static class GroundConfig.Original
extends GroundConfig.Implementation

An original ground implementation.


Field Summary
 ConfigReference<GroundConfig> base
          The base ground type, if any.
 GroundConfig.EdgeCase[] edgeCases
          The edge cases (in order of priority).
 boolean extendEdge
          Whether or not to extend the edge.
 PaintableConfig.Tile[] floor
          The floor tiles.
 int priority
          The priority of this ground type.
 
Constructor Summary
GroundConfig.Original()
           
 
Method Summary
 TudeySceneModel.TileEntry createEdge(ConfigManager cfgmgr, IntTuple caseRotations, int maxWidth, int maxHeight, int elevation)
          Creates a new edge tile with the supplied case/rotations and maximum dimensions.
 TudeySceneModel.TileEntry createFloor(ConfigManager cfgmgr, int maxWidth, int maxHeight, int elevation)
          Creates a new floor tile with the supplied maximum dimensions.
 IntTuple getEdgeCaseRotations(TudeySceneModel scene, ConfigReference<GroundConfig> ref, int x, int y, int elevation)
          Determines the case and allowed rotations of the edge tile that matches the specified pattern.
 GroundConfig.Original getOriginal(ConfigManager cfgmgr)
          Returns a reference to the config's underlying original implementation.
 void getUpdateReferences(ConfigReferenceSet refs)
          Adds the implementation's update references to the provided set.
 void invalidate()
          Invalidates any cached data.
 boolean isEdge(TudeySceneModel.TileEntry entry, int elevation)
          Checks whether the specified entry matches any edge case.
 boolean isEdge(TudeySceneModel.TileEntry entry, IntTuple caseRotations, int elevation)
          Checks whether the specified entry qualifies as an edge tile.
 boolean isFloor(TudeySceneModel scene, ConfigReference<GroundConfig> ref, int x, int y, int elevation)
          Checks whether the specified location qualifies as a floor tile.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

priority

@Editable(hgroup="p")
public int priority
The priority of this ground type.


extendEdge

@Editable(hgroup="p")
public boolean extendEdge
Whether or not to extend the edge.


base

@Editable(nullable=true)
public ConfigReference<GroundConfig> base
The base ground type, if any.


floor

@Editable
public PaintableConfig.Tile[] floor
The floor tiles.


edgeCases

@Editable
public GroundConfig.EdgeCase[] edgeCases
The edge cases (in order of priority).

Constructor Detail

GroundConfig.Original

public GroundConfig.Original()
Method Detail

isFloor

public boolean isFloor(TudeySceneModel scene,
                       ConfigReference<GroundConfig> ref,
                       int x,
                       int y,
                       int elevation)
Checks whether the specified location qualifies as a floor tile.

Parameters:
scene - the scene model to check.
ref - the config reference of this ground config.
elevation - the elevation of the brush.

createFloor

public TudeySceneModel.TileEntry createFloor(ConfigManager cfgmgr,
                                             int maxWidth,
                                             int maxHeight,
                                             int elevation)
Creates a new floor tile with the supplied maximum dimensions.


isEdge

public boolean isEdge(TudeySceneModel.TileEntry entry,
                      int elevation)
Checks whether the specified entry matches any edge case.


isEdge

public boolean isEdge(TudeySceneModel.TileEntry entry,
                      IntTuple caseRotations,
                      int elevation)
Checks whether the specified entry qualifies as an edge tile.


getEdgeCaseRotations

public IntTuple getEdgeCaseRotations(TudeySceneModel scene,
                                     ConfigReference<GroundConfig> ref,
                                     int x,
                                     int y,
                                     int elevation)
Determines the case and allowed rotations of the edge tile that matches the specified pattern.


createEdge

public TudeySceneModel.TileEntry createEdge(ConfigManager cfgmgr,
                                            IntTuple caseRotations,
                                            int maxWidth,
                                            int maxHeight,
                                            int elevation)
Creates a new edge tile with the supplied case/rotations and maximum dimensions.


getUpdateReferences

public void getUpdateReferences(ConfigReferenceSet refs)
Description copied from class: GroundConfig.Implementation
Adds the implementation's update references to the provided set.

Overrides:
getUpdateReferences in class GroundConfig.Implementation

getOriginal

public GroundConfig.Original getOriginal(ConfigManager cfgmgr)
Description copied from class: GroundConfig.Implementation
Returns a reference to the config's underlying original implementation.

Specified by:
getOriginal in class GroundConfig.Implementation

invalidate

public void invalidate()
Description copied from class: GroundConfig.Implementation
Invalidates any cached data.

Overrides:
invalidate in class GroundConfig.Implementation


Copyright © 2011. All Rights Reserved.