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