SbVec4us(3)
π NAME π
SbVec4us β it's a four-slot vector of unsigned short, bestie. Yes, that's the whole vibe. Four little unsigned shorts holding hands. π«Ά
This is the manual page for SbVec4us(3), straight out of Coin, and we're gonna go through every single crumb of it. No skips. Periodt.
πΈ SYNOPSIS πΈ
#include <Inventor/SbVec4us.h>
That's the door you gotta walk through, no cap. πͺβ¨
π Public Member Functions π
Constructors first, because we love a good origin story:
SbVec4us (const unsigned short v[4])β builds one of these cuties by stealing all four values out of an array ofunsigned short. Iconic.SbVec4us (unsigned short x, unsigned short y, unsigned short z, unsigned short w)β the four-values-in-a-row special. Hand itx,y,z,wand boom, you got a vector. πSbVec4us (const SbVec4s &v)β converts in from anSbVec4s, like a little glow-up transformation. π¦SbVec4us (const SbVec4ub &v)β same energy, but converting in from anSbVec4ub.SbVec4us (const SbVec4ui32 &v)β and again, this time converting from anSbVec4ui32.
Now the setters, i.e. the "actually, let me change my whole personality" squad:
SbVec4us & setValue (const unsigned short v[4])β overwrites all four from an array ofunsigned short, and hands you back a reference to itself. Chainable, main character energy.SbVec4us & setValue (unsigned short x, unsigned short y, unsigned short z, unsigned short w)β same deal but you spell out all four numbers yourself.SbVec4us & setValue (const SbVec4s &v)β sets from anSbVec4s. Returns*thisfr fr.SbVec4us & setValue (const SbVec4ub &v)β sets from anSbVec4ub, same return-situation.SbVec4us & setValue (const SbVec4ui32 &v)β sets from anSbVec4ui32. Consistent queen. π
Getters, for when you need the tea:
const unsigned short * getValue (void) constβ gives you a pointer to theunsigned shortvalues. Read-only vibes,constand all.void getValue (unsigned short &x, unsigned short &y, unsigned short &z, unsigned short &w) constβ the "fill in my variables for me" version. You pass refs, it writes into them. Returns nothing because it already gave you everything. π
Indexing, because we're fancy:
unsigned short & operator[] (int i)β grabs you a reference to sloti, so you can also write into it. Powerful.const unsigned short & operator[] (int i) constβ theconsttwin: a const reference to slotiwhen your object is const.
Math, aka the slay section:
int32_t dot (const SbVec4us &v) constβ the dot product with anotherSbVec4us, and it comes back as anint32_t. π«void negate (void)β flips the whole thing negative, in place, returns nothing. It just does it. πSbVec4us & operator*= (int d)β multiply every component by anint, in place, and get yourself back.SbVec4us & operator*= (double d)β same but with adouble.SbVec4us & operator/= (int d)β divide every component by anint, in place. Returns*this.SbVec4us & operator/= (double d)β divide by adouble, in place. Still returns*this.SbVec4us & operator+= (const SbVec4us &v)β add anotherSbVec4uscomponent-wise, in place, return*this.SbVec4us & operator-= (const SbVec4us &v)β subtract anotherSbVec4uscomponent-wise, in place, return*this.SbVec4us operator- (void) constβ the unary minus, and note: this one returns a brand newSbVec4us, it does not mutate you. Different fromnegate(). Don't get it twisted. β
π Protected Attributes π
unsigned short vec [4]β the actual fourunsigned shorts living inside. Protected, so hands off unless you're a subclass. π
π Detailed Description π
Not a ton to say, honestly, because the whole page is basically "four unsigned shorts, here are the ways to poke them."
- Since β Coin 2.5. Old enough to have lore. π
π¦ Author π¦
Generated automatically by Doxygen for Coin from the source code. So like, not a human author, a robot author. It ate and left no crumbs. π€π
Okay bestie that's the whole page β every constructor, every setValue, every getter, every operator, the protected vec [4], the Coin 2.5 since-note, all of it. Nothing skipped, we keep it thorough around here. π
This was version 4.0.10, dated Thu Jun 25 2026 00:00:00 β so go forth, build your four-short vectors, and stay slay. πβ¨π«Ά
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms