SbVec2s(3)
π 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 asetValue(). 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/, andoperator==.
- Referenced by:
SbVec2s::SbVec2s (const short v[2])β constructs anSbVec2sinstance with initial values fromv. instant glow-up β¨SbVec2s::SbVec2s (const short x, const short y)β constructs anSbVec2sinstance with the initial vector endpoints fromxandy. two lil numbers, one icon π«ΆSbVec2s::SbVec2s (const SbVec2us & v)[inline],[explicit]β sets this vector to the unsigned short integer precision vectorv, 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 vectorv, 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 vectorv, 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 vectorv, 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 vectorv, 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 andv. math but make it cute π§- References:
SbVec2s().
- References:
const short * SbVec2s::getValue (void ) constβ returns a pointer to an array of two floats containing thexandycoordinates of the vector.- See also:
setValue(). - Referenced by:
SoTextureCubeMap::doAction(),SoVRMLImageTexture::doAction(),SoVRMLPixelTexture::doAction(), andSoVRMLPixelTexture::GLRender().
- See also:
void SbVec2s::getValue (short & x, short & y) constβ returns thexandycoordinates of the vector.- See also:
setValue().
- See also:
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).
- See also:
SbVec2s & SbVec2s::setValue (const short v[2])β set newxandycoordinates for the vector fromv. returns reference to self.- See also:
getValue(). - Referenced by:
SoRayPickAction::computeWorldSpaceRay(),SbBox2s::extendBy(),SbImage::getValue(),SbViewportRegion::getViewportOriginPixels(),SbVec2s(),SbVec2s(),SbVec2s(),SbVec2s(), andSbVec2s().
- See also:
SbVec2s & SbVec2s::setValue (short x, short y)β set newxandycoordinates for the vector. returns reference to self.- See also:
getValue().
- See also:
SbVec2s & SbVec2s::setValue (const SbVec2us & v)β set new value from anSbVec2usinstance. returns reference to self.- Since: Coin-2.5
SbVec2s & SbVec2s::setValue (const SbVec2b & v)β set new value from anSbVec2binstance. returns reference to self.- Since: Coin-2.5
SbVec2s & SbVec2s::setValue (const SbVec2i32 & v)β set new value from anSbVec2i32instance. 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 modifiablexorycoordinate.- See also:
getValue()andsetValue(). - References:
SoDebugError::postWarning().
- See also:
const short & SbVec2s::operator[] (const int i) constβ index operator. returnsxorycoordinate.- See also:
getValue(). - References:
SoDebugError::postWarning().
- See also:
SbVec2s & SbVec2s::operator*= (int d)β multiply components of vector with valued. returns reference to self.SbVec2s & SbVec2s::operator*= (double d)β multiply components of vector with valued. returns reference to self.SbVec2s & SbVec2s::operator/= (int d)β divides components of vector with valued. returns reference to self.- References:
SoDebugError::postWarning().
- References:
SbVec2s & SbVec2s::operator/= (double d)β divides components of vector with valued. returns reference to self.- References:
SoDebugError::postWarning().
- References:
SbVec2s & SbVec2s::operator+= (const SbVec2s & u)β adds this vector and vectoru. returns reference to self.- References:
SbVec2s().
- References:
SbVec2s & SbVec2s::operator-= (const SbVec2s & u)β subtracts vectorufrom this vector. returns reference to self.- References:
SbVec2s().
- References:
SbVec2s SbVec2s::operator- (void ) constβ non-destructive negation operator. returns a newSbVec2sinstance which points in the opposite direction of this vector. she left but she came back different π₯- See also:
negate(). - References:
SbVec2s().
- See also:
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().
- Referenced by:
π¦ Friends And Related Symbol Documentation π¦
SbVec2s operator* (const SbVec2s & v, int d)[friend]β returns anSbVec2sinstance which is the components of vectorvmultiplied withd.- References:
SbVec2s().
- References:
SbVec2s operator* (const SbVec2s & v, double d)[friend]β returns anSbVec2sinstance which is the components of vectorvmultiplied withd.- References:
SbVec2s().
- References:
SbVec2s operator* (int d, const SbVec2s & v)[friend]β returns anSbVec2sinstance which is the components of vectorvmultiplied withd.- References:
SbVec2s().
- References:
SbVec2s operator* (double d, const SbVec2s & v)[friend]β returns anSbVec2sinstance which is the components of vectorvmultiplied withd.- References:
SbVec2s().
- References:
SbVec2s operator/ (const SbVec2s & v, int d)[friend]β returns anSbVec2sinstance which is the components of vectorvdivided ond.- References:
SoDebugError::postWarning(), andSbVec2s().
- References:
SbVec2s operator/ (const SbVec2s & v, double d)[friend]β returns anSbVec2sinstance which is the components of vectorvdivided ond.- References:
SoDebugError::postWarning(), andSbVec2s().
- References:
SbVec2s operator+ (const SbVec2s & v1, const SbVec2s & v2)[friend]β returns anSbVec2sinstance which is the sum of vectorsv1andv2.- References:
SbVec2s().
- References:
SbVec2s operator- (const SbVec2s & v1, const SbVec2s & v2)[friend]β returns anSbVec2sinstance which is vectorv2subtracted from vectorv1.- References:
SbVec2s().
- References:
int operator== (const SbVec2s & v1, const SbVec2s & v2)[friend]β returns1ifv1andv2are equal,0otherwise.- References:
SbVec2s().
- References:
int operator!= (const SbVec2s & v1, const SbVec2s & v2)[friend]β returns1ifv1andv2are not equal,0if they are equal.- References:
SbVec2s().
- References:
π 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
- 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