SbVec2i32(3)

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

πŸ’– 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]

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 πŸ’€


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

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

returns an SbVec2i32 instance which is the components of vector v multiplied with d. (yes, flipped order, same energy ✨)

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

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

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

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

returns an SbVec2i32 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. 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