4D vector class. More...
#include <Inventor/SbVec.h>
Public Member Functions | |
SbVec4b () | |
SbVec4b (const char v[4]) | |
SbVec4b (char x, char y, char z, char w) | |
int32_t | dot (const SbVec4b &v) const |
const char * | getValue () const |
void | getValue (char &x, char &y, char &z, char &w) const |
void | negate () |
SbVec4b & | setValue (const char v[4]) |
SbVec4b & | setValue (char x, char y, char z, char w) |
SbVec4b & | operator*= (int d) |
SbVec4b & | operator*= (double d) |
SbVec4b & | operator/= (int d) |
SbVec4b & | operator/= (double d) |
SbVec4b & | operator+= (const SbVec4b &u) |
SbVec4b & | operator-= (const SbVec4b &u) |
SbVec4b | operator- () const |
template<typename T > | |
SbVec4b (const T &v) | |
Friends | |
SbVec4b | operator* (const SbVec4b &v, int d) |
SbVec4b | operator* (const SbVec4b &v, double d) |
SbVec4b | operator* (int d, const SbVec4b &v) |
SbVec4b | operator* (double d, const SbVec4b &v) |
SbVec4b | operator/ (const SbVec4b &v, int d) |
SbVec4b | operator/ (const SbVec4b &v, double d) |
SbVec4b | operator+ (const SbVec4b &v1, const SbVec4b &v2) |
SbVec4b | operator- (const SbVec4b &v1, const SbVec4b &v2) |
int | operator== (const SbVec4b &v1, const SbVec4b &v2) |
int | operator!= (const SbVec4b &v1, const SbVec4b &v2) |
std::ostream & | operator<< (std::ostream &os, const SbVec4b &v) |
| |
char & | operator[] (int i) |
const 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, SbVec4d, SbVec4f, SbVec4i32, SbVec4s, SbVec4ub, SbVec4ui32, SbVec4us
SbVec4b::SbVec4b | ( | ) | [inline] |
Default constructor.
The vector is not initialized.
SbVec4b::SbVec4b | ( | const char | v[4] | ) | [inline] |
Constructor given 4 components.
SbVec4b::SbVec4b | ( | char | x, | |
char | y, | |||
char | z, | |||
char | w | |||
) | [inline] |
Constructor given 4 components.
SbVec4b::SbVec4b | ( | const T & | v | ) | [inline, explicit] |
Constructor that converts an arbitrary SbVec4 to an SbVec4b.
int32_t SbVec4b::dot | ( | const SbVec4b & | v | ) | const [inline] |
Returns dot (inner) product of vector and another vector.
void SbVec4b::getValue | ( | char & | x, | |
char & | y, | |||
char & | z, | |||
char & | w | |||
) | const |
Returns vector components.
const char* SbVec4b::getValue | ( | ) | const [inline] |
Returns vector components.
void SbVec4b::negate | ( | ) |
Negates each component of vector in place.
SbVec4b& SbVec4b::operator*= | ( | double | d | ) |
Component-wise scalar multiplication operator.
SbVec4b& SbVec4b::operator*= | ( | int | d | ) |
Component-wise scalar multiplication operator.
SbVec4b SbVec4b::operator- | ( | ) | const |
Nondestructive unary negation - returns a new vector.
SbVec4b& SbVec4b::operator/= | ( | double | d | ) | [inline] |
Component-wise scalar division operator.
SbVec4b& SbVec4b::operator/= | ( | int | d | ) |
Component-wise scalar division operator.
const char& SbVec4b::operator[] | ( | int | i | ) | const [inline] |
Accesses indexed component of vector.
char& SbVec4b::operator[] | ( | int | i | ) | [inline] |
Accesses indexed component of vector.
SbVec4b& SbVec4b::setValue | ( | char | x, | |
char | y, | |||
char | z, | |||
char | w | |||
) |
Sets vector components.
SbVec4b& SbVec4b::setValue | ( | const char | v[4] | ) |
Sets vector components.
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 SbVec4b & | v | |||
) | [friend] |
Writes the vector to the specified output stream.