Open Inventor Reference
|
2D vector class. More...
#include <Inventor/SbLinear.h>
Public Member Functions | |
SbVec2s () | |
Default constructor. More... | |
SbVec2s (const short v[2]) | |
Constructor given 2 components. More... | |
SbVec2s (short x, short y) | |
Constructor given 2 components. More... | |
int32_t | dot (const SbVec2s &v) const |
Returns dot (inner) product of vector and another vector. More... | |
const short * | getValue () const |
Returns vector components. More... | |
void | getValue (short &x, short &y) const |
Returns vector components. More... | |
void | negate () |
Negates each component of vector in place. More... | |
SbVec2s & | setValue (const short v[2]) |
Sets vector components. More... | |
SbVec2s & | setValue (short x, short y) |
Sets vector components. More... | |
short & | operator[] (int i) |
Accesses indexed component of vector. More... | |
const short & | operator[] (int i) const |
SbVec2s & | operator*= (int d) |
Component-wise scalar multiplication and division operators. More... | |
SbVec2s & | operator*= (double d) |
Component-wise scalar multiplication and division operators. More... | |
SbVec2s & | operator/= (int d) |
Component-wise scalar multiplication and division operators. More... | |
SbVec2s & | operator/= (double d) |
Component-wise scalar multiplication and division operators. More... | |
SbVec2s & | operator+= (const SbVec2s &u) |
Component-wise vector addition and subtraction operators. More... | |
SbVec2s & | operator-= (const SbVec2s &u) |
Component-wise vector addition and subtraction operators. More... | |
SbVec2s | operator- () const |
Nondestructive unary negation - returns a new vector. More... | |
Protected Attributes | |
short | vec [2] |
Storage for vector components. More... | |
Friends | |
INVENTOR_API SbVec2s | operator* (const SbVec2s &v, int d) |
Component-wise binary scalar multiplication and division operators. More... | |
INVENTOR_API SbVec2s | operator* (const SbVec2s &v, double d) |
INVENTOR_API SbVec2s | operator* (int d, const SbVec2s &v) |
INVENTOR_API SbVec2s | operator* (double d, const SbVec2s &v) |
INVENTOR_API SbVec2s | operator/ (const SbVec2s &v, int d) |
INVENTOR_API SbVec2s | operator/ (const SbVec2s &v, double d) |
INVENTOR_API SbVec2s | operator+ (const SbVec2s &v1, const SbVec2s &v2) |
Component-wise binary vector addition and subtraction operators. More... | |
INVENTOR_API SbVec2s | operator- (const SbVec2s &v1, const SbVec2s &v2) |
INVENTOR_API bool | operator== (const SbVec2s &v1, const SbVec2s &v2) |
Equality comparison operator. More... | |
INVENTOR_API bool | operator!= (const SbVec2s &v1, const SbVec2s &v2) |
2D vector class used to store 2D integer vectors and points. This class is used throughout Inventor for arguments and return values. {}
Definition at line 354 of file SbLinear.h.
|
inline |
Definition at line 358 of file SbLinear.h.
|
inline |
Definition at line 361 of file SbLinear.h.
|
inline |
Definition at line 364 of file SbLinear.h.
|
inline |
Definition at line 370 of file SbLinear.h.
void SbVec2s::getValue | ( | short & | x, |
short & | y | ||
) | const |
void SbVec2s::negate | ( | ) |
SbVec2s& SbVec2s::operator*= | ( | double | d | ) |
SbVec2s& SbVec2s::operator*= | ( | int | d | ) |
SbVec2s SbVec2s::operator- | ( | ) | const |
|
inline |
Definition at line 396 of file SbLinear.h.
SbVec2s& SbVec2s::operator/= | ( | int | d | ) |
|
inline |
Definition at line 385 of file SbLinear.h.
|
inline |
Definition at line 386 of file SbLinear.h.
SbVec2s& SbVec2s::setValue | ( | const short | v[2] | ) |
SbVec2s& SbVec2s::setValue | ( | short | x, |
short | y | ||
) |
|
friend |
Definition at line 442 of file SbLinear.h.
|
friend |
|
friend |
|
friend |
Definition at line 432 of file SbLinear.h.
|
friend |
Definition at line 430 of file SbLinear.h.
|
friend |
|
friend |
|
friend |
Definition at line 435 of file SbLinear.h.
|
friend |
|
friend |
|
protected |
Definition at line 425 of file SbLinear.h.