Script to output vertex coordinates and triangles
current_obj.data.vertices contains all the vertices of the object. You can read these before you loop over the faces. As you already got the vertex indices of the faces, all is left to do is using the desired format string for your output.

import bpy  

current_obj = bpy.context.active_object  
verts_local = [v.co for v in current_obj.data.vertices.values()]
verts_world = [current_obj.matrix_world * v_local for v_local in verts_local]

print("="*40) # printing marker

for i, vert in enumerate(verts_world):
    print("vertices[{i}].SetVertex ({v[0]}, {v[1]}, {v[2]});".format(i=i, v=vert))

for i, face in enumerate(current_obj.data.polygons):
    verts_indices = face.vertices[:]
    print("mesh[{i}].SetTriangle {v_i};".format(i=i, v_i=verts_indices))


This will generate output like below. But it does not check whether the faces are really triangles and will call for the creation of “triangles” with four or more vertices if your object does contain quads etc.

========================================
vertices[0].SetVertex (0.0, 1.0, -1.0);
vertices[1].SetVertex (0.8660253882408142, -0.5000000596046448, -1.0);
vertices[2].SetVertex (0.0, 0.0, 1.0);
vertices[3].SetVertex (-0.866025447845459, -0.49999991059303284, -1.0);
mesh[0].SetTriangle (0, 2, 1);
mesh[1].SetTriangle (1, 2, 3);
mesh[2].SetTriangle (3, 2, 0);
mesh[3].SetTriangle (0, 1, 3);


If you want to differentiate between triangles, quads and so on then you might want to differentiate the format string based on the length of the vertex list.

N.B.: In my version of Blender, by default the text in the systems console can't be copied. I copied the text above from a text file that was generated by writing the output to a file instead of printing it to the console. Another option could be to start blender from a terminal from which you can copy text.