plopp.backends.pythreejs.mesh3d.Mesh3d#
- class plopp.backends.pythreejs.mesh3d.Mesh3d(*, canvas, data, uid=None, color=None, colormapper=None, opacity=1, edgecolor=None, artist_number=0, **ignored)[source]#
Artist to represent a three-dimensional mesh.
Added in version 24.09.2.
- Parameters:
canvas (
Canvas) – The canvas to draw the mesh on.data (
DataArray) –The initial data to create the mesh from. Must be a DataGroup that contains at least the following fields:
vertices: a DataArray with the vertices of the mesh.
faces: a DataArray with the faces of the mesh.
uid (
str|None, default:None) – The unique identifier of the artist. If None, a random UUID is generated.color (
str|None, default:None) – The color of the mesh. If None, the mesh will be colored according to the artist number.colormapper (
ColorMapper|None, default:None) – The colormapper to use for the mesh.opacity (
float, default:1) – The opacity of the mesh.edgecolor (
str|None, default:None) – The color of the edges of the mesh. If None, the edges will not be shown.artist_number (
int, default:0) – The number of the artist. This is used to determine the color of the mesh if color is None.
- __init__(*, canvas, data, uid=None, color=None, colormapper=None, opacity=1, edgecolor=None, artist_number=0, **ignored)[source]#
Methods
__init__(*, canvas, data[, uid, color, ...])bbox(xscale, yscale, zscale)The bounding box of the mesh.
notify_artist(message)Receive notification from the colormapper that its state has changed.
remove()Remove the mesh from the canvas.
update(new_values)Update mesh array with new values.
Attributes
dataGet the mesh data.
opacityThe mesh opacity.
visibleThe visibility of the mesh.