def mesh(
self,
shape: ShapeCollection = None,
position: np.ndarray = None,
color: np.ndarray = None,
texcoords: np.ndarray = None,
normal: np.ndarray = None,
isoline: np.ndarray = None,
left: np.ndarray = None,
right: np.ndarray = None,
contour: Union[np.ndarray, bool] = None,
index: np.ndarray = None,
light_pos: Tuple[float, float, float, float] = None,
light_color: Tuple[int, int, int, int] = None,
ambient_params: tp.Optional[Tuple[float, float, float]] = None,
diffuse_params: tp.Optional[Tuple[float, float, float]] = None,
specular_params: tp.Optional[Tuple[float, float, float]] = None,
emission_params: tp.Optional[Tuple[float, float, float]] = None,
shine: float = None,
emit: float = None,
edgecolor: tp.Optional[Tuple[int, int, int, int]] = None,
linewidth: float = None,
density: int = None,
texture: tp.Optional[Texture] = None,
indexed: tp.Optional[bool] = None,
lighting: tp.Optional[bool] = None,
depth_test: bool = None,
cull: str = None,
) -> vs.Mesh:
"""
Create a mesh visual.
Parameters
----------
shape : ShapeCollection, optional
Create a mesh from a shape collection.
position : ndarray
Vertex 3D positions in normalized device coordinates.
color : ndarray
Vertex RGBA colors in range 0–255.
texcoords : ndarray
Vertex texture coordinates, each row contains the u0,v0,u1,v1 coordinates of each
vertex within the texture.
normal : ndarray
Vertex normals in normalized device coordinates.
isoline : ndarray, optional
Scalar field, one value per vertex, is showing isolines.
left : ndarray, optional
Left values for contours (not documented yet).
right : ndarray, optional
Right values for contours (not documented yet).
contour : ndarray or bool, optional
Contour values for the mesh (not documented yet), or a boolean indicating whether to
use contours.
index : ndarray, optional
Vertex indices for indexed meshes (three integers per triangle).
light_pos : Tuple[float, float, float, float], optional
Light position in normalized device coordinates, in the form (x, y, z, w).
If `w` is 0, the light is directional; if `w` is 1, the light is positional.
light_color : Tuple[int, int, int, int], optional
Light color in RGBA format, in the form (r, g, b, a).
ambient_params : Tuple[float, float, float], optional
Material ambient parameters for the mesh, in the form (r, g, b).
diffuse_params : Tuple[float, float, float], optional
Material diffuse parameters for the mesh, in the form (r, g, b).
specular_params : Tuple[float, float, float], optional
Material specular parameters for the mesh, in the form (r, g, b).
emission_params : Tuple[float, float, float], optional
Material emission parameters for the mesh, in the form (r, g, b).
shine : float, optional
Material shine factor for the mesh, in the range [0, 1].
emit : float, optional
Material emission factor for the mesh, in the range [0, 1].
edgecolor : Tuple[int, int, int, int], optional
Edge color for the mesh, in RGBA format, when showing contours or isolines.
linewidth : float, optional
Line width for the mesh edges, in pixels, when showing contours or isolines.
density : int, optional
Density of isolines, in pixels, when showing isolines.
texture : Texture, optional
Texture for the mesh, when using textured mesh.
indexed : bool, optional
Whether the mesh is indexed. If `True`, the mesh will use indices for vertices.
lighting : bool
Whether lighting is enabled.
depth_test : bool, optional
Whether to enable depth testing.
cull : str, optional
The culling mode, `None`, `front`, or `back`.
Returns
-------
vs.Mesh
The created mesh visual instance.
"""
Possible solutions
Datoviz: Collect all the docs pages + examples and use AI to generate documentation
Datoviz mesh visual creation method