vpMultMatrix(3)
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 fromvpCreateContext. 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_MATRIXVP_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
- fedora 43: volpack 1.0c7-35.fc43 Β· BSD-3-Clause
- fedora 43: volpack 1.0c7-35.fc43 Β· BSD-3-Clause
- fedora 44: volpack 1.0c7-36.fc44 Β· BSD-3-Clause
- fedora 44: volpack 1.0c7-36.fc44 Β· BSD-3-Clause
- Copyright (c) 1995-2008, Stanford University
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms