cls_BaseCamera - almarklein/visvis GitHub Wiki

Inherits from object.

Abstract camera class. A camera represents both the camera model and the interaction style.

The BaseCamera class implements the following properties:
axes, axeses, daspect, daspectNormalized, loc, zoom

The BaseCamera class implements the following methods:
GetLimits, GetViewParams, Reset, ScreenToWorld, SetLimits, SetView, SetViewParams

Properties

Get the axes that this camera applies to (or the first axes if it applies to multiple axes).

Get a tuple with the axeses that this camera applies to.

Get/Set the data aspect ratio as a three element tuple.

The daspect is a 3-element tuple (x,y,z). If a 2-element tuple is given, z is assumed 1. Note that only the ratio between the values matters (i.e. (1,1,1) equals (2,2,2)). When a value is negative, the corresponding dimension is flipped.

Note that if axes.daspectAuto is True, the daspect is changed by the camera to nicely scale the data to fit the screen (but the sign is preserved).

Get the data aspect ratio, normalized such that the x scaling is +/- 1.

Get/set the current viewing location.

Get/set the current zoom factor.

Methods

Return the extent of the axes, which is determined by the camera in the 2D case.

Get a dictionary with view parameters.

Reset the view. Overload this in the actual camera models.

Given a tuple of screen coordinates, calculate the world coordinates. If not given, the current mouse position is used.

This basically simulates the actions performed in SetView but then for a single location.

Set the data limits of the camera. Always set this before rendering! This also calls reset to reset the view.

Set the view, thus simulating a camera. Overload this in the actual camera models.

Set the view, given a dictionary with view parameters. View parameters may also be passed as keyword/value pairs; these will supersede the same keys in s.

⚠️ **GitHub.com Fallback** ⚠️