es.ucm.look.data
Class World

java.lang.Object
  extended by es.ucm.look.data.World

public class World
extends java.lang.Object

The world containing all the data to be represented


Constructor Summary
World()
          Constructs an empty world
 
Method Summary
 void addEntity(WorldEntity e)
          Adds an entity to the world
 void draw(GL10 gl)
           
 Point3 getLocation()
          Returns the user location in the world
 java.util.Collection<WorldEntity> getWorldEntities()
          Returns the world entities
 WorldEntity getWorldEntity(int id)
          Returns the entity for the given id
 void removeAllEntities()
          Remove all the entities of the world
 void removeEntity(java.lang.Integer id)
          Removes an entity to the world
 void setLocation(Point3 location)
          Sets the location for the user in the world
 void update(long elapsed)
          Updates the world animation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

World

public World()
Constructs an empty world

Method Detail

addEntity

public void addEntity(WorldEntity e)
Adds an entity to the world

Parameters:
e - the entity to be added

draw

public void draw(GL10 gl)

getLocation

public Point3 getLocation()
Returns the user location in the world

Returns:
the user location in the world

getWorldEntities

public java.util.Collection<WorldEntity> getWorldEntities()
Returns the world entities

Returns:
the world entities

getWorldEntity

public WorldEntity getWorldEntity(int id)
Returns the entity for the given id

Parameters:
id - the id
Returns:
the entity for the given id

removeAllEntities

public void removeAllEntities()
Remove all the entities of the world


removeEntity

public void removeEntity(java.lang.Integer id)
Removes an entity to the world

Parameters:
id - the entity's id

setLocation

public void setLocation(Point3 location)
Sets the location for the user in the world

Parameters:
location - the location for the user in the world

update

public void update(long elapsed)
Updates the world animation

Parameters:
elapsed - elapsed time