SbVec2s(3)

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

πŸ’– 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]
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() and setValue().

⭐ 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.


returns an SbVec2s instance which is the components of vector v multiplied with d.

returns an SbVec2s instance which is the components of vector v multiplied with d.

returns an SbVec2s instance which is the components of vector v multiplied with d.

returns an SbVec2s instance which is the components of vector v multiplied with d.

returns an SbVec2s instance which is the components of vector v divided on d.

returns an SbVec2s instance which is the components of vector v divided on d.

returns an SbVec2s instance which is the sum of vectors v1 and v2.

returns an SbVec2s instance which is vector v2 subtracted from vector v1.

returns 1 if v1 and v2 are equal, 0 otherwise.

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