Nonconvex Obstacle Avoidance using Efficient Sampling-Based Distance Functions