M2V_POINT(nged)
convert xyz in model space to xyz in view space
π m2v_point β like, the nged command that turns model-space xyz into view-space xyz β¨
okay bestie, welcome to the nged manual, and buckle up because this little icon is about to make your 3D coordinates make sense. π
β¨ NAME β¨
m2v_point β converts xyz in model space to xyz in view space. literally its whole personality. no cap. π
π¦ SYNOPSIS π¦
m2v_point x y z
m2v_point "x y z"
two ways in, one vibe out. pick your fighter. π
πΈ DESCRIPTION πΈ
so the m2v_point command takes a point in model space and converts it to its equivalent position in view space, using the current view's model-to-view transformation matrix β that's gv_model2view, iykyk. the result comes back as a space-separated string of three floating-point view coordinates. three numbers, all vibing in a row. β¨
you can hand it that point in two forms, and honestly both slay:
- three separate arguments:
m2v_point x y zβ the X, Y, and Z model coordinates are given as three individual numbers. one for each axis, super clean. π«Ά - a single quoted vector:
m2v_point "x y z"β all three coordinates are provided as one space-separated string, which is decoded usingbn_decode_vect. quoted string, decoded, done. π
heads up bestie: the command requires an active view to be present. no view, no conversion, periodt. π
the returned view coordinates are in BRL-CAD's normalized view space, where (0, 0, 0) is the view center and the extents are determined by the current view size. so like, center of the view is zero-zero-zero and everything else is measured relative to that. iconic. π
and if you ever need to go the other way β view to model β the inverse operation is provided by the v2m_point command. they're giving matching bestie energy fr fr. π
π₯ EXAMPLES π₯
Example 1. Convert the model origin to view coordinates
mged> m2v_point 0 0 0
0 0 0
when the view is looking straight at the model origin with no rotation, the origin maps to view center (0, 0, 0). literally the main character of points. β
Example 2. Convert an offset model point
mged> m2v_point 100 0 0
returns the view-space position of the model point 100 units along the X axis, accounting for any current view rotation and zoom. rotation and zoom stay in the chat, and they will be factored in. π¦
Example 3. Using a quoted vector string
mged> m2v_point "50 25 10"
equivalent to m2v_point 50 25 10. converts model point (50, 25, 10) to view coordinates. same result, different entrance. π
π AUTHOR π
BRL-CAD Team β the icons who built this. π«Ά
π BUG REPORTS π
reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. found something cursed? tell the devs, not the group chat. π
okay that's the whole page, bestie β and since we can't just paste the boring footer, here's the sign-off: this absolute gem lives in the BRL-CAD house of docs, filed under M2V_POINT(nged), and it's yours to use. go convert some points, you're gonna eat. π
πβ¨
π¦ 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