VIEW_FUNC(nged)

legacy view control multiplexer

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’– VIEW_FUNC (nged) πŸ’–

okay so first things first: this whole page lives in the nged manual, bestie β€” that's the manual name, that's the vibe. it's a BRL-CAD User Command and it's lowkey a ✨legacy icon✨.

🌸 NAME 🌸

view_func β€” the legacy view control multiplexer. yep. a multiplexer. she's a switchboard, she's the main character, she routes stuff. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

view_func subcommand [args]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: view_func is a legacy multiplexer that gives you access to a whole bunch of view control operations through one single entry point. like one door, many rooms. she dispatches to separate view commands based on subcommand. 🫢

here's the tea on how she does it:

  • in modern environments, view_func delegates entirely to the view command
  • in compatibility mode, she dispatches using a built-in dispatch table

like, why does this exist? bc of backward compatibility with older MGED scripts. that's literally the whole reason. πŸ•°οΈ so if you're writing new scripts, pls pls pls use the individual commands directly, or the view command. do it for me. do it for yourself. πŸ’–

⭐ Subcommands ⭐

here's the dispatch table bestie, every single row, no skips, no cap:

  • ae or aet β€” delegates to aet: get or set the azimuth, elevation, and twist angles.
  • align β€” delegates to align: align the view to a surface normal.
  • auto or autoview β€” delegates to autoview: automatically fit all displayed objects in the view.
  • center β€” delegates to center: get or set the view center point.
  • data_lines or sdata_lines β€” delegates to data_lines/sdata_lines: manage supplementary data lines drawn in the view.
  • eye β€” delegates to eye: get or set the eye (camera) position.
  • faceplate β€” delegates to faceplate: manage faceplate display elements.
  • knob β€” delegates to knob: simulate dial-box knob input for view adjustments.
  • lookat β€” delegates to lookat: orient the view to look at a specified point.
  • obj β€” delegates to the legacy view object handler.
  • print β€” delegates to print: print a formatted summary of the current view state.
  • quat β€” delegates to quat: get or set the view orientation as a quaternion.
  • qvrot or dir β€” delegates to viewdir (get direction) or qvrot (set rotation via quaternion and angle), depending on argument count.
  • save or saveview β€” delegates to saveview: save the current view to a file.
  • size β€” delegates to size: get or set the view size.
  • snap β€” delegates to the view snap handler.
  • ypr β€” delegates to ypr: get or set the view orientation as yaw, pitch, and roll angles.

πŸ”₯ EXAMPLES πŸ”₯

Example 1. Set the azimuth/elevation via view_func

mged> view_func ae 35 25

sets the view to azimuth 35Β°, elevation 25Β° β€” equivalent to aet 35 25. slay. 🎯

Example 2. Get the current view center

mged> view_func center

returns the current view center coordinates β€” equivalent to center. look at her go. πŸ‘‘


🌈 SEE ALSO 🌈

view(nged), aet(nged), center(nged), eye(nged), quat(nged), size(nged), saveview(nged), ypr(nged)

go read those too, i'm begging. iykyk. πŸ“šπŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” icons only.

πŸ’€ BUG REPORTS πŸ’€

found a bug? a problem? something giving unwell energy? reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. pls be nice, they're trying. πŸ™ˆ


ngl bestie, if you're writing fresh scripts, skip the multiplexer and go straight to the individual commands or view. she's legacy for a reason. πŸ’…

kisses, and remember: this page came to you courtesy of BRL-CAD and it's the VIEW_FUNC(nged) page β€” go forth and control those views. πŸŽ€βœ¨

πŸ“¦ where this page comes from