Implemented line intersection in Entity