edu.stanford.hci.r3.pattern
Class TiledPattern
java.lang.Object
edu.stanford.hci.r3.pattern.TiledPattern
public class TiledPattern
- extends java.lang.Object
A TiledPatternGenerator can create a TiledPattern object, which allows you to iterate through the
object to find the dot pattern.
This class will also know the physical and logical coordinates of the pattern that it reads in.
This allows other classes to determine this information later on, for coordinate transformations,
etc.
This software is distributed under the BSD License.
Constructor Summary |
TiledPattern(PatternPackage thePatternPackage,
int initialPatternFileN,
int initialDotHorizOffset,
int initialDotVertOffset,
int numTilesNeededX,
int numTilesNeededY,
int numDotsXFromRightMostTiles,
int numDotsYFromBottomMostTiles)
The creator of this object has to calculate exactly how many dots it needs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TiledPattern
public TiledPattern(PatternPackage thePatternPackage,
int initialPatternFileN,
int initialDotHorizOffset,
int initialDotVertOffset,
int numTilesNeededX,
int numTilesNeededY,
int numDotsXFromRightMostTiles,
int numDotsYFromBottomMostTiles)
- The creator of this object has to calculate exactly how many dots it needs. This class doesn't
have smarts. It will give you exactly what you ask for.
- Parameters:
thePatternPackage
- initialPatternFileN
- initialDotHorizOffset
- initialDotVertOffset
- numTilesNeededX
- numTilesNeededY
- numDotsXFromRightMostTiles
- numDotsYFromBottomMostTiles
-
getInitialPatternFileNumber
public int getInitialPatternFileNumber()
- Returns:
- which file we will use to start looking for pattern.
getLastPatternFileUsed
public int getLastPatternFileUsed()
- Returns:
- which was the last file we took pattern from.
getNumDotsXFromRightMostTiles
public int getNumDotsXFromRightMostTiles()
getNumDotsXPerFullTile
public int getNumDotsXPerFullTile()
- Returns:
getNumDotsYFromBottomMostTiles
public int getNumDotsYFromBottomMostTiles()
getNumDotsYPerFullTile
public int getNumDotsYPerFullTile()
- Returns:
getNumHorizDotsBetweenTiles
public double getNumHorizDotsBetweenTiles()
- Returns:
getNumTilesX
public int getNumTilesX()
- Returns:
getNumTilesY
public int getNumTilesY()
- Returns:
getNumTotalColumns
public int getNumTotalColumns()
- Returns:
getNumTotalRows
public int getNumTotalRows()
- Returns:
- the number of rows of pattern this object represents
getNumVertDotsBetweenTiles
public double getNumVertDotsBetweenTiles()
- Returns:
getOriginXInDots
public double getOriginXInDots()
- Returns:
- X coordinate of the top of the tile.
getOriginYInDots
public double getOriginYInDots()
- Returns:
- Y coordinate of the top of the tile.
getPatternOnRow
public java.lang.String getPatternOnRow(int row)
- Parameters:
row
-
- Returns:
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()