raycast

* maturing raycast code
* fixed a bug when raycasting out of the cell partition