A Generic Framework for Delaunay Mesh Generation and Optimization