VIEW_FUNC(nged)
legacy view control multiplexer
π 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_funcdelegates entirely to theviewcommand - 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:
aeoraetβ delegates toaet: get or set the azimuth, elevation, and twist angles.alignβ delegates toalign: align the view to a surface normal.autoorautoviewβ delegates toautoview: automatically fit all displayed objects in the view.centerβ delegates tocenter: get or set the view center point.data_linesorsdata_linesβ delegates todata_lines/sdata_lines: manage supplementary data lines drawn in the view.eyeβ delegates toeye: get or set the eye (camera) position.faceplateβ delegates tofaceplate: manage faceplate display elements.knobβ delegates toknob: simulate dial-box knob input for view adjustments.lookatβ delegates tolookat: orient the view to look at a specified point.objβ delegates to the legacy view object handler.printβ delegates toprint: print a formatted summary of the current view state.quatβ delegates toquat: get or set the view orientation as a quaternion.qvrotordirβ delegates toviewdir(get direction) orqvrot(set rotation via quaternion and angle), depending on argument count.saveorsaveviewβ delegates tosaveview: save the current view to a file.sizeβ delegates tosize: get or set the view size.snapβ delegates to the view snap handler.yprβ delegates toypr: 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
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms