ROT_POINT(nged)

transform a point by the inverse of the current view rotation

πŸ“… published 7.44.0, from nixpkgs unstable

πŸŽ€ rot_point(nged) β€” the glow-up your points deserve πŸŽ€

okay bestie, so you know how your view in MGED gets all rotated and you're like "wait what even IS this point now"? yeah. rot_point is literally the answer. it's a BRL-CAD User Command and it's giving main character energy, ngl.


✨ NAME ✨

rot_point β€” transform a point by the inverse of the current view rotation πŸ’…

like, it takes a point and un-rotates it. periodt.


🌸 SYNOPSIS 🌸

rot_point x y z
rot_point "x y z"

two ways, same slay. pick your fighter 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so the rot_point command applies the inverse of the current view rotation matrix to the point you hand it, and returns the transformed point as a space-separated triplet. that's it, that's the whole vibe. ✨

your input point can come in as three separate floating-point arguments, or as a single quoted space-separated triplet β€” both are valid, no cap. the output is a space-separated x y z string of the resulting point coordinates.

⚠️ okay important note, bestie, do NOT sleep on this: the command applies the inverse of the view rotation matrix β€” not the forward rotation. this transforms a point from view-rotated space back into unrotated model space orientation, which is basically "un-rotating" the point by however much the view has been rotated. πŸ”₯

and heads up, this is distinct from model2view β€” that one applies the full model-to-view transform, including scale and translation. rot_point is just the rotation-inverse situation. don't mix them up, iykyk 😭


πŸ’– EXAMPLES πŸ’–

Example 1. Transform a point using three separate arguments

mged> rot_point 10 0 0

transforms the point (10, 0, 0) by the inverse of the current view rotation and returns the result as three space-separated values. iconic. πŸ‘‘

Example 2. Transform a point using a quoted triplet

mged> rot_point "10 0 0"

equivalent to the above β€” the single quoted string form is accepted for scripting convenience. literally the same thing, just packaged cuter πŸŽ€

Example 3. Use in a scripting context

mged> set rp [rot_point 0 0 100]

stores the inverse-rotation-transformed version of (0, 0, 100) in the Tcl variable rp for use in subsequent calculations. this is the one for the coders fr fr πŸ’»βœ¨


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” the legends themselves 🫢


πŸ“¬ BUG REPORTS πŸ“¬

if you find a bug or a problem, pls don't suffer in silence β€” reports should be submitted via electronic mail to devs@brlcad.org πŸ’Œ


⭐ okay that's the whole page, bestie β€” go un-rotate some points and live your truth πŸŒˆπŸ’œ

BRL-CAD Β· ROT_POINT(nged) Β· that's the version/source and date line, mwah, bye bye πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from