pytransform3d.visualizer.Mesh#

class pytransform3d.visualizer.Mesh(filename, A2B=array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), s=array([1., 1., 1.]), c=None, convex_hull=False)[source]#

Bases: Artist

Mesh.

Parameters:
filenamestr

Path to mesh file

A2Barray-like, shape (4, 4)

Center of the mesh

sarray-like, shape (3,), optional (default: [1, 1, 1])

Scaling of the mesh that will be drawn

carray-like, shape (n_vertices, 3) or (3,), optional (default: None)

Color(s)

convex_hullbool, optional (default: False)

Compute convex hull of mesh.

__init__(filename, A2B=array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), s=array([1., 1., 1.]), c=None, convex_hull=False)[source]#

Methods

__init__(filename[, A2B, s, c, convex_hull])

add_artist(figure)

Add artist to figure.

set_data(A2B)

Update data.

Attributes

geometries

Expose geometries.

set_data(A2B)[source]#

Update data.

Parameters:
A2Barray-like, shape (4, 4)

Center of the mesh.

property geometries#

Expose geometries.

Returns:
geometrieslist

List of geometries that can be added to the visualizer.

add_artist(figure)#

Add artist to figure.

Parameters:
figureFigure

Figure to which the artist will be added.