vpGetLight(3)

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

πŸ’– vpGetLight β€” get lighting properties πŸ’‘

okay so bestie, welcome to vpGetLight(3) from the Library Functions Manual πŸŽ€ this is the VolPack girlie whose whole job is spilling the tea on your light sources. you want to know what a light's color is? what direction it's pointing? she's got you. no cap.


✨ NAME ✨

vpGetLight β€” get lighting properties πŸ’…


🌸 SYNOPSIS 🌸

#include <volpack.h>

vpResult
vpGetLight(vpc, light_num, property, n0_ptr, n1_ptr, n2_ptr)
    vpContext *vpc;
    int light_num;
    int property;
    double *n0_ptr, *n1_ptr, *n2_ptr;

like yes she takes six args, she's a little extra, but she's worth it 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • vpc β€” the VolPack context you got from vpCreateContext. your main character, your home base, your everything πŸ’œ
  • light_num β€” a constant that picks which light source we're talking about: VP_LIGHT0, VP_LIGHT1, ..., VP_LIGHT5. so six lights, six icons, pick your fave ✨
  • property β€” a constant naming exactly one lighting property you wanna read: VP_COLOR or VP_DIRECTION. that's the vibe check right there πŸ‘‘
  • n0_ptr, n1_ptr, n2_ptr β€” the spots where the answer gets dropped off πŸŽ€ they hold either the components of an RGB color (when it's VP_COLOR) or a direction vector (when it's VP_DIRECTION). so it's three numbers either way, just depends which question you asked πŸ’–

🌈 DESCRIPTION 🌈

vpGetLight is how you get the properties of a light source. it's literally the read-only twin of vpSetLight β€” the arguments are exactly analogous, the only plot twist being that those final three arguments are pointers to locations for storing the lighting properties instead of values you're setting. same shape, opposite direction, iconic behavior honestly 😌


πŸ’€ ERRORS πŸ’€

the normal return value is VP_OK. everything's fine, the light is light-ing, we love that for her 🌟

but bestie, sometimes it goes wrong, and these are the possible error return values:

  • VPERROR_LIMIT_EXCEEDED β€” the light number is invalid or it exceeds an implementation limit. like you asked for a light that does not exist, or the implementation said "girl, no" πŸ™ˆ
  • VPERROR_BAD_OPTION β€” the property argument is invalid. you passed something that isn't a real property and she's not entertaining it πŸ’€
fr fr, check your light_num and your property before you come crying to the error codes, iykyk 😭

🧚 SEE ALSO 🧚

VolPack(3), vpCreateContext(3), vpSetLight(3)

go read vpSetLight(3) next if you wanna be the one setting the lights instead of just snooping on them, and vpCreateContext(3) if you somehow don't have a context yet (bestie. get a context.) 🌸


and that's the whole page, periodt πŸ’… this was VolPack, version vibes from the VolPack library, dated VolPack β€” mwah, stay lit bestie, literally πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from