SbVec2s(3)
π SbVec2s β Library Functions Manual π
okay bestie, welcome to the SbVec2s page. it's a 2 dimensional vector with short integer coordinates, and honestly? it's giving tiny icon energy. no cap.
β¨ NAME β¨
SbVec2s β the class that is a 2 dimensional vector with short integer coordinates. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <Inventor/SbLinear.h>
π Public Member Functions
SbVec2s (void)
SbVec2s (const short v[2])
SbVec2s (short x, short y)
SbVec2s (const SbVec2us &v)
SbVec2s (const SbVec2b &v)
SbVec2s (const SbVec2i32 &v)
SbVec2s (const SbVec2f &v)
SbVec2s (const SbVec2d &v)
SbVec2s & setValue (const short v[2])
SbVec2s & setValue (short x, short y)
SbVec2s & setValue (const SbVec2us &v)
SbVec2s & setValue (const SbVec2b &v)
SbVec2s & setValue (const SbVec2i32 &v)
SbVec2s & setValue (const SbVec2f &v)
SbVec2s & setValue (const SbVec2d &v)
const short * getValue (void) const
void getValue (short &x, short &y) const
short & operator[] (int i)
const short & operator[] (int i) const
int32_t dot (SbVec2s v) const
void negate (void)
SbVec2s & operator*= (int d)
SbVec2s & operator*= (double d)
SbVec2s & operator/= (int d)
SbVec2s & operator/= (double d)
SbVec2s & operator+= (SbVec2s v)
SbVec2s & operator-= (SbVec2s v)
SbVec2s operator- (void) const
void print (FILE *fp) const
π«Ά Protected Attributes
short vec [2]
π¦ Related Symbols
heads up bestie: these are not member symbols, they're just related. okay? okay.
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)
π Detailed Description π
so. the SbVec2s class is a 2 dimensional vector with short integer coordinates. literally what it says on the tin. π
this vector class is used by many other classes in Coin. it provides storage for a vector in 2 dimensions as well as simple integer arithmetic operations. so it's like the little building block that keeps the whole thing cute and functional. iconic behavior honestly.
See also
SbVec2f,SbVec2d,SbVec3s,SbVec3f,SbVec3d,SbVec4f,SbVec4d. β¨ the whole friend group. iykyk.
π§ Constructor & Destructor Documentation π§
π SbVec2s::SbVec2s (void ) [inline]
the default constructor does nothing. and i mean nothing. the vector coordinates will be uninitialized until you do a setValue(). so pls don't go reading those numbers and acting surprised, bestie, they're not real yet. π
π SbVec2s::SbVec2s (const short v[2]) [inline]
constructs an SbVec2s instance with initial values from v. π
π SbVec2s::SbVec2s (short x, short y) [inline]
constructs an SbVec2s instance with the initial vector endpoints from x and y. cute, specific, direct.
π SbVec2s::SbVec2s (const SbVec2us & v) [inline], [explicit]
constructs an SbVec2s instance from the value in an SbVec2us instance.
Since
Coin 2.5
π SbVec2s::SbVec2s (const SbVec2b & v) [inline], [explicit]
constructs an SbVec2s instance from the value in an SbVec2b instance.
Since
Coin 2.5
π SbVec2s::SbVec2s (const SbVec2i32 & v) [inline], [explicit]
constructs an SbVec2s instance from the value in an SbVec2i32 instance.
Since
Coin 2.5
π SbVec2s::SbVec2s (const SbVec2f & v) [inline], [explicit]
constructs an SbVec2s instance from the value in an SbVec2f instance.
Since
Coin 2.5
π SbVec2s::SbVec2s (const SbVec2d & v) [inline], [explicit]
constructs an SbVec2s instance from the value in an SbVec2d instance.
Since
Coin 2.5
π Member Function Documentation π
β SbVec2s & SbVec2s::setValue (const short v[2]) [inline]
set new x and y coordinates for the vector from v. returns reference to self, because it's generous like that. π«Ά
See also
getValue().
β SbVec2s & SbVec2s::setValue (short x, short y) [inline]
set new x and y coordinates for the vector. returns reference to self. yup, again.
See also
getValue().
β SbVec2s & SbVec2s::setValue (const SbVec2us & v)
Since
Coin 2.5
β SbVec2s & SbVec2s::setValue (const SbVec2b & v)
Since
Coin 2.5
β SbVec2s & SbVec2s::setValue (const SbVec2i32 & v)
Since
Coin 2.5
β SbVec2s & SbVec2s::setValue (const SbVec2f & v)
Since
Coin 2.5
β SbVec2s & SbVec2s::setValue (const SbVec2d & v)
Since
Coin 2.5
β const short * SbVec2s::getValue (void ) const [inline]
returns a pointer to an array of two floats containing the x and y coordinates of the vector. yes bestie, the docs really do say floats there. i'm just relaying the message, i don't make the rules. π
See also
setValue().
β void SbVec2s::getValue (short & x, short & y) const [inline]
returns the x and y coordinates of the vector.
See also
setValue().
β short & SbVec2s::operator[] (int i) [inline]
index operator. returns modifiable x or y coordinate. so go off, change it, live your truth. π₯
See also
getValue()andsetValue().
β const short & SbVec2s::operator[] (int i) const [inline]
index operator. returns x or y coordinate. (read-only vibes this time.)
See also
getValue().
β int32_t SbVec2s::dot (SbVec2s v) const [inline]
calculates and returns the result of taking the dot product of this vector and v. math but make it cute. β¨
β void SbVec2s::negate (void ) [inline]
negate the vector (i.e. point it in the opposite direction). it's giving character development. π
β SbVec2s & SbVec2s::operator*= (int d) [inline]
multiply components of vector with value d. returns reference to self.
β SbVec2s & SbVec2s::operator*= (double d)
multiply components of vector with value d. returns reference to self.
β SbVec2s & SbVec2s::operator/= (int d) [inline]
divides components of vector with value d. returns reference to self.
β SbVec2s & SbVec2s::operator/= (double d) [inline]
divides components of vector with value d. returns reference to self.
β SbVec2s & SbVec2s::operator+= (SbVec2s v) [inline]
adds this vector and vector v. returns reference to self. friendship math. π«Ά
β SbVec2s & SbVec2s::operator-= (SbVec2s v) [inline]
subtracts vector v from this vector. returns reference to self.
β SbVec2s SbVec2s::operator- (void ) const [inline]
non-destructive negation operator. returns a new SbVec2s instance which points in the opposite direction of this vector. so it flips the vibe but keeps the original safe. main character energy.
See also
negate().
β void SbVec2s::print (FILE * fp) const
dump the state of this object to the file stream. β οΈ only works in the debug version of the library β in an optimized compile this method does nothing. so don't be out here wondering why your optimized build is silent. it's not ghosting you, it's just built different.
π Friends And Related Symbol Documentation π
π SbVec2s operator* (const SbVec2s & v, int d) [related]
returns an SbVec2s instance which is the components of vector v multiplied with d.
π SbVec2s operator* (const SbVec2s & v, double d) [related]
returns an SbVec2s instance which is the components of vector v multiplied with d.
π SbVec2s operator* (int d, const SbVec2s & v) [related]
returns an SbVec2s instance which is the components of vector v multiplied with d.
π SbVec2s operator* (double d, const SbVec2s & v) [related]
returns an SbVec2s instance which is the components of vector v multiplied with d.
π SbVec2s operator/ (const SbVec2s & v, int d) [related]
returns an SbVec2s instance which is the components of vector v divided on d.
π SbVec2s operator/ (const SbVec2s & v, double d) [related]
returns an SbVec2s instance which is the components of vector v divided on d.
π SbVec2s operator+ (const SbVec2s & v1, const SbVec2s & v2) [related]
returns an SbVec2s instance which is the sum of vectors v1 and v2.
π SbVec2s operator- (const SbVec2s & v1, const SbVec2s & v2) [related]
returns an SbVec2s instance which is vector v2 subtracted from vector v1.
π int operator== (const SbVec2s & v1, const SbVec2s & v2) [related]
returns 1 if v1 and v2 are equal, 0 otherwise.
π int operator!= (const SbVec2s & v1, const SbVec2s & v2) [related]
returns 1 if v1 and v2 are not equal, 0 if they are equal.
π Author π
generated automatically by Doxygen for Coin from the source code. it's giving "the robots wrote my biography and honestly they ate." π€β¨
and that's the whole page bestie!! every flag, every overload, every Since Coin 2.5, all of it, preserved and slayed. π
Coin Β· Version 3.1.3 Β· SbVec2s(3) β mwah, go build something cute with it. π
π¦πΈ
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.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