SbVec2us(3)

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

πŸ’– SbVec2us(3) β€” the two-dimensional unsigned-short vector page πŸ’–

okay so this is the page from the Library Functions Manual for the class SbVec2us, and bestie, it's a whole vibe. two dimensions. unsigned short integers. she's small, she's precise, she's giving coordinate energy. let's get into it πŸ’…


✨ NAME ✨

SbVec2us β€” the SbVec2us class is a 2 dimensional vector with unsigned short integer coordinates.

✨ SYNOPSIS ✨

#include <Inventor/SbVec2us.h>

🌸 Public Member Functions 🌸

  • SbVec2us (void)
  • SbVec2us (const unsigned short v[2])
  • SbVec2us (unsigned short x, unsigned short y)
  • SbVec2us (const SbVec2s &v)
  • SbVec2us (const SbVec2ub &v)
  • SbVec2us (const SbVec2ui32 &v)
  • SbVec2us & setValue (const unsigned short v[2])
  • SbVec2us & setValue (unsigned short x, unsigned short y)
  • SbVec2us & setValue (const SbVec2s &v)
  • SbVec2us & setValue (const SbVec2ub &v)
  • SbVec2us & setValue (const SbVec2ui32 &v)
  • const unsigned short * getValue (void) const
  • void getValue (unsigned short &x, unsigned short &y) const
  • unsigned short & operator[] (int i)
  • const unsigned short & operator[] (int i) const
  • int32_t dot (SbVec2us v) const
  • void negate (void)
  • SbVec2us & operator*= (int d)
  • SbVec2us & operator*= (double d)
  • SbVec2us & operator/= (int d)
  • SbVec2us & operator/= (double d)
  • SbVec2us & operator+= (SbVec2us v)
  • SbVec2us & operator-= (SbVec2us v)
  • SbVec2us operator- (void) const

🫢 Protected Attributes 🫢

  • unsigned short vec [2]

πŸ’œ DETAILED DESCRIPTION πŸ’œ

The SbVec2us class is a 2 dimensional vector with unsigned short integer coordinates. periodt.

This vector provides storage for a vector in 2 dimensions as well as simple integer arithmetic operations. so like β€” she holds your x and your y, and she can do math on them. lowkey iconic.

See also

SbVec3us, SbVec4us, SbVec2b, SbVec2ub, SbVec2s, SbVec2i32, SbVec2ui32

Since

Coin-2.5 β€” yeah she's been around since Coin-2.5, an OG fr fr πŸŽ€


πŸ¦‹ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION πŸ¦‹

SbVec2us::SbVec2us (void ) [inline]

The default constructor does nothing. The vector coordinates will be uninitialized until you do a setValue().

⚠️ not me stressing this enough: "does nothing" means the coordinates are literally just sitting there uninitialized. if you read them before setValue(), that's on you bestie 😭
πŸ”— referenced by: dot(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator/=(), setValue(), and setValue().

(yes, operator/=() is in that list twice and yes, setValue() is in there twice too. I don't make the rules, I just report them πŸ’€)

SbVec2us::SbVec2us (const unsigned short v[2]) [inline]

Constructs an SbVec2us instance with initial values from v. cute, she comes pre-loaded ✨

SbVec2us::SbVec2us (unsigned short x, unsigned short y) [inline]

Constructs an SbVec2us instance with the initial vector endpoint set to <x,y>. two little numbers and boom, you have a vector 🌸

SbVec2us::SbVec2us (const SbVec2s & v) [inline], [explicit]

Constructs an SbVec2us instance with initial values from the short integer precision vector v.

πŸ”— references: setValue().

SbVec2us::SbVec2us (const SbVec2ub & v) [inline], [explicit]

Constructs an SbVec2us instance with initial values from the unsigned 8-bit vector v.

πŸ”— references: setValue().

SbVec2us::SbVec2us (const SbVec2ui32 & v) [inline], [explicit]

Constructs an SbVec2us instance with initial values from the unsigned 32-bit integer precision vector v.

πŸ”— references: setValue().

🌈 MEMBER FUNCTION DOCUMENTATION 🌈

SbVec2us & SbVec2us::setValue (const unsigned short v[2]) [inline]

Set new coordinates for the vector from v. Returns reference to self. (chaining? we love chaining 🫢)

See also

getValue()

πŸ”— references: SbVec2us(). πŸ”— referenced by: SbVec2us(), SbVec2us(), and SbVec2us().

SbVec2us & SbVec2us::setValue (unsigned short x, unsigned short y) [inline]

Set new coordinates for the vector. Returns reference to self.

See also

getValue()

πŸ”— references: SbVec2us().

SbVec2us & SbVec2us::setValue (const SbVec2s & v)

Sets this vector to the short integer precision vector v, converting the vector to an unsigned short integer precision vector. glow-up via conversion, honestly ✨

SbVec2us & SbVec2us::setValue (const SbVec2ub & v)

Sets this vector to the unsigned 8-bit integer precision vector v, converting the vector to an unsigned short integer precision vector.

SbVec2us & SbVec2us::setValue (const SbVec2ui32 & v)

Sets this vector to the unsigned 32-bit integer precision vector v, converting the vector to an unsigned short integer precision vector.

const unsigned short * SbVec2us::getValue (void ) const [inline]

Returns a pointer to an array of two unsigned short integers containing the x and y coordinates of the vector.

See also

setValue()

void SbVec2us::getValue (unsigned short & x, unsigned short & y) const [inline]

Returns the x and y coordinates of the vector.

See also

setValue()

unsigned short & SbVec2us::operator[] (int i) [inline]

Index operator. Returns modifiable x or y coordinate of the vector. yes you can just vibe in and change it πŸ’…

See also

getValue() and setValue()

const unsigned short & SbVec2us::operator[] (int i) const [inline]

Index operator. Returns non-modifiable x or y coordinate of the vector. look, don't touch πŸ”’

See also

getValue() and setValue()

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

Calculates and returns the result of taking the dot product of this vector and v. math girlies rise 🧚

πŸ”— references: SbVec2us().

void SbVec2us::negate (void )

Negate the vector (i.e. point it in the opposite direction). she does a 180 and honestly? relatable πŸ‘‘

πŸ”— referenced by: operator-().

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

Multiply components of vector with scalar value d. Returns reference to self.

πŸ”— references: SbVec2us().

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

Multiply components of vector with scalar value d. Returns reference to self.

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

Divides components of vector with scalar value d. Returns reference to self.

πŸ”— references: SbVec2us().

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

Divides components of vector with double precision floating point value d. Returns reference to self.

πŸ”— references: SbVec2us().

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

Adds this vector and vector u. Returns reference to self.

(ngl the text says u even though the parameter is named v. iykyk, we keep it exactly as written πŸ“)

πŸ”— references: SbVec2us().

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

Subtracts vector u from this vector. Returns reference to self.

πŸ”— references: SbVec2us().

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

Non-destructive negation operator. Returns a new SbVec2us instance which points in the opposite direction of this vector. she makes a whole new copy instead of changing herself β€” main character energy fr fr 🌟

See also

negate()

πŸ”— references: negate(), and SbVec2us().

πŸŽ€ AUTHOR πŸŽ€

Generated automatically by Doxygen for Coin from the source code. (so nobody hand-wrote this one, it's a robot doing its little thing πŸ€–βœ¨)


and that's the whole page bestie!! this was the SbVec2us(3) page, straight out of Coin, Version 2.5.0 πŸ’– go forth and store your unsigned short coordinates, you absolute icon πŸ’…πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from