How can I get the triangles of a model?
Apart from a list of vertices OBJ files also contain a list indices that make up a face. Look for lines that start with an "f". The vertices are enumerated by their occurrence in the file, starting with index 1.
Be aware that faces can consist of more than three vertices. You will have to split quads and n-gons if you want tris.

f 1 2 3         # a triangle that consists of the first, second and third vertex
f 2 3 4 5       # a quad consisting of the vertices 2 to 5
f 1 2 5 6 10 11 # an n-gon with six vertices


OBJ also supports relative indices. These indices are negative. For example an index of -1 would address the last vertex at the position of the face.
The following file would contain three triangles, consisting of the first three, the second three and the first, third and last vertex:

v  1.0 -1.0 -1.0
v  1.0 -1.0  1.0
v -1.0 -1.0  1.0
f -3 -2 -1
v -1.0 -1.0 -1.0
v  1.0  1.0 -1.0
v  1.0  1.0  1.0
f -3 -2 -1
f -6 -4 -1