docarray.document.mixins.mesh module#
- class docarray.document.mixins.mesh.MeshEnum(value)[source]#
Bases:
Enum
An enumeration.
- FILE_EXTENSIONS = ['glb', 'obj', 'ply']#
- VERTICES = 'vertices'#
- FACES = 'faces'#
- class docarray.document.mixins.mesh.PointCloudEnum(value)[source]#
Bases:
Enum
An enumeration.
- COLORS = 'point_cloud_colors'#
- class docarray.document.mixins.mesh.MeshDataMixin[source]#
Bases:
object
Provide helper functions for
Document
to support 3D mesh data and point cloud.- load_uri_to_point_cloud_tensor(samples, as_chunks=False)[source]#
Convert a 3d mesh-like
uri
intotensor
- Parameters:
samples (
int
) – number of points to sample from the meshas_chunks (
bool
) – when multiple geometry stored in one mesh file, then store each geometry into differentchunks
- Return type:
T
- Returns:
itself after processed
- load_uri_to_vertices_and_faces()[source]#
Convert a 3d mesh-like
uri
intochunks
as vertices and faces- Return type:
T
- Returns:
itself after processed