convert materialtype to C++ objects