4D vector class.
More...
#include <Inventor/SbVec.h>
|
| SbVec4us () |
| Default constructor.
|
|
| SbVec4us (const unsigned short v[4]) |
| Constructor given 4 components.
|
|
| SbVec4us (unsigned short x, unsigned short y, unsigned short z, unsigned short w) |
| Constructor given 4 components.
|
|
int32_t | dot (const SbVec4us &v) const |
| Returns dot (inner) product of vector and another vector.
|
|
const unsigned short * | getValue () const |
| Returns vector components.
|
|
void | getValue (unsigned short &x, unsigned short &y, unsigned short &z, unsigned short &w) const |
| Returns vector components.
|
|
void | negate () |
| Negates each component of vector in place.
|
|
SbVec4us & | setValue (const unsigned short v[4]) |
| Sets vector components.
|
|
SbVec4us & | setValue (unsigned short x, unsigned short y, unsigned short z, unsigned short w) |
| Sets vector components.
|
|
unsigned short & | operator[] (int i) |
| Accesses indexed component of vector.
|
|
const unsigned short & | operator[] (int i) const |
|
SbVec4us & | operator*= (int d) |
| Component-wise scalar multiplication operator.
|
|
SbVec4us & | operator*= (double d) |
| Component-wise scalar multiplication operator.
|
|
SbVec4us & | operator/= (int d) |
| Component-wise scalar division operator.
|
|
SbVec4us & | operator/= (double d) |
| Component-wise scalar division operator.
|
|
SbVec4us & | operator+= (const SbVec4us &u) |
| Component-wise vector addition operator.
|
|
SbVec4us & | operator-= (const SbVec4us &u) |
| Component-wise vector subtraction operator.
|
|
SbVec4us | operator- () const |
| Nondestructive unary negation - returns a new vector.
|
|
template<typename T > |
| SbVec4us (const T &v) |
| Constructor that converts an arbitrary SbVec4 to an SbVec4us.
|
|
|
SbVec4us | operator* (const SbVec4us &v, int d) |
| Component-wise binary scalar multiplication operator.
|
|
SbVec4us | operator* (const SbVec4us &v, double d) |
| Component-wise binary scalar multiplication operator.
|
|
SbVec4us | operator* (int d, const SbVec4us &v) |
| Component-wise binary scalar multiplication operator.
|
|
SbVec4us | operator* (double d, const SbVec4us &v) |
| Component-wise binary scalar multiplication operator.
|
|
SbVec4us | operator/ (const SbVec4us &v, int d) |
| Component-wise binary scalar division operator.
|
|
SbVec4us | operator/ (const SbVec4us &v, double d) |
| Component-wise binary scalar division operator.
|
|
SbVec4us | operator+ (const SbVec4us &v1, const SbVec4us &v2) |
| Component-wise binary vector addition operator.
|
|
SbVec4us | operator- (const SbVec4us &v1, const SbVec4us &v2) |
| Component-wise binary vector subtraction operator.
|
|
int | operator== (const SbVec4us &v1, const SbVec4us &v2) |
| Equality comparison operator.
|
|
int | operator!= (const SbVec4us &v1, const SbVec4us &v2) |
| Inequality comparison operator.
|
|
std::ostream & | operator<< (std::ostream &os, const SbVec4us &v) |
| Writes the vector to the specified output stream.
|
|
4D vector class.
4D vector class used to store 4D integer vectors and points. This class is used throughout Open Inventor for arguments and return values.
SEE ALSO
SbRotation, SbRotationd, SbVec2d, SbVec2f, SbVec2i32, SbVec2s, SbVec3d, SbVec3f, SbVec3i32, SbVec3s, SbVec4b, SbVec4d, SbVec4f, SbVec4i32, SbVec4s, SbVec4ub, SbVec4ui32
Definition at line 3219 of file SbVec.h.
◆ SbVec4us() [1/4]
Default constructor.
The vector is initialized with zeros.
Definition at line 3225 of file SbVec.h.
◆ SbVec4us() [2/4]
SbVec4us::SbVec4us |
( |
const unsigned short |
v[4] | ) |
|
|
inlineexplicit |
Constructor given 4 components.
Definition at line 3230 of file SbVec.h.
◆ SbVec4us() [3/4]
SbVec4us::SbVec4us |
( |
unsigned short |
x, |
|
|
unsigned short |
y, |
|
|
unsigned short |
z, |
|
|
unsigned short |
w |
|
) |
| |
|
inline |
Constructor given 4 components.
Definition at line 3235 of file SbVec.h.
◆ SbVec4us() [4/4]
template<typename T >
SbVec4us::SbVec4us |
( |
const T & |
v | ) |
|
|
inlineexplicit |
Constructor that converts an arbitrary SbVec4 to an SbVec4us.
Definition at line 3367 of file SbVec.h.
◆ dot()
int32_t SbVec4us::dot |
( |
const SbVec4us & |
v | ) |
const |
|
inline |
Returns dot (inner) product of vector and another vector.
Definition at line 3241 of file SbVec.h.
◆ getValue() [1/2]
const unsigned short * SbVec4us::getValue |
( |
| ) |
const |
|
inline |
Returns vector components.
Definition at line 3247 of file SbVec.h.
◆ getValue() [2/2]
void SbVec4us::getValue |
( |
unsigned short & |
x, |
|
|
unsigned short & |
y, |
|
|
unsigned short & |
z, |
|
|
unsigned short & |
w |
|
) |
| const |
Returns vector components.
◆ negate()
void SbVec4us::negate |
( |
| ) |
|
Negates each component of vector in place.
◆ operator*=() [1/2]
SbVec4us & SbVec4us::operator*= |
( |
double |
d | ) |
|
Component-wise scalar multiplication operator.
◆ operator*=() [2/2]
SbVec4us & SbVec4us::operator*= |
( |
int |
d | ) |
|
Component-wise scalar multiplication operator.
◆ operator+=()
Component-wise vector addition operator.
◆ operator-()
Nondestructive unary negation - returns a new vector.
◆ operator-=()
Component-wise vector subtraction operator.
◆ operator/=() [1/2]
SbVec4us & SbVec4us::operator/= |
( |
double |
d | ) |
|
|
inline |
Component-wise scalar division operator.
Definition at line 3293 of file SbVec.h.
◆ operator/=() [2/2]
SbVec4us & SbVec4us::operator/= |
( |
int |
d | ) |
|
Component-wise scalar division operator.
◆ operator[]() [1/2]
unsigned short & SbVec4us::operator[] |
( |
int |
i | ) |
|
|
inline |
Accesses indexed component of vector.
Definition at line 3273 of file SbVec.h.
◆ operator[]() [2/2]
const unsigned short & SbVec4us::operator[] |
( |
int |
i | ) |
const |
|
inline |
◆ setValue() [1/2]
SbVec4us & SbVec4us::setValue |
( |
const unsigned short |
v[4] | ) |
|
◆ setValue() [2/2]
SbVec4us & SbVec4us::setValue |
( |
unsigned short |
x, |
|
|
unsigned short |
y, |
|
|
unsigned short |
z, |
|
|
unsigned short |
w |
|
) |
| |
◆ operator!=
Inequality comparison operator.
Definition at line 3355 of file SbVec.h.
◆ operator* [1/4]
Component-wise binary scalar multiplication operator.
◆ operator* [2/4]
Component-wise binary scalar multiplication operator.
◆ operator* [3/4]
Component-wise binary scalar multiplication operator.
Definition at line 3326 of file SbVec.h.
◆ operator* [4/4]
Component-wise binary scalar multiplication operator.
Definition at line 3321 of file SbVec.h.
◆ operator+
Component-wise binary vector addition operator.
◆ operator-
Component-wise binary vector subtraction operator.
◆ operator/ [1/2]
Component-wise binary scalar division operator.
Definition at line 3335 of file SbVec.h.
◆ operator/ [2/2]
Component-wise binary scalar division operator.
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const SbVec4us & |
v |
|
) |
| |
|
friend |
Writes the vector to the specified output stream.
Definition at line 3717 of file SbVec.h.
◆ operator==
Equality comparison operator.
The documentation for this class was generated from the following file: