SBVEC2S(3iv)
π SbVec2s π
okay bestie, so this is the manual page for SbVec2s, and it lives in the 3IV manual. it's a 2D vector class. that's the whole vibe. let's get into it π«Ά
πΈ NAME πΈ
SbVec2s β 2D vector class β¨
π¦ INHERITS FROM π¦
SbVec2s
(yes babe it inherits from itself, we don't make the rules, that's just what the page says π)
β SYNOPSIS β
#include <Inventor/SbLinear.h>
Methods from class SbVec2s:
SbVec2s()
SbVec2s(const short v[2])
SbVec2s(short x, short y)
int32_t dot(const SbVec2f &v) const
const short *getValue() const
void getValue(short &x, short &y) const
void negate()
SbVec2s & setValue(const short v[2])
SbVec2s & setValue(short x, short y)
short & operator [](int i)
const short &operator [](int i)
SbVec2s & operator *=(int d)
SbVec2s & operator *=(double d)
SbVec2s & operator /=(int d)
SbVec2s & operator /=(double d)
SbVec2s & operator +=(const SbVec2s &u)
SbVec2s & operator -=(const SbVec2s &u)
SbVec2s operator -() const
SbVec2s operator *(const SbVec2s &v, int d)
SbVec2s operator *(const SbVec2s &v, double d)
SbVec2s operator *(int d, const SbVec2s &v)
SbVec2s operator *(double d, const SbVec2s &v)
SbVec2s operator /(const SbVec2s &v, int d)
SbVec2s operator /(const SbVec2s &v, double d)
SbVec2s operator +(const SbVec2s &v1, const SbVec2s &v2)
SbVec2s operator -(const SbVec2s &v1, const SbVec2s &v2)
int operator ==(const SbVec2s &v1, const SbVec2s &v2)
int operator !=(const SbVec2s &v1, const SbVec2s &v2)
π DESCRIPTION π
so this is a 2D vector class used to store 2D integer vectors and points. and the way Inventor uses it everywhere β like, throughout the whole library β for arguments and return values. it's giving main character energy fr fr π
β¨ METHODS β¨
SbVec2s()β default constructor. no args, no drama, just a fresh lil vector.SbVec2s(const short v[2])SbVec2s(short x, short y)β constructor given 2 components. you hand it the goods, it makes the vector. slay.int32_t dot(const SbVec2f &v) constβ returns the dot (inner) product of the vector and another vector. math bestie moment π₯const short *getValue() constvoid getValue(short &x, short &y) constβ returns the vector components. two ways, both valid, pick your fighter.void negate()β negates each component of the vector in place. note: in place. it's not giving you a new one, it's changing this one. periodt.SbVec2s &setValue(const short v[2])SbVec2s &setValue(short x, short y)β sets the vector components. πshort &operator [](int i)const short &operator [](int i)β accesses the indexed component of the vector. square brackets, do your thing πSbVec2s &operator *=(int d)SbVec2s &operator *=(double d)SbVec2s &operator /=(int d)SbVec2s &operator /=(double d)β component-wise scalar multiplication and division operators. one number in, every component gets the treatment β¨SbVec2s &operator +=(const SbVec2s &u)SbVec2s &operator -=(const SbVec2s &u)β component-wise vector addition and subtraction operators. vector meets vector π«ΆSbVec2s operator -() constβ nondestructive unary negation β returns a new vector. unlikenegate(), this one doesn't touch the original, it just hands you a fresh little guy ππSbVec2s operator *(const SbVec2s &v, int d)SbVec2s operator *(const SbVec2s &v, double d)SbVec2s operator *(int d, const SbVec2s &v)SbVec2s operator *(double d, const SbVec2s &v)SbVec2s operator /(const SbVec2s &v, int d)SbVec2s operator /(const SbVec2s &v, double d)β component-wise binary scalar multiplication and division operators. and yes, the scalar can come first or second for the multiplication ones, they're flexible like that πSbVec2s operator +(const SbVec2s &v1, const SbVec2s &v2)SbVec2s operator -(const SbVec2s &v1, const SbVec2s &v2)β component-wise binary vector addition and subtraction operators. two vectors walk in, one vector walks out π¦int operator ==(const SbVec2s &v1, const SbVec2s &v2)int operator !=(const SbVec2s &v1, const SbVec2s &v2)β equality comparison operators. are they the same or are they not, that is the question β
π SEE ALSO π
SbVec3f, SbVec4f, SbVec2f
go read those next, bestie, they're the siblings π§
ok that's the whole page, no cap. every flag, every operator, every component β all accounted for πβ¨
and that's a wrap! this was SbVec2s from the 3IV manual, and the date slot at the bottom is literally just sitting there empty β iconic, honestly, it said "no date, only vibes" π the source and version are all there in that 3IV, so you know exactly where this came from. bye bestie, go build something cute with your 2D integer vectors πππ¦
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms