GLTFMesh.from_vertices_and_faces

classmethod GLTFMesh.from_vertices_and_faces(context, vertices, faces, mesh_name=None, extras=None)

Construct a GLTFMesh object from lists of vertices and faces. Vertices can be given as either a list of xyz-tuples or -lists, in which case the faces reference vertices by index, or vertices can be given as a dictionary of key-value pairs where the values are xyz-tuples or -lists and the faces reference the keys.

Parameters
  • context (GLTFContent)

  • vertices (Union[list, dict])

  • faces (list)

  • mesh_name (str)

  • extras (object)

Returns

GLTFMesh