vpMultMatrix(3)

πŸ“¦ version 1.0c7, in fedora 43, fedora 44

vpMultMatrix πŸ’…

okay bestie, welcome to the Library Functions Manual corner of the VolPack docs, section 3, where we talk about vpMultMatrix β€” the lil function that multiplies the current transformation matrix by another matrix. that's it. that's the whole job. she's simple, she's reliable, she eats every time. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <volpack.h>

vpResult
vpMultMatrix(vpc, m)
    vpContext *vpc;
    vpMatrix4 m;

no cap, that's the whole signature. two args, one return, zero drama.


πŸŽ€ ARGUMENTS πŸŽ€

  • vpc β€” the VolPack context, and like… you gotta get this from vpCreateContext. it's the whole vibe of your rendering setup, you can't just make one up. πŸ™ˆ
  • m β€” the input matrix. the one you're bringing to the party. πŸ’œ

✨ DESCRIPTION ✨

so here's the tea, bestie. vpMultMatrix takes your current transformation matrix and multiplies it by an arbitrary 4-by-4 transformation matrix. that's it. that's the function.

if you wanna set the current transformation matrix instead of multiplying into it, that's a whole different girl β€” use vpCurrentMatrix for that. 🫢

now, the default behavior: the matrix gets post-multiplied, and the math is literally

N = N*m

where N is the current matrix and m is the argument you just passed to vpMultMatrix. very demure, very mindful.

but wait β€” you can change that up. the VP_CONCAT_MODE option to vpSeti lets you switch over to pre-multiplication instead. so if post-multiply isn't giving what you need, you have options, periodt. πŸ‘‘


🌸 STATE VARIABLES 🌸

the current matrix concatenation parameters are retrievable, and you do that with these state variable codes β€” go check vpGeti(3) for the whole scoop:

  • VP_CURRENT_MATRIX
  • VP_CONCAT_MODE

πŸ’€ ERRORS πŸ’€

ngl this is the most chill error section in the entire library: the return value is always VP_OK. every single time. she does not fail. she does not miss. no error handling required, bestie, you can breathe. 😌


πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page, you're officially fluent in vpMultMatrix now, go multiply some matrices and slay. πŸ’–

this lil love letter to matrix math comes to you courtesy of the VolPack library docs, section 3 of the manual β€” dated whenever your system stamped it, which is a mystery even to me, but the VolPack vibes are eternal. πŸ¦‹βœ¨πŸ’…

πŸ“¦ where this page comes from