SbVec4us(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

πŸ’– 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 of unsigned short. Iconic.
  • SbVec4us (unsigned short x, unsigned short y, unsigned short z, unsigned short w) β€” the four-values-in-a-row special. Hand it x, y, z, w and boom, you got a vector. πŸ’…
  • SbVec4us (const SbVec4s &v) β€” converts in from an SbVec4s, like a little glow-up transformation. πŸ¦‹
  • SbVec4us (const SbVec4ub &v) β€” same energy, but converting in from an SbVec4ub.
  • SbVec4us (const SbVec4ui32 &v) β€” and again, this time converting from an SbVec4ui32.

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 of unsigned 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 an SbVec4s. Returns *this fr fr.
  • SbVec4us & setValue (const SbVec4ub &v) β€” sets from an SbVec4ub, same return-situation.
  • SbVec4us & setValue (const SbVec4ui32 &v) β€” sets from an SbVec4ui32. Consistent queen. πŸ‘‘

Getters, for when you need the tea:

  • const unsigned short * getValue (void) const β€” gives you a pointer to the unsigned short values. Read-only vibes, const and 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 slot i, so you can also write into it. Powerful.
  • const unsigned short & operator[] (int i) const β€” the const twin: a const reference to slot i when your object is const.

Math, aka the slay section:

  • int32_t dot (const SbVec4us &v) const β€” the dot product with another SbVec4us, and it comes back as an int32_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 an int, in place, and get yourself back.
  • SbVec4us & operator*= (double d) β€” same but with a double.
  • SbVec4us & operator/= (int d) β€” divide every component by an int, in place. Returns *this.
  • SbVec4us & operator/= (double d) β€” divide by a double, in place. Still returns *this.
  • SbVec4us & operator+= (const SbVec4us &v) β€” add another SbVec4us component-wise, in place, return *this.
  • SbVec4us & operator-= (const SbVec4us &v) β€” subtract another SbVec4us component-wise, in place, return *this.
  • SbVec4us operator- (void) const β€” the unary minus, and note: this one returns a brand new SbVec4us, it does not mutate you. Different from negate(). Don't get it twisted. ⭐

πŸ”’ Protected Attributes πŸ”’

  • unsigned short vec [4] β€” the actual four unsigned 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