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