Ray casting against compound shapes