vispy.visuals.box module#

class vispy.visuals.box.BoxVisual(width=1, height=1, depth=1, width_segments=1, height_segments=1, depth_segments=1, planes=None, vertex_colors=None, face_colors=None, color=(0.5, 0.5, 1, 1), edge_color=None, **kwargs)#

Bases: CompoundVisual

Visual that displays a box.

Parameters:
widthfloat

Box width.

heightfloat

Box height.

depthfloat

Box depth.

width_segmentsint

Box segments count along the width.

height_segmentsfloat

Box segments count along the height.

depth_segmentsfloat

Box segments count along the depth.

planes: array_like

Any combination of {'-x', '+x', '-y', '+y', '-z', '+z'} Included planes in the box construction.

vertex_colorsndarray

Same as for MeshVisual class. See create_plane for vertex ordering.

face_colorsndarray

Same as for MeshVisual class. See create_plane for vertex ordering.

colorColor

The Color to use when drawing the cube faces.

edge_colortuple or Color

The Color to use when drawing the cube edges. If None, then no cube edges are drawn.

property border#

The vispy.visuals.MeshVisual that used to draw the border.

property mesh#

The vispy.visuals.MeshVisual that used to fill in.