differt.geometry package#
Submodules#
Module contents#
Geometries for building scenes.
- class TriangleMesh(vertices, triangles)[source]#
Bases:
Module
A simple geometry made of triangles.
- Parameters:
- property diffraction_edges: UInt[Array, 'num_edges 3']#
The diffraction edges.
- classmethod load_obj(file)[source]#
Load a triangle mesh from a Wavefront .obj file.
Currently, only vertices and triangles are loaded. Triangle normals are computed afterward (when first accessed).
- Parameters:
file (
str
) – The path to the Wavefront .obj file.- Return type:
- Returns:
The corresponding mesh containing only triangles.
- classmethod load_ply(file)[source]#
Load a triangle mesh from a Stanford PLY .ply file.
Currently, only vertices and triangles are loaded. Triangle normals are computed afterward (when first accessed).
- Parameters:
file (
str
) – The path to the Stanford PLY .ply file.- Return type:
- Returns:
The corresponding mesh containing only triangles.
- property normals: Float[Array, 'num_triangles 3']#
The triangle normals.
-
triangles:
UInt[Array, 'num_triangles 3']
# The array of triangle indices.
-
vertices:
Float[Array, 'num_vertices 3']
# The array of triangle vertices.