kaolin.io.utils

API

exception kaolin.io.utils.NonHomogeneousMeshError(message)

Bases: Exception

Raised when expecting a homogeneous mesh but a heterogenous mesh is encountered.

message
kaolin.io.utils.heterogeneous_mesh_handler_empty(*args)

Return empty tensors for vertices and faces of heterogeneous meshes.

kaolin.io.utils.heterogeneous_mesh_handler_naive_homogenize(vertices, face_vertex_counts, *features)

Homogenize list of faces containing polygons of varying number of edges to triangles using fan triangulation.

Parameters
  • vertices (torch.FloatTensor) – Vertices with shape (N, 3).

  • face_vertex_counts (torch.LongTensor) – Number of vertices for each face with shape (M) for M faces.

  • *features – Variable length features that need to be handled. For example, faces and uvs.

Returns

Homogeneous list of attributes.

Return type

(list of torch.tensor)

kaolin.io.utils.heterogeneous_mesh_handler_skip(*args)

Skip heterogeneous meshes.