vpGetMatrix(3)

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

✨ vpGetMatrix(3) ✨

okay bestie, so this is a page from the VolPack manual β€” section 3, the Library Functions Manual, the one where all the good stuff lives πŸ’… β€” and it's literally all about pulling a transformation matrix out of your VolPack context. no cap.


πŸ’– NAME πŸ’–

vpGetMatrix β€” retrieve the contents of a transformation matrix

like... it gets you the matrix. that's the whole job. she's focused. she's employed. πŸŽ€


🌸 SYNOPSIS 🌸

#include <volpack.h>

vpResult
vpGetMatrix(vpc, matrix_code, matrix)
    vpContext *vpc;
    int matrix_code;
    vpMatrix4 matrix;

ok so she takes three things and she gives you back a vpResult, that's the vibe 🌈


πŸ¦‹ ARGUMENTS πŸ¦‹

  • vpc β€” your VolPack context, the one you got from vpCreateContext. it's giving main character energy, everything needs it ✨
  • matrix_code β€” a code that says which of the VolPack transformation matrices you want. your options are VP_MODEL, VP_VIEW, VP_PROJECT or VP_SCREEN. pick one, queen πŸ‘‘
  • matrix β€” the matrix where the result gets stored. that's her lil home now 🏠

πŸ’œ DESCRIPTION πŸ’œ

so vpGetMatrix retrieves the contents of one of the transformation matrices (peep vpCurrentMatrix(3) for the deets on those, iykyk). 🫢

and then there's the special one: the code VP_SCREEN hits different. when you pass VP_SCREEN, the function computes the transformation from object coordinates to image coordinates and hands you back a matrix describing that transformation. not me being obsessed with a coordinate space 😭


πŸ”₯ ERRORS πŸ”₯

the normal return value is VP_OK β€” that's the slay, the green flag, the everything-worked-out πŸ’š

but there's one possible error return value, and it is:

  • VPERROR_BAD_OPTION β€” the matrix_code argument is invalid. you gave her a code she does not recognise. she said no. πŸ’€
bestie fr fr, check your matrix_code before you call her. VP_MODEL, VP_VIEW, VP_PROJECT, VP_SCREEN β€” that's the list. no extras, no made-up ones, no vibes-based guessing πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

VolPack(3), vpCreateContext(3), vpCurrentMatrix(3)


and that's the page, babe β€” this lil icon lives in the VolPack manual as vpGetMatrix(3), section 3, Library Functions Manual, brought to you by the VolPack girlies themselves πŸŒΈπŸ’–βœ¨ periodt.

πŸ“¦ where this page comes from