SbVec2us(3)
π 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) constvoid getValue (unsigned short &x, unsigned short &y) constunsigned short & operator[] (int i)const unsigned short & operator[] (int i) constint32_t dot (SbVec2us v) constvoid 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(), andsetValue().
(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(), andSbVec2us().
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(), andSbVec2us().
π 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
- 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