implemented and test the write method for obj mesh.