4D vector class. More...
#include <Inventor/SbVec.h>
Public Member Functions | |
SbVec4ub () | |
SbVec4ub (const unsigned char v[4]) | |
SbVec4ub (unsigned char x, unsigned char y, unsigned char z, unsigned char w) | |
int32_t | dot (const SbVec4ub &v) const |
const unsigned char * | getValue () const |
void | getValue (unsigned char &x, unsigned char &y, unsigned char &z, unsigned char &w) const |
void | negate () |
SbVec4ub & | setValue (const unsigned char v[4]) |
SbVec4ub & | setValue (unsigned char x, unsigned char y, unsigned char z, unsigned char w) |
SbVec4ub & | operator*= (int d) |
SbVec4ub & | operator*= (double d) |
SbVec4ub & | operator/= (int d) |
SbVec4ub & | operator/= (double d) |
SbVec4ub & | operator+= (const SbVec4ub &u) |
SbVec4ub & | operator-= (const SbVec4ub &u) |
SbVec4ub | operator- () const |
template<typename T > | |
SbVec4ub (const T &v) | |
void | clamp (unsigned char a, unsigned char b) |
Friends | |
SbVec4ub | operator* (const SbVec4ub &v, int d) |
SbVec4ub | operator* (const SbVec4ub &v, double d) |
SbVec4ub | operator* (int d, const SbVec4ub &v) |
SbVec4ub | operator* (double d, const SbVec4ub &v) |
SbVec4ub | operator/ (const SbVec4ub &v, int d) |
SbVec4ub | operator/ (const SbVec4ub &v, double d) |
SbVec4ub | operator+ (const SbVec4ub &v1, const SbVec4ub &v2) |
SbVec4ub | operator- (const SbVec4ub &v1, const SbVec4ub &v2) |
int | operator== (const SbVec4ub &v1, const SbVec4ub &v2) |
int | operator!= (const SbVec4ub &v1, const SbVec4ub &v2) |
std::ostream & | operator<< (std::ostream &os, const SbVec4ub &v) |
| |
unsigned char & | operator[] (int i) |
const unsigned char & | operator[] (int i) const |
4D vector class used to store 4D integer vectors and points. This class is used throughout Open Inventor for arguments and return values.
SbRotation, SbRotationd, SbVec2d, SbVec2f, SbVec2i32, SbVec2s, SbVec3d, SbVec3f, SbVec3i32, SbVec3s, SbVec4b, SbVec4d, SbVec4f, SbVec4i32, SbVec4s, SbVec4ui32, SbVec4us
SbVec4ub::SbVec4ub | ( | ) | [inline] |
Default constructor.
The vector is initialized with zeros.
SbVec4ub::SbVec4ub | ( | const unsigned char | v[4] | ) | [inline, explicit] |
Constructor given 4 components.
SbVec4ub::SbVec4ub | ( | unsigned char | x, | |
unsigned char | y, | |||
unsigned char | z, | |||
unsigned char | w | |||
) | [inline] |
Constructor given 4 components.
SbVec4ub::SbVec4ub | ( | const T & | v | ) | [inline, explicit] |
Constructor that converts an arbitrary SbVec4 to an SbVec4ub.
void SbVec4ub::clamp | ( | unsigned char | a, | |
unsigned char | b | |||
) | [inline] |
Clamp each component between a and b.
int32_t SbVec4ub::dot | ( | const SbVec4ub & | v | ) | const [inline] |
Returns dot (inner) product of vector and another vector.
void SbVec4ub::getValue | ( | unsigned char & | x, | |
unsigned char & | y, | |||
unsigned char & | z, | |||
unsigned char & | w | |||
) | const |
Returns vector components.
const unsigned char* SbVec4ub::getValue | ( | ) | const [inline] |
Returns vector components.
void SbVec4ub::negate | ( | ) |
Negates each component of vector in place.
SbVec4ub& SbVec4ub::operator*= | ( | double | d | ) |
Component-wise scalar multiplication operator.
SbVec4ub& SbVec4ub::operator*= | ( | int | d | ) |
Component-wise scalar multiplication operator.
SbVec4ub SbVec4ub::operator- | ( | ) | const |
Nondestructive unary negation - returns a new vector.
SbVec4ub& SbVec4ub::operator/= | ( | double | d | ) | [inline] |
Component-wise scalar division operator.
SbVec4ub& SbVec4ub::operator/= | ( | int | d | ) |
Component-wise scalar division operator.
const unsigned char& SbVec4ub::operator[] | ( | int | i | ) | const [inline] |
Accesses indexed component of vector.
unsigned char& SbVec4ub::operator[] | ( | int | i | ) | [inline] |
Accesses indexed component of vector.
SbVec4ub& SbVec4ub::setValue | ( | unsigned char | x, | |
unsigned char | y, | |||
unsigned char | z, | |||
unsigned char | w | |||
) |
Sets vector components.
SbVec4ub& SbVec4ub::setValue | ( | const unsigned char | v[4] | ) |
Sets vector components.
Inequality comparison operator.
Component-wise binary scalar multiplication operator.
Component-wise binary scalar multiplication operator.
Component-wise binary scalar multiplication operator.
Component-wise binary scalar multiplication operator.
Component-wise binary vector addition operator.
Component-wise binary vector subtraction operator.
Component-wise binary scalar division operator.
Component-wise binary scalar division operator.
std::ostream& operator<< | ( | std::ostream & | os, | |
const SbVec4ub & | v | |||
) | [friend] |
Writes the vector to the specified output stream.