Krzysztof Chalupka 050f650ae8 Submesh 3/n: Add submeshing functionality
Summary:
Copypasting the docstring:
```
        Split a mesh into submeshes, defined by face indices of the original Meshes object.

        Args:
          face_indices:
            Let the original mesh have verts_list() of length N.
            Can be either
              - List of length N. The n-th element is a list of length num_submeshes_n
                (empty lists are allowed). Each element of the n-th sublist is a LongTensor
                of length num_faces.
              - List of length N. The n-th element is a possibly empty padded LongTensor of
                shape (num_submeshes_n, max_num_faces).

        Returns:
          Meshes object with selected submeshes. The submesh tensors are cloned.

        Currently submeshing only works with no textures or with the TexturesVertex texture.

        Example:

        Take a Meshes object `cubes` with 4 meshes, each a translated cube. Then:
            * len(cubes) is 4, len(cubes.verts_list()) is 4, len(cubes.faces_list()) is 4,
            * [cube_verts.size for cube_verts in cubes.verts_list()] is [8, 8, 8, 8],
            * [cube_faces.size for cube_faces in cubes.faces_list()] if [6, 6, 6, 6],

        Now let front_facet, top_and_bottom, all_facets be LongTensors of
        sizes (2), (4), and (12), each picking up a number of facets of a cube by specifying
        the appropriate triangular faces.

        Then let `subcubes = cubes.submeshes([[front_facet, top_and_bottom], [], [all_facets], []])`.
            * len(subcubes) is 3.
            * subcubes[0] is the front facet of the cube contained in cubes[0].
            * subcubes[1] is a mesh containing the (disconnected) top and bottom facets of cubes[0].
            * subcubes[2] is a clone of cubes[2].
            * There are no submeshes of cubes[1] and cubes[3] in subcubes.
            * subcubes[0] and subcubes[1] are not watertight. subcubes[2] is.
```

Reviewed By: bottler

Differential Revision: D35440657

fbshipit-source-id: 8a6d2d300ce226b5b9eb440688528b5e795195a1
2022-04-11 16:27:53 -07:00
..
2022-02-10 09:39:44 -08:00
2022-01-04 11:43:38 -08:00
2022-01-04 11:43:38 -08:00
2022-01-24 10:52:23 -08:00
2022-03-29 05:09:27 -07:00
2022-01-04 11:43:38 -08:00
2022-01-04 11:43:38 -08:00
2022-03-16 05:42:34 -07:00
2022-02-21 09:26:38 -08:00
2022-04-10 10:27:20 -07:00
2022-01-20 09:44:38 -08:00
2022-02-25 07:53:34 -08:00
2022-02-21 07:24:21 -08:00
2022-01-04 11:43:38 -08:00
2022-02-25 07:53:34 -08:00
2022-01-04 11:43:38 -08:00
2022-01-04 11:43:38 -08:00
2022-01-04 11:43:38 -08:00
2020-01-23 11:53:46 -08:00