made vector2D_to_graph not const since it changes m_graph