pygfx.objects.Mesh
- class pygfx.objects.Mesh(geometry=None, material=None, *args, **kwargs)
Bases:
WorldObject
A mesh.
An object consisting of triangular faces represented by a set of vertices (3D positions) and a set of vertex indices indicating which vertex triplets form mesh triangles.
The picking info of a Mesh (the result of
renderer.get_pick_info()
) will for most materials includeinstance_index
(int),face_index
(int), andface_coord
(tuple of 3 floats). The latter are the barycentric coordinates for each vertex of the face (with values 0..1).- Parameters:
geometry (Geometry) – The data defining the shape of the object.
material (Material) – The data defining the appearance of the object.
visible (bool) – Whether the object is visible.
render_order (int) – The render order (when applicable for the renderer’s blend mode).
render_mask (str) – Determines the render passes that the object is rendered in. It’s recommended to let the renderer decide, using “auto”.
position (Vector) – The position of the object in the world. Default (0, 0, 0).
- property morph_target_influences
An ndarray of weights typically from 0-1 that specify how much of the morph is applied.
Note: When using this attribute, its geometry needs to have the relevant attributes of morph targets.
- property morph_target_names
A list of names for the morph targets.