added option to select quads or triangles as terrain mesh primitives