107. opengl.scene — This implements an OpenGL drawing widget for painting 3D scenes.

107.1. Classes defined in module opengl.scene

class opengl.scene.ItemList(scene)[source]

A list of drawn objects of the same kind.

This is used to collect the Actors, Decorations and Annotations in a scene. Currently the implementation does not check that the objects are of the proper type or are not occurring multiple times.

class opengl.scene.Scene(canvas=None)[source]

An OpenGL scene.

The Scene is a class holding a collection of Actors, Decorations and Annotations. It can also have a background.

107.2. Functions defined in module opengl.scene

opengl.scene.sane_bbox(bb)[source]

Return a sane nonzero bbox.

bb should be a (2,3) float array or compatible Returns a (2,3) float array where the values of the second row are guaranteed larger than the first. A value 1 is added in the directions where the input bbox has zero size. Also, any NaNs will be transformed to numbers.