User Tools

Site Tools


command:get_view

Table of Contents

get_view

“get_view” returns and optionally prints out the current view information in a format which can be embedded into a command script and can be used in subsequent calls to “set_view”.

If a log file is currently open, get_view will not write the view matrix to the screen unless the “output” parameter is 2.

Usage

get_view [output]

Arguments

output = 0: output matrix to screen

output = 1: do not Output matrix to screen

output = 2: force output to screen even if log file is open

output = 3: return formatted string instead of a list

Notes

Contents of the view matrix:

  • 0 - 8: column-major 3×3 matrix which rotates model space to camera space
  • 9 - 11: origin of rotation relative to camera (in camera space)
  • 12 - 14: origin of rotation (in model space)
  • 15: front plane distance from the camera
  • 16: rear plane distance from the camera
  • 17: orthoscopic flag (+/-) and field of view (if abs(value) > 1)

The camera always looks down -Z with its +X left and its +Y down.

Therefore, in the default view, model +X is to the observer's right, +Y is upward, and +Z points toward the observer.

See Also

command/get_view.txt · Last modified: 2013/08/19 21:01 (external edit)