Three-dimensional nonlinear photonic crystal in ferroelectric barium calcium titanate