autoPosCamera

Triggers an automatic camera positioning.

Signatures

  • Paramate.Viewport.autoPosCamera( doRedraw )

Details

Automatic camera positioning mechanism adjusts the camera view so that the following conditions are fulfilled:

  • the 3d model lies fully within the viewport
  • the 3d model is not protruding from the viewport when rotating it

The camera aperture and view direction is not changed by the function.

When automatic camera positioning is turned on, this is applied whenever the 3d model or the camera changes (e.g. on calling setCamera

Calling this function performs an auto-positioning of the camera (irrespective of whether auto positioning is turned on or off) and redraws the image.

Parameters

doRedraw

(optional) If this argument is present and has a value 'true' the function will call function redrawimplicitly after the camera positioning.

See also