vpGetMatrix(3)
β¨ 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 fromvpCreateContext. 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 areVP_MODEL,VP_VIEW,VP_PROJECTorVP_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β thematrix_codeargument is invalid. you gave her a code she does not recognise. she said no. π
bestie fr fr, check yourmatrix_codebefore 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
- 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