SbVec4b(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

πŸ’– SbVec4b β€” Library Functions Manual πŸ’–

okay bestie, so this is SbVec4b(3), a real page from the Library Functions Manual, and it's literally about a little 4D vector made of tiny 8-bit integers. slay. let's get into it πŸ¦‹


✨ NAME ✨

SbVec4b β€” the SbVec4b class is a 4 dimensional vector with 8-bit integer coordinates. that's it, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

#include <Inventor/SbVec4b.h>

πŸŽ€ Public Member Functions πŸŽ€

here's the whole roster, no cap, every single one πŸ‘‘

SbVec4b (void)
SbVec4b (const int8_t v[4])
SbVec4b (int8_t x, int8_t y, int8_t z, int8_t w)
SbVec4b (const SbVec4ub &v)
SbVec4b (const SbVec4s &v)
SbVec4b (const SbVec4i32 &v)
SbVec4b & setValue (const int8_t v[4])
SbVec4b & setValue (int8_t x, int8_t y, int8_t z, int8_t w)
SbVec4b & setValue (const SbVec4ub &v)
SbVec4b & setValue (const SbVec4s &v)
SbVec4b & setValue (const SbVec4i32 &v)
const int8_t * getValue (void) const
void getValue (int8_t &x, int8_t &y, int8_t &z, int8_t &w) const
int8_t & operator[] (int i)
const int8_t & operator[] (int i) const
int32_t dot (SbVec4b v) const
void negate (void)
SbVec4b & operator*= (int d)
SbVec4b & operator*= (double d)
SbVec4b & operator/= (int d)
SbVec4b & operator/= (double d)
SbVec4b & operator+= (SbVec4b v)
SbVec4b & operator-= (SbVec4b v)
SbVec4b operator- (void) const

πŸ”’ Protected Attributes πŸ”’

int8_t vec [4]

yes she keeps her four little int8_t values tucked away safely in there πŸ™ˆ


🌈 Detailed Description 🌈

okay so the SbVec4b class is a 4 dimensional vector with 8-bit integer coordinates. literally what it says on the tin, iconic behavior.

this vector class provides storage for a 3 dimensional homogeneoues vector (with the 4 components usually referred to as <x, y, z, w>) aswell as simple integer precision arithmetic operations. (yes, "homogeneoues" and "aswell" are exactly how the original spells it β€” we keep the receipts around here, no editing the queen's handwriting πŸ’…)

See also β€” the whole friend group: SbVec2b, SbVec3b, SbVec4ub, SbVec4s, SbVec4us, SbVec4i32, SbVec4ui32

Since β€” Coin-2.5 ⭐ (she's been around, lowkey a legend)


🧚 Constructor & Destructor Documentation 🧚

SbVec4b::SbVec4b (void ) [inline]

the default constructor does nothing. that's not a drill bestie β€” the vector coordinates will be uninitialized until a call the setValue(). so pls do not go reading garbage values and acting surprised 😭

Referenced by dot(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator/=(), setValue(), and setValue().

SbVec4b::SbVec4b (const int8_t v[4]) [inline]

constructs an SbVec4b instance with initial values from v. cute, takes an array, gives you a vector 🫢

SbVec4b::SbVec4b (int8_t x, int8_t y, int8_t z, int8_t w) [inline]

constructs an SbVec4b instance with the initial homogeneous vector set to <x,y,z,w>. four numbers in, one vector out, the way that math just works ✨

SbVec4b::SbVec4b (const SbVec4ub & v) [inline], [explicit]

constructs an SbVec4b instance with initial values from the unsigned 8-bit integer precision vector v.

References setValue().

SbVec4b::SbVec4b (const SbVec4s & v) [inline], [explicit]

constructs an SbVec4b instance with initial values from the short integer precision vector v.

References setValue().

SbVec4b::SbVec4b (const SbVec4i32 & v) [inline], [explicit]

constructs an SbVec4b instance with initial values from the 32-bit integer precision</pack> vector v.

References setValue().


πŸ‘‘ Member Function Documentation πŸ‘‘

SbVec4b & SbVec4b::setValue (const int8_t v[4]) [inline]

set new coordinates for the vector from v. returns reference to self. she hands herself right back to you, main character energy fr fr.

See also getValue()

References SbVec4b().

Referenced by SbVec4b(), SbVec4b(), and SbVec4b().

SbVec4b & SbVec4b::setValue (int8_t x, int8_t y, int8_t z, int8_t w) [inline]

set new coordinates for the vector. returns reference to self. same deal, four args edition πŸ’–

See also getValue()

References SbVec4b().

SbVec4b & SbVec4b::setValue (const SbVec4ub & v)

sets this vector to the unsigned 8-bit integer precision vector v, converting the vector to a 8-bit integer precision vector. glow-down in bit width but make it intentional ✨

SbVec4b & SbVec4b::setValue (const SbVec4s & v)

sets this vector to the short integer precision vector v, converting the vector to a 8-bit integer precision vector. squeeze those bits, bestie 🌸

SbVec4b & SbVec4b::setValue (const SbVec4i32 & v)

sets this vector to the 32-bit integer precision vector v, converting the vector to a 8-bit integer precision vector. 32 bits walking into an 8-bit party, it's giving chaos πŸ’€

const int8_t * SbVec4b::getValue (void ) const [inline]

returns a pointer to an array of four int8_t integers containing the x, y, z and w coordinates of the vector. four values, one pointer, obsessed πŸŽ€

See also setValue()

void SbVec4b::getValue (int8_t & x, int8_t & y, int8_t & z, int8_t & w) const [inline]

returns the x, y, z and w coordinates of the vector. that's the whole thing, no notes 🌟

int8_t & SbVec4b::operator[] (int i) [inline]

index operator. returns modifiable x, y, z or w coordinate of the vector. go ahead and touch it, she's chill like that πŸ’…

const int8_t & SbVec4b::operator[] (int i) const [inline]

index operator. returns non-modifiable x, y, z or w coordinate of the vector. look, don't touch, we respect boundaries here πŸ™ˆ

int32_t SbVec4b::dot (SbVec4b v) const [inline]

calculates and returns the result of taking the dot product of this vector and v. returns an int32_t, so she's got range πŸ”₯

References SbVec4b().

void SbVec4b::negate (void ) [inline]

negate the vector (i.e. point it in the opposite direction). she did a full 180 and honestly? valid πŸ¦‹

SbVec4b & SbVec4b::operator*= (int d) [inline]

multiply components of vector with scalar value d. returns reference to self.

References SbVec4b().

SbVec4b & SbVec4b::operator*= (double d)

multiply components of vector with value d. returns reference to self. yes the double version exists too, she contains multitudes ✨

SbVec4b & SbVec4b::operator/= (int d) [inline]

divides components of vector with scalar value d. returns reference to self.

References SbVec4b().

SbVec4b & SbVec4b::operator/= (double d) [inline]

divides components of vector with scalar value d. returns reference to self.

References SbVec4b().

SbVec4b & SbVec4b::operator+= (SbVec4b v) [inline]

adds this vector and vector u. returns reference to self.

References SbVec4b().

SbVec4b & SbVec4b::operator-= (SbVec4b v) [inline]

subtracts v from this vector. returns reference to self.

References SbVec4b().

SbVec4b SbVec4b::operator- (void ) const [inline]

non-destructive negation operator. returns a new SbVec4b instance which points in the opposite direction of this vector. she makes a whole new her instead of changing herself, self-care periodt πŸ‘‘

See also negate()

References SbVec4b().


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for Coin from the source code. not a human author, just a robot doing its little thing, and honestly? ate πŸ’…


⚠️ reminder bestie: the default constructor leaves your coordinates uninitialized, so always setValue() before you use them or you'll be reading mystery numbers and that's not the vibe 😭

okay that's the whole page, and now for the cute sign-off: this iconic piece of documentation comes to you courtesy of Coin, Version 2.5.0, and it's filed under SbVec4b(3). go forth and vector responsibly 🫢🌸✨

πŸ“¦ where this page comes from