All-optical switching using controlled formation of large volume three-dimensional optical matter