Skip to documentation
DocumentationAll documentsEnglish

VIEW(nged)

NAME

view - Gets/sets the view parameters (local units).

On this page

SYNOPSIS

view ae|aet|auto|center|dir|eye|knob|lookat|print|quat|save|size|ypr [args]

DESCRIPTION

Gets/sets view parameters in local units. The view command accepts the following subcommands:

OPTIONS

-h, --help

Print help.

-v, --verbose

Increase command verbosity.

-V, --view name

Operate on the specified view instead of the current GED view.

SUBCOMMANDS

ae [[-i] azimuth elevation [twist]]

Get (without arguments) or set the azimuth, elevation, and (optional) twist. If only 2 arguments are supplied, a twist of 0 is assumed. The -i flag can be used to set the AET incrementally. Setting the azimuth and elevation also changes the eye point while keeping the center and view size static.

align [-i] x y z

Aligns the eye point with a desired point and the current center (eye → pt → center). The -i flag can be used to align from the opposite direction (eye → center → pt). Align changes the eye point, azimuth, and elevation while keeping the center and view size static.

auto [-s scale] [object …​]

Resets the view size, center, and eye point such that the framed objects are visible in the graphics window. With no arguments, all displayed objects are framed; if a list of object names (or full paths) is supplied, the view is instead sized to frame only those objects (which need not be displayed). The -s (or --scale) option sets the view scale (model scale relative to view size). Azimuth and elevation remain static.

center [x y z]

Get (without arguments) or set the center. Setting the center also changes the eye point while keeping the azimuth, elevation, and view size static.

dir [[-i] x y z [twist]]

Get (without arguments) or set the view in the form of a direction vector and optional twist. Setting the direction also changes the azimuth, elevation, and eye point while keeping the center and view size static. The -i flag can be used to invert all values (for both getting and setting). The direction vector that is returned (without arguments) does not include the twist; the twist can be acertained by taking the inverse of the twist returned with the ae subcommand.

eye [x y z]

Get (without arguments) or set the eye point. Setting the eye point also changes the center while keeping the azimuth, elevation, and view size static.

faceplate [options] subcommand [args]

Not Implemented.

Manipulate options for the faceplate.

lookat x y z

Adjusts the current view such that the eye is looking in the direction of the given coordinates, but does not move the eye point nor change the view size. Center, azimuth, and elevation will change.

print

Returns the current azimuth, elevation, and twist; direction vector; center; eye point; and view size.

quat [v1 v2 v3 v4]

Get (without arguments) or set the view in the form of a quarternion. Setting the quarternion also changes the azimuth, elevation, and eye point while keeping the center and view size static.

save [-e command] [-l scriptlogfile] [-o scriptoutputfile] [-i scriptinputfile] file [args]

Saves the current viewing parameters in the specified file in the form of a shell script that will run the BRL-CAD rt program. The -e flag specifies a command for the script to run instead of the default rt. The -l flag specifies a logfile for the script to write instead of the default inputfile.log. The -o flag specifies the output filename for the script to create instead of the default inputfile.pix. The -i flag specifies the input filename for the script to load instead of the current database (default). Various arguments can be added to the end, such as -s1024 (see the man page for the rt command).

size [view_size]

Get (without arguments) or set the view size. Setting the view size also changes the eye point while keeping the azimuth, elevation, and center static.

ypr [yaw pitch roll]

Get (without arguments) or set the view in the form of yaw, pitch, roll. A ypr of 0 0 0 is a rear view (AE = 180, 0). Setting the ypr also changes the azimuth, elevation, and eye point while keeping the center and view size static.

EXAMPLES

Example 1. Get the center.

mged>view center

Gets the center.

Example 2. Set the center at the origin of model space.

mged>view center 0 0 0

Sets the center at the origin of model space.

Example 3. Get the current yaw, pitch, and roll

mged>view ypr

Returns the yaw, pitch, and roll of the current view.

Example 4. Set the current yaw, pitch, and roll

mged>view ypr 90 0 0

Sets the view using yaw, pitch, and roll so that the ae is 270, 0 (right).

Example 5. Increase the azimuth by 10 degrees

mged>view ae -i 10 0

Sets the view by increasing the current azimuth by 10 degrees

Example 6. Save current viewing parameters in a specified file in the form of a shell script to run the BRL-CAD rtedge program

mged>view save -e rtedge run_rtedge_script.rt -s1024

Creates a script named run_rtedge_script.rt that will run rtedge and create a pix file of the current screen.

AUTHOR

BRL-CAD Team

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org