def calc_faces(size_x, size_z):

- """Create the faces corresponding to a heightfield size 'size_x' by

- 'size_z'. Faces are triangular, so each is composed by 3 vertices.

+ """Return the faces for a horizontal grid of ``size_x`` by ``size_z``

+ Faces are triangular, so each is composed by 3 vertices. Consequently,

+ each returned face is a length-3 sequence of the vertex indices.

+ :param size_x: number of cells along the X axis

+ :type size_x: positive int

+ :param size_z: number of cells along the Z axis

+ :type size_z: positive int

+ :return: faces for a heightfield trimesh based in a horizontal grid of

+ ``size_x`` by ``size_z`` cells

+ :rtype: list of 3-tuple of ints

+ >>> HeightfieldTrimesh.calc_faces(2, 4)

+ [(0, 1, 4), (1, 5, 4), (1, 6, 5), (1, 2, 6), (2, 3, 6), (3, 7, 6)]

# index of each square is calculated because it is needed to define faces