map
Class GameMap

java.lang.Object
  extended by map.GameMap

public class GameMap
extends java.lang.Object

Author:
Shannon Smith

Constructor Summary
GameMap(java.lang.String name, int size)
           
 
Method Summary
 void addBaseLocation(java.lang.String player, int x, int y)
           
 void addPlayerTemplate(java.lang.String name)
           
 boolean canLand(float x, float y)
           
 java.util.List<Base> createPlayerBases(Player player, java.lang.String id, ResourceManager res)
           
 void draw(Camera cam)
           
 void drawWater()
           
 void generateMesh()
           
 Material getGroundMaterial()
           
 float getHeightAt(float x, float y)
           
 int getMaxPlayers()
           
 Material getMinimap()
           
 int getMinPlayers()
           
 java.lang.String getName()
           
 Vector3f getNormalAt(float x, float y)
           
 void getNormalAt(float x, float y, Vector3f norm)
           
 java.util.Collection<java.lang.String> getPlayerTemplates()
           
 int getSize()
           
 Tile getTile(int x, int y)
           
 Tile getTileAt(float x, float y)
           
 Tile getTileNeighbour(Tile tile, GameMath.MapDir dir)
           
 boolean isInMap(float x, float y)
           
 void setGroundMaterial(Material material)
           
 void setHomeBaseLocation(java.lang.String player, int x, int y)
           
 void setWaterMaterial(Material material)
           
 Vector3f testCollision(Vector3f p1, Vector3f p2)
           
 java.lang.String toString()
           
 float weight(float value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GameMap

public GameMap(java.lang.String name,
               int size)
Method Detail

getMinPlayers

public int getMinPlayers()

getMinimap

public Material getMinimap()

getMaxPlayers

public int getMaxPlayers()

getPlayerTemplates

public java.util.Collection<java.lang.String> getPlayerTemplates()

createPlayerBases

public java.util.List<Base> createPlayerBases(Player player,
                                              java.lang.String id,
                                              ResourceManager res)
                                       throws ResourceNotFoundException
Throws:
ResourceNotFoundException

addPlayerTemplate

public void addPlayerTemplate(java.lang.String name)

setHomeBaseLocation

public void setHomeBaseLocation(java.lang.String player,
                                int x,
                                int y)

addBaseLocation

public void addBaseLocation(java.lang.String player,
                            int x,
                            int y)

getGroundMaterial

public Material getGroundMaterial()

setGroundMaterial

public void setGroundMaterial(Material material)

setWaterMaterial

public void setWaterMaterial(Material material)

getSize

public int getSize()

getName

public java.lang.String getName()

generateMesh

public void generateMesh()

getNormalAt

public void getNormalAt(float x,
                        float y,
                        Vector3f norm)

getNormalAt

public Vector3f getNormalAt(float x,
                            float y)

getHeightAt

public float getHeightAt(float x,
                         float y)

isInMap

public boolean isInMap(float x,
                       float y)

getTile

public Tile getTile(int x,
                    int y)

getTileNeighbour

public Tile getTileNeighbour(Tile tile,
                             GameMath.MapDir dir)

getTileAt

public Tile getTileAt(float x,
                      float y)

weight

public float weight(float value)

testCollision

public Vector3f testCollision(Vector3f p1,
                              Vector3f p2)

draw

public void draw(Camera cam)

drawWater

public void drawWater()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

canLand

public boolean canLand(float x,
                       float y)