'Line of sight search from current position. If a block is
intersected it is returned, along with the block previously in the line
of sight. If no block is found, return None, None.
Parameters
position : tuple of len 3
The (x, y, z) position to check visibility from.
vector : tuple of len 3
The line of sight vector.
max_distance : int
How many blocks away to search for a hit.'

def hit_test(self, position, vector, max_distance=8):

    m = 8
    (x, y, z) = position
    (dx, dy, dz) = vector
    previous = None
    for _ in xrange((max_distance * m)):
        key = normalize((x, y, z))
        if ((key != previous) and (key in self.world)):
            return (key, previous)
        previous = key
        (x, y, z) = ((x + (dx / m)), (y + (dy / m)), (z + (dz / m)))
    return (None, None)
