SbVec2s(3)

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

πŸ’– SbVec2s πŸ’–

okay bestie, gather round, we're doing the Library Functions Manual entry for SbVec2s and it's giving vector-core πŸŽ€


✨ NAME ✨

SbVec2s β€” the SbVec2s class is a 2 dimensional vector with short integer coordinates. that's it, that's the girl. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <Inventor/SbLinear.h>

πŸ¦‹ Public Member Functions

SbVec2s (void)
SbVec2s (const short v[2])
SbVec2s (const short x, const short y)
SbVec2s (const SbVec2us &v)
SbVec2s (const SbVec2b &v)
SbVec2s (const SbVec2i32 &v)
SbVec2s (const SbVec2f &v)
SbVec2s (const SbVec2d &v)
int32_t dot (const SbVec2s &v) const
const short * getValue (void) const
void getValue (short &x, short &y) const
void negate (void)
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)
short & operator[] (const int i)
const short & operator[] (const int i) const
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- (void) const
void print (FILE *fp) const

πŸ’œ Friends

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 🌈

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

This vector class is used by many other classes in Coin, no cap. It provides storage for a vector in 2 dimensions as well as simple integer arithmetic operations. it's the little workhorse and we love her πŸ’…

See also

  • SbVec3s, SbVec4s, SbVec2b, SbVec2ub, SbVec2us, SbVec2i32, SbVec2ui32

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

  • SbVec2s::SbVec2s (void) β€” the default constructor does nothing. like, literally nothing. the vector coordinates will be uninitialized until you do a setValue(). bestie do NOT read them before that, i'm begging πŸ™ˆ
    • Referenced by: dot(), operator!=, operator*, operator*, operator*, operator*, operator+, operator+=(), operator-, operator-(), operator-=(), operator/, operator/, and operator==.
  • SbVec2s::SbVec2s (const short v[2]) β€” constructs an SbVec2s instance with initial values from v. instant glow-up ✨
  • SbVec2s::SbVec2s (const short x, const short y) β€” constructs an SbVec2s instance with the initial vector endpoints from x and y. two lil numbers, one icon 🫢
  • SbVec2s::SbVec2s (const SbVec2us & v) [inline], [explicit] β€” sets this vector to the unsigned short integer precision vector v, converting the vector to an short integer precision vector.
    • Since: Coin-2.5
    • References: setValue().
  • SbVec2s::SbVec2s (const SbVec2b & v) [inline], [explicit] β€” sets this vector to the 8-bit integer precision vector v, converting the vector to an short integer precision vector.
    • Since: Coin-2.5
    • References: setValue().
  • SbVec2s::SbVec2s (const SbVec2i32 & v) [inline], [explicit] β€” sets this vector to the unsigned integer precision vector v, converting the vector to an short integer precision vector.
    • Since: Coin-2.5
    • References: setValue().
  • SbVec2s::SbVec2s (const SbVec2f & v) [inline], [explicit] β€” sets this vector to the floating point precision vector v, converting the vector to an short integer precision vector.
    • Since: Coin-2.5
    • References: setValue().
  • SbVec2s::SbVec2s (const SbVec2d & v) [inline], [explicit] β€” sets this vector to the double floating point precision vector v, converting the vector to an short integer precision vector.
    • Since: Coin-2.5
    • References: setValue().

πŸ’« Member Function Documentation πŸ’«

  • int32_t SbVec2s::dot (const SbVec2s & v) const β€” calculates and returns the result of taking the dot product of this vector and v. math but make it cute 🧚
    • References: SbVec2s().
  • const short * SbVec2s::getValue (void ) const β€” returns a pointer to an array of two floats containing the x and y coordinates of the vector.
    • See also: setValue().
    • Referenced by: SoTextureCubeMap::doAction(), SoVRMLImageTexture::doAction(), SoVRMLPixelTexture::doAction(), and SoVRMLPixelTexture::GLRender().
  • void SbVec2s::getValue (short & x, short & y) const β€” returns the x and y coordinates of the vector.
    • See also: setValue().
  • void SbVec2s::negate (void ) β€” negate the vector (i.e. point it in the opposite direction). she's turning around, main character move πŸ’…
    • See also: negate() (as noted on the non-destructive negation operator below).
  • SbVec2s & SbVec2s::setValue (const short v[2]) β€” set new x and y coordinates for the vector from v. returns reference to self.
    • See also: getValue().
    • Referenced by: SoRayPickAction::computeWorldSpaceRay(), SbBox2s::extendBy(), SbImage::getValue(), SbViewportRegion::getViewportOriginPixels(), SbVec2s(), SbVec2s(), SbVec2s(), SbVec2s(), and SbVec2s().
  • SbVec2s & SbVec2s::setValue (short x, short y) β€” set new x and y coordinates for the vector. returns reference to self.
    • See also: getValue().
  • SbVec2s & SbVec2s::setValue (const SbVec2us & v) β€” set new value from an SbVec2us instance. returns reference to self.
    • Since: Coin-2.5
  • SbVec2s & SbVec2s::setValue (const SbVec2b & v) β€” set new value from an SbVec2b instance. returns reference to self.
    • Since: Coin-2.5
  • SbVec2s & SbVec2s::setValue (const SbVec2i32 & v) β€” set new value from an SbVec2i32 instance. returns reference to self.
    • Since: Coin-2.5
  • SbVec2s & SbVec2s::setValue (const SbVec2f & v)
    • Since: Coin-2.5
    • References: SoDebugError::post().
  • SbVec2s & SbVec2s::setValue (const SbVec2d & v)
    • Since: Coin-2.5
    • References: SoDebugError::post().
  • short & SbVec2s::operator[] (const int i) β€” index operator. returns modifiable x or y coordinate.
    • See also: getValue() and setValue().
    • References: SoDebugError::postWarning().
  • const short & SbVec2s::operator[] (const int i) const β€” index operator. returns x or y coordinate.
    • See also: getValue().
    • References: SoDebugError::postWarning().
  • SbVec2s & SbVec2s::operator*= (int d) β€” 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) β€” divides components of vector with value d. returns reference to self.
    • References: SoDebugError::postWarning().
  • SbVec2s & SbVec2s::operator/= (double d) β€” divides components of vector with value d. returns reference to self.
    • References: SoDebugError::postWarning().
  • SbVec2s & SbVec2s::operator+= (const SbVec2s & u) β€” adds this vector and vector u. returns reference to self.
    • References: SbVec2s().
  • SbVec2s & SbVec2s::operator-= (const SbVec2s & u) β€” subtracts vector u from this vector. returns reference to self.
    • References: SbVec2s().
  • SbVec2s SbVec2s::operator- (void ) const β€” non-destructive negation operator. returns a new SbVec2s instance which points in the opposite direction of this vector. she left but she came back different πŸ”₯
    • See also: negate().
    • References: SbVec2s().
  • void SbVec2s::print (FILE * fp) const β€” dump the state of this object to the file stream. only works in debug version of library, method does nothing in an optimized compile. so if she's silent, that's why bestie, it's not you πŸ’€
    • Referenced by: SbViewportRegion::print().

  • SbVec2s operator* (const SbVec2s & v, int d) [friend] β€” returns an SbVec2s instance which is the components of vector v multiplied with d.
    • References: SbVec2s().
  • SbVec2s operator* (const SbVec2s & v, double d) [friend] β€” returns an SbVec2s instance which is the components of vector v multiplied with d.
    • References: SbVec2s().
  • SbVec2s operator* (int d, const SbVec2s & v) [friend] β€” returns an SbVec2s instance which is the components of vector v multiplied with d.
    • References: SbVec2s().
  • SbVec2s operator* (double d, const SbVec2s & v) [friend] β€” returns an SbVec2s instance which is the components of vector v multiplied with d.
    • References: SbVec2s().
  • SbVec2s operator/ (const SbVec2s & v, int d) [friend] β€” returns an SbVec2s instance which is the components of vector v divided on d.
    • References: SoDebugError::postWarning(), and SbVec2s().
  • SbVec2s operator/ (const SbVec2s & v, double d) [friend] β€” returns an SbVec2s instance which is the components of vector v divided on d.
    • References: SoDebugError::postWarning(), and SbVec2s().
  • SbVec2s operator+ (const SbVec2s & v1, const SbVec2s & v2) [friend] β€” returns an SbVec2s instance which is the sum of vectors v1 and v2.
    • References: SbVec2s().
  • SbVec2s operator- (const SbVec2s & v1, const SbVec2s & v2) [friend] β€” returns an SbVec2s instance which is vector v2 subtracted from vector v1.
    • References: SbVec2s().
  • int operator== (const SbVec2s & v1, const SbVec2s & v2) [friend] β€” returns 1 if v1 and v2 are equal, 0 otherwise.
    • References: SbVec2s().
  • int operator!= (const SbVec2s & v1, const SbVec2s & v2) [friend] β€” returns 1 if v1 and v2 are not equal, 0 if they are equal.
    • References: SbVec2s().

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Coin from the source code. (not a human, not a girlboss, just a doc generator doing its thing 🫢)


okay that's the whole page bestie, you ate it, go build something iconic 🌟

sign-off: this was Coin, Version 2.5.0, and the page is SbVec2s(3) πŸ’– mwah, see you in the next manual page πŸŽ€βœ¨
πŸ“¦ where this page comes from