MODEL2VIEW_LU(nged)

convert model xyz to view coordinates (local units)

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’– NAME πŸ’–

hey bestie, welcome to the nged manual page for model2view_lu β€” it does exactly what it says: convert model xyz to view coordinates (local units). this is one of the BRL-CAD User Commands, and it’s lowkey iconic for peeking at where model-space points land in view space. πŸ’…


✨ SYNOPSIS ✨

model2view_lu x y z

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the model2view_lu command takes a 3D model-space point β€” expressed in local units β€” and converts it into 3D view-space coordinates, also in local units. the three arguments x y z are model-space coordinates expressed in the database’s local units, no cap.

the conversion pipeline is giving main character energy ✨: the input gets scaled from local to base units, then transformed by the gv_model2view matrix to get normalized view-space coordinates, and then scaled by gv_scale Γ— base2local to produce local-unit view-space coordinates. the result is a space-separated 3-element vector. periodt.

this differs from m2v_point, which works in normalized view space rather than local-unit view space. iykyk.

the inverse operation is view2model_lu. 🫢


🌸 EXAMPLES 🌸

✨ Example 1. Convert the model origin to local-unit view coordinates

mged> model2view_lu 0 0 0

returns the view-space position of the model origin in local units. the result reflects the current view rotation and zoom level. cute, right? πŸŽ€

πŸ’œ Example 2. Convert an off-origin model point

mged> model2view_lu 100 0 0

returns the local-unit view-space coordinates of the model point 100 units along the X axis. slay. πŸ’«


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” absolute icons. 🫑


πŸ› BUG REPORTS πŸ›

reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. please don’t suffer in silence, bestie β€” tell the devs. πŸ’Œ


that’s the whole page, bestie πŸ’– source: BRL-CAD, page: MODEL2VIEW_LU(nged) β€” no extra date on this one, so we’re not making one up. mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from