Ray tracing vector calculation

Implemented ray trace vector calculation, that will be needed for 3D
rectangle selection tool.