public <T> ArrayList<T> entitiesAtPoint(double x, double y, Class<T> c)
	{
		ArrayList<T> allEntities=new ArrayList<T>();
		for(Integer key:entitiesByDepth.keySet())
		{
			ArrayList<Entity> entities=entitiesByDepth.get(key);
			for(Entity entity:entities)
			{
				Area temp=new Area(entity.mask());
				temp.transform(AffineTransform.getTranslateInstance(entity.x(),entity.y()));
				if(temp.contains(x,y))
				{
					if(c.isAssignableFrom(entity.getClass()))
						allEntities.add((T)entity);
				}
			}
		}
		return(allEntities);
	}