I had a question about shiny teapot demo. Provided are "teapotPositions" and "teapotIndices", among others.

I’m trying to extract the “faces” of the teapot. The way I’m interpreting the “indices” is that they describe the faces of the teapot; each face is a triangle and each vertex of the triangle is given by the vertex indices.

For example…

Code :[ 0,1,2, // face 1 2,3,0, // face 2 ... ]

… (0,1,2) are the indices into the "positions" array and correspond to a face of the teapot and these indices correspond to these 3 vertices:

… which are the first 9 entries in the “positions” array.Code :v1 = (5.929688, 4.125, 0) v2 = (5.387188, 4.125, 2.7475) v3 = (5.2971, 4.494141, 2.70917)

I guess my question is, what do the vertex indices correspond to? Does a ’0? in the indices array correspond to the first 3 entries in the positions array? Am I understanding things correctly? If my understanding is incorrect, how would I figure out the faces (triangles) of the teapot?

Thanks,

Hristo