SbVec4b(3)
π 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
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms