vpScale(3)
π vpScale β the glow-up your matrix deserves π
okay bestie, so this is a page from the VolPack Library Functions Manual, and today's main character is vpScale(3). sit down, grab a strawberry π, and let's talk about multiplying your current transformation matrix by a scaling matrix. no cap, it's giving math but make it cute.
β¨ NAME β¨
vpScale β multiply the current transformation matrix by a scaling matrix π¦
πΈ SYNOPSIS πΈ
#include <volpack.h>
vpResult
vpScale(vpc, sx, sy, sz)
vpContext *vpc;
double sx.FA double sy.FA double sz.FE
π ARGUMENTS π
vpcβ the VolPack context, the one you got fromvpCreateContext. your whole vibe lives in here πsxβ scale factor for the X dimension.syβ scale factor for the Y dimension.szβ scale factor for the Z dimension.
π DESCRIPTION π
vpScale multiplies the current transformation matrix by a 4-by-4 scaling matrix. the arguments let you set independent scale factors for each of the three cartesian axes β so yes, you can stretch X, squash Y, and leave Z alone. it's your world π
the scaling matrix is literally this:
sx 0 0 0
0 sy 0 0
0 0 sz 0
0 0 0 1
use vpCurrentMatrix to set the current transformation matrix. by default, the scaling matrix is post-multiplied, which means M = M*S where M is the current matrix and S is the scaling matrix. the VP_CONCAT_MODE option to vpSeti can be used to select pre-multiplication instead. options? we love options β¨
π¦ STATE VARIABLES π¦
the current matrix concatenation parameters can be retrieved with the following state variable codes (see vpGeti(3)):
VP_CURRENT_MATRIXVP_CONCAT_MODE
iykyk π«Ά
π ERRORS π
the return value is always VP_OK. yes bestie, always. no drama, no plot twist, not a single jump scare. iconic behaviour honestly.
π₯ SEE ALSO π₯
okay that's the whole page, periodt π this one came from VolPack and it's the vpScale(3) page β go forth and scale your little heart out. mwah π
β¨
π¦ where this page comes from
- debian bookworm: libvolpack1-dev 1.0b3-9 Β· BSD-3-Clause
- debian trixie: libvolpack1-dev 1.0b3-10 Β· BSD-3-Clause
- ubuntu jammy: libvolpack1-dev 1.0b3-9 Β· BSD-3-Clause
- ubuntu noble: libvolpack1-dev 1.0b3-9.1 Β· BSD-3-Clause
- ubuntu questing: libvolpack1-dev 1.0b3-11
- ubuntu resolute: libvolpack1-dev 1.0b3-11build1 Β· BSD-3-Clause
- ubuntu stonking: libvolpack1-dev 1.0b3-11build1 Β· BSD-3-Clause
- Copyright (c) 1994 The Board of Trustees of The Leland Stanford
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms