Open Inventor Reference
|
3D vector used to represet points or directions. More...
#include <Inventor/SbLinear.h>
Public Member Functions | |
SbVec3s () | |
Default constructor. | |
SbVec3s (const short v[3]) | |
Constructor given an array of 3 components. | |
SbVec3s (short x, short y, short z) | |
Constructor given 3 individual components. | |
int32_t | dot (const SbVec3s &v) const |
Returns dot (inner) product of vector and another vector. | |
const short * | getValue () const |
Returns vector components. | |
void | getValue (short &x, short &y, short &z) const |
Returns vector components. | |
void | negate () |
Negates each component of vector in place. | |
SbVec3s & | setValue (const short v[3]) |
Sets value of vector from array of 3 components. | |
SbVec3s & | setValue (short x, short y, short z) |
Sets value of vector from 3 individual components. | |
short & | operator[] (int i) |
Accesses indexed component of vector. | |
const short & | operator[] (int i) const |
SbVec3s & | operator*= (int d) |
Component-wise scalar multiplication and division operators. | |
SbVec3s & | operator*= (double d) |
SbVec3s & | operator/= (int d) |
SbVec3s & | operator/= (double d) |
SbVec3s & | operator+= (const SbVec3s &u) |
Component-wise vector addition and subtraction operators. | |
SbVec3s & | operator-= (const SbVec3s &u) |
Component-wise vector addition and subtraction operators. | |
SbVec3s | operator- () const |
Nondestructive unary negation - returns a new vector. | |
Protected Attributes | |
short | vec [3] |
Storage for vector components. | |
Friends | |
INVENTOR_API SbVec3s | operator* (const SbVec3s &v, int d) |
Component-wise binary scalar multiplication and division operators. | |
INVENTOR_API SbVec3s | operator* (const SbVec3s &v, double d) |
INVENTOR_API SbVec3s | operator* (int d, const SbVec3s &v) |
INVENTOR_API SbVec3s | operator* (double d, const SbVec3s &v) |
INVENTOR_API SbVec3s | operator/ (const SbVec3s &v, int d) |
INVENTOR_API SbVec3s | operator/ (const SbVec3s &v, double d) |
INVENTOR_API SbVec3s | operator+ (const SbVec3s &v1, const SbVec3s &v2) |
Component-wise binary vector addition and subtraction operators. | |
INVENTOR_API SbVec3s | operator- (const SbVec3s &v1, const SbVec3s &v2) |
INVENTOR_API bool | operator== (const SbVec3s &v1, const SbVec3s &v2) |
Equality comparison operator. | |
INVENTOR_API bool | operator!= (const SbVec3s &v1, const SbVec3s &v2) |
Each component of the vector is a (short) integer.
Definition at line 454 of file SbLinear.h.
|
inline |
Definition at line 458 of file SbLinear.h.
References vec.
Referenced by dot(), operator!=, operator*, operator*, operator*, operator*, operator*=(), operator*=(), operator+, operator+=(), operator-(), operator-, operator-=(), operator/, operator/, operator/=(), operator/=(), operator==, setValue(), and setValue().
|
inline |
Definition at line 461 of file SbLinear.h.
References setValue().
|
inline |
Definition at line 464 of file SbLinear.h.
References setValue().
|
inline |
Definition at line 470 of file SbLinear.h.
References vec.
void SbVec3s::getValue | ( | short & | x, |
short & | y, | ||
short & | z ) const |
void SbVec3s::negate | ( | ) |
|
inline |
Definition at line 493 of file SbLinear.h.
References SbVec3s().
|
inline |
Definition at line 485 of file SbLinear.h.
References vec.
|
inline |
Definition at line 486 of file SbLinear.h.
References vec.
SbVec3s & SbVec3s::setValue | ( | const short | v[3] | ) |
|
friend |
Definition at line 540 of file SbLinear.h.
References INVENTOR_API, and SbVec3s().
|
friend |
References INVENTOR_API, and SbVec3s().
|
friend |
References INVENTOR_API, and SbVec3s().
|
friend |
Definition at line 530 of file SbLinear.h.
References INVENTOR_API, and SbVec3s().
|
friend |
Definition at line 528 of file SbLinear.h.
References INVENTOR_API, and SbVec3s().
|
friend |
References INVENTOR_API, and SbVec3s().
|
friend |
References INVENTOR_API, and SbVec3s().
|
friend |
Definition at line 533 of file SbLinear.h.
References INVENTOR_API, and SbVec3s().
|
friend |
References INVENTOR_API, and SbVec3s().
|
friend |
References INVENTOR_API, and SbVec3s().
|
protected |
Definition at line 522 of file SbLinear.h.
Referenced by getValue(), operator[](), operator[](), and SbVec3s().