added code for head pose intersection with table code