MeshGraphic#

MeshGraphic#

Constructor#

MeshGraphic(positions, indices[, mode, ...])

Create a mesh Graphic.

Properties#

MeshGraphic.alpha

The opacity of the graphic

MeshGraphic.alpha_mode

How the alpha is handled by the renderer

MeshGraphic.axes

MeshGraphic.block_events

Used to block events for a graphic and prevent recursion.

MeshGraphic.block_handlers

Used to block event handlers for a graphic and prevent recursion.

MeshGraphic.clim

get or set the colormap limits

MeshGraphic.cmap

get or set the cmap

MeshGraphic.colors

Get or set the colors

MeshGraphic.deleted

used to emit an event after the graphic is deleted

MeshGraphic.event_handlers

Registered event handlers.

MeshGraphic.imgui_right_click

The imgui popup that is opened by a right-click on this graphic.

MeshGraphic.indices

Get or set the vertex indices

MeshGraphic.legend_item

The legend item of this graphic, created with create_legend_item().

MeshGraphic.mapcoords

get or set the mapcoords

MeshGraphic.mode

get mesh rendering mode

MeshGraphic.name

Graphic name

MeshGraphic.offset

[x, y, z]

MeshGraphic.plane

Get or set the current slice plane.

MeshGraphic.positions

Get or set the vertex positions

MeshGraphic.rotation

Orientation of the graphic as a quaternion

MeshGraphic.scale

(x, y, z) scaling factor

MeshGraphic.supported_events

events supported by this graphic

MeshGraphic.tooltip_format

set a custom tooltip format function which takes a pick_info dict and returns a str to be displayed in the tooltip

MeshGraphic.visible

Whether the graphic is visible

MeshGraphic.world_object

Associated pygfx WorldObject.

Methods#

MeshGraphic.add_axes()

Add axes onto this Graphic

MeshGraphic.add_event_handler(*args)

Register an event handler.

MeshGraphic.append_imgui_right_click([gui])

Append imgui elements to the right-click popup of this graphic.

MeshGraphic.clear_event_handlers()

clear all event handlers added to this graphic

MeshGraphic.format_pick_info(pick_info)

Takes a pygfx.PointerEvent and returns formatted pick info.

MeshGraphic.map_model_to_world(position)

map position from model (data) space to world space, basically applies the world affine transform

MeshGraphic.map_world_to_model(position)

map position from world space to model (data) space, basically applies the inverse world affine transform

MeshGraphic.remove_event_handler(callback, ...)

remove a registered event handler

MeshGraphic.remove_imgui_right_click()

Remove and return the right-click popup of this graphic

MeshGraphic.rotate(alpha[, axis])

Rotate the Graphic with respect to the world.

MeshGraphic.set_imgui_right_click([popup, ...])

Set the imgui popup that is opened by a right-click on this graphic, replaces the popup of the subplot or Figure for this graphic.