be.saltwater.jaqel.maze
Class Tile

java.lang.Object
  extended bybe.saltwater.jaqel.loaders.ModelLoader
      extended bybe.saltwater.jaqel.maze.Tile

public class Tile
extends ModelLoader

Represents a type for a tile in a maze. The type determines whether or not a creature can walk on tile or not (the passability) and the visual representation (the geometry and appearance). This is a immutable class, it cannot be changed after it is constructed.

Author:
Bruno Windels
See Also:
TileSet, Maze

Constructor Summary
Tile(javax.media.j3d.Shape3D shape, boolean passable)
          Constructs a tile from an existing visual representation (Shape3D).
Tile(java.lang.String filename, boolean passable)
          Create a new tile, this will probably only be used by TileSetLoader's implementations
 
Method Summary
 javax.media.j3d.Shape3D getShape3D()
          Returns the visual representation for this tile type.
 boolean isPassable()
          Can a creature walk of this sort of tile?
 
Methods inherited from class be.saltwater.jaqel.loaders.ModelLoader
loadAppearance, loadGeometryArray, loadScene, loadShape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tile

public Tile(java.lang.String filename,
            boolean passable)
     throws java.io.FileNotFoundException,
            com.sun.j3d.loaders.ParsingErrorException
Create a new tile, this will probably only be used by TileSetLoader's implementations

Parameters:
filename - The WaveFront file that contains the 3D shape, it will be loaded in the constructor.
passable - Can a creature walk on this type of tile?
Throws:
java.io.FileNotFoundException - When the file is not found
com.sun.j3d.loaders.ParsingErrorException - When the file was found but it could not be parsed because the file is of the wrong format.

Tile

public Tile(javax.media.j3d.Shape3D shape,
            boolean passable)
Constructs a tile from an existing visual representation (Shape3D).

Parameters:
shape - The visual representation of this tile.
passable - Can a creature walk on this type of tile?
Method Detail

getShape3D

public javax.media.j3d.Shape3D getShape3D()
Returns the visual representation for this tile type. This is used by Java3D.


isPassable

public boolean isPassable()
Can a creature walk of this sort of tile?