52. gui.views — Predefined camera viewing directions

52.1. Classes defined in module gui.views

class gui.views.ViewAngles(data={'iso': (45.0, 35.2644, 0.0), 'iso0': (45.0, 35.2644, 0.0), 'iso1': (135.0, 35.2644, 0.0), 'iso2': (225.0, 35.2644, 0.0), 'iso3': (315.0, 35.2644, 0.0), 'iso4': (45.0, -35.2644, 0.0), 'iso5': (135.0, -35.2644, 0.0), 'iso6': (225.0, -35.2644, 0.0), 'iso7': (315.0, -35.2644, 0.0)})[source]

A dict to keep named camera angle settings.

This class keeps a dictionary of named angle settings. Each value is a tuple of (longitude, latitude, twist) camera angles. This is a static class which should not need to be instantiated.

There are seven predefined values: six for looking along global coordinate axes, one isometric view.

setOrientation(orient)[source]

Set standard orientation.

Parameters:orient (str) – The front orientation. Should be one of ‘xy’ or ‘xz’. The other relative orientations are derived from it.
Returns:
  • aliases (list) – List of standard relative orientations
  • realnames – List of the real orientation anmes corresponding with aliases
  • icons – List of icon names corresponding with the realnames
get(name)[source]

Get the angles for a named view.

Returns a tuple of angles (longitude, latitude, twist) if the named view was defined, or None otherwise

52.2. Functions defined in module gui.views

gui.views.iconName(viewname)[source]

Get the icon name for an axis view

gui.views.getAngles(name)[source]

Get angles (and orient) of a named view.

gui.views.setAngles(name, angles)[source]

Define new or redefine old view

gui.views.viewNames()[source]

Return a list of all view names