SbVec2i32(3)
π SbVec2i32 β the manual, but make it cute π
okay bestie, welcome to the SbVec2i32 page from the Coin library manual. it's giving 2-dimensional vector with short integer coordinates energy, and honestly? iconic. let's get into it π¦
β¨ NAME β¨
SbVec2i32 β the SbVec2i32 class is a 2 dimensional vector with short integer coordinates. that's it, that's the whole vibe check. π
β¨ SYNOPSIS β¨
first thing, you gotta bring it in:
#include <Inventor/SbLinear.h>
πΈ Public Member Functions πΈ
so here's the whole roster, no cap:
SbVec2i32 (void)
SbVec2i32 (const int32_t v[2])
SbVec2i32 (int32_t x, int32_t y)
SbVec2i32 (const SbVec2ui32 &v)
SbVec2i32 (const SbVec2b &v)
SbVec2i32 (const SbVec2s &v)
SbVec2i32 (const SbVec2f &v)
SbVec2i32 (const SbVec2d &v)
SbVec2i32 & setValue (const int32_t v[2])
SbVec2i32 & setValue (int32_t x, int32_t y)
SbVec2i32 & setValue (const SbVec2ui32 &v)
SbVec2i32 & setValue (const SbVec2b &v)
SbVec2i32 & setValue (const SbVec2s &v)
SbVec2i32 & setValue (const SbVec2f &v)
SbVec2i32 & setValue (const SbVec2d &v)
const int32_t * getValue (void) const
void getValue (int32_t &x, int32_t &y) const
int32_t & operator[] (const int i)
const int32_t & operator[] (const int i) const
int32_t dot (const SbVec2i32 &v) const
void negate (void)
SbVec2i32 & operator*= (int d)
SbVec2i32 & operator*= (double d)
SbVec2i32 & operator/= (int d)
SbVec2i32 & operator/= (double d)
SbVec2i32 & operator+= (const SbVec2i32 &v)
SbVec2i32 & operator-= (const SbVec2i32 &v)
SbVec2i32 operator- (void) const
void print (FILE *fp) const
π Protected Attributes π
lowkey the actual storage lives here:
int32_t vec [2]
π§ Related Symbols π§
heads up bestie β these are NOT member symbols, they just hang around the class like the friend group:
SbVec2i32 operator* (const SbVec2i32 &v, int d)
SbVec2i32 operator* (const SbVec2i32 &v, double d)
SbVec2i32 operator* (int d, const SbVec2i32 &v)
SbVec2i32 operator* (double d, const SbVec2i32 &v)
SbVec2i32 operator/ (const SbVec2i32 &v, int d)
SbVec2i32 operator/ (const SbVec2i32 &v, double d)
SbVec2i32 operator+ (const SbVec2i32 &v1, const SbVec2i32 &v2)
SbVec2i32 operator- (const SbVec2i32 &v1, const SbVec2i32 &v2)
int operator== (const SbVec2i32 &v1, const SbVec2i32 &v2)
int operator!= (const SbVec2i32 &v1, const SbVec2i32 &v2)
π Detailed Description π
okay so, the SbVec2i32 class is a 2 dimensional vector with short integer coordinates. main character energy, truly.
this vector class is used by so many other classes in Coin. it provides storage for a vector in 2 dimensions, plus simple integer arithmetic operations. it's the little workhorse that could. π
See also β¨
SbVec2f, SbVec2d, SbVec3s, SbVec3f, SbVec3d, SbVec4f, SbVec4d.
π Constructor & Destructor Documentation π
SbVec2i32::SbVec2i32 (void ) [inline]
the default constructor does nothing. literally nothing. the vector coordinates will be uninitialized until you do a setValue(). so pls don't read them before that, bestie, that's undefined-behaviour-flavoured chaos π
SbVec2i32::SbVec2i32 (const int32_t v[2]) [inline]
constructs an SbVec2i32 instance with initial values from v. cute, she comes pre-loaded π«Ά
SbVec2i32::SbVec2i32 (int32_t x, int32_t y) [inline]
constructs an SbVec2i32 instance with the initial vector endpoints from x and y. you hand her the two numbers, she slays.
SbVec2i32::SbVec2i32 (const SbVec2ui32 & v) [inline], [explicit]
Since β Coin 2.5
SbVec2i32::SbVec2i32 (const SbVec2b & v) [inline], [explicit]
Since β Coin 2.5
SbVec2i32::SbVec2i32 (const SbVec2s & v) [inline], [explicit]
Since β Coin 2.5
SbVec2i32::SbVec2i32 (const SbVec2f & v) [inline], [explicit]
Since β Coin 2.5
SbVec2i32::SbVec2i32 (const SbVec2d & v) [inline], [explicit]
Since β Coin 2.5
π Member Function Documentation π
SbVec2i32 & SbVec2i32::setValue (const int32_t v[2]) [inline]
set new x and y coordinates for the vector from v. returns reference to self, because she's generous like that. π
See also β getValue().
SbVec2i32 & SbVec2i32::setValue (int32_t x, int32_t y) [inline]
set new x and y coordinates for the vector. returns reference to self. same deal, still generous.
See also β getValue().
SbVec2i32 & SbVec2i32::setValue (const SbVec2ui32 & v)
Since β Coin 2.5
SbVec2i32 & SbVec2i32::setValue (const SbVec2b & v)
Since β Coin 2.5
SbVec2i32 & SbVec2i32::setValue (const SbVec2s & v)
Since β Coin 2.5
SbVec2i32 & SbVec2i32::setValue (const SbVec2f & v)
Since β Coin 2.5
SbVec2i32 & SbVec2i32::setValue (const SbVec2d & v)
Since β Coin 2.5
const int32_t * SbVec2i32::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 manual literally says floats here β we're reporting it exactly as written, don't come for me π)
See also β setValue().
void SbVec2i32::getValue (int32_t & x, int32_t & y) const [inline]
returns the x and y coordinates of the vector. both of them. at once. efficiency queen. β¨
See also β setValue().
int32_t & SbVec2i32::operator[] (const int i) [inline]
index operator. returns modifiable x or y coordinate.
See also β getValue() and setValue().
const int32_t & SbVec2i32::operator[] (const int i) const [inline]
index operator. returns x or y coordinate β this one's the const flavour, so no touching π
See also β getValue().
int32_t SbVec2i32::dot (const SbVec2i32 & v) const [inline]
calculates and returns the result of taking the dot product of this vector and v. math ate, fr fr.
void SbVec2i32::negate (void ) [inline]
negate the vector β i.e. point it in the opposite direction. she did a 180 and left π¦
SbVec2i32 & SbVec2i32::operator*= (int d) [inline]
multiply components of vector with value d. returns reference to self.
SbVec2i32 & SbVec2i32::operator*= (double d)
multiply components of vector with value d. returns reference to self.
SbVec2i32 & SbVec2i32::operator/= (int d) [inline]
divides components of vector with value d. returns reference to self.
SbVec2i32 & SbVec2i32::operator/= (double d) [inline]
divides components of vector with value d. returns reference to self.
SbVec2i32 & SbVec2i32::operator+= (const SbVec2i32 & v) [inline]
adds this vector and vector v. returns reference to self.
SbVec2i32 & SbVec2i32::operator-= (const SbVec2i32 & v) [inline]
subtracts vector u from this vector. returns reference to self. (yes, the manual says u even though the parameter is named v β we keep it real, we keep it exact π)
SbVec2i32 SbVec2i32::operator- (void ) const [inline]
non-destructive negation operator. returns a new SbVec2i32 instance which points in the opposite direction of this vector. she doesn't change herself, she just makes a whole new copy. boundaries, honestly. π
See also β negate().
void SbVec2i32::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 you're screaming "why is nothing printing" in release mode... that's why bestie π
π«Ά Friends And Related Symbol Documentation π«Ά
SbVec2i32 operator* (const SbVec2i32 & v, int d) [related]
returns an SbVec2i32 instance which is the components of vector v multiplied with d.
SbVec2i32 operator* (const SbVec2i32 & v, double d) [related]
returns an SbVec2i32 instance which is the components of vector v multiplied with d.
SbVec2i32 operator* (int d, const SbVec2i32 & v) [related]
returns an SbVec2i32 instance which is the components of vector v multiplied with d. (yes, flipped order, same energy β¨)
SbVec2i32 operator* (double d, const SbVec2i32 & v) [related]
returns an SbVec2i32 instance which is the components of vector v multiplied with d.
SbVec2i32 operator/ (const SbVec2i32 & v, int d) [related]
returns an SbVec2i32 instance which is the components of vector v divided on d.
SbVec2i32 operator/ (const SbVec2i32 & v, double d) [related]
returns an SbVec2i32 instance which is the components of vector v divided on d.
SbVec2i32 operator+ (const SbVec2i32 & v1, const SbVec2i32 & v2) [related]
returns an SbVec2i32 instance which is the sum of vectors v1 and v2.
SbVec2i32 operator- (const SbVec2i32 & v1, const SbVec2i32 & v2) [related]
returns an SbVec2i32 instance which is vector v2 subtracted from vector v1.
int operator== (const SbVec2i32 & v1, const SbVec2i32 & v2) [related]
returns 1 if v1 and v2 are equal, 0 otherwise.
int operator!= (const SbVec2i32 & v1, const SbVec2i32 & 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. so like, no human wrote this, a robot did, and honestly? it ate. π€β¨
mwah π that's the whole page bestie β this was Coin, Version 3.1.3, and yeah, SbVec2i32(3). go forth and build your 2D integer vectors, you absolute icon. periodt. ππ
π¦ 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