|
Open Inventor Reference
|
4D vector class with double values. More...
#include <Inventor/SbLineard.h>
Public Member Functions | |
| SbVec4d () | |
| Default constructor. | |
| SbVec4d (const double v[4]) | |
| Constructor given vector components. | |
| SbVec4d (double x, double y, double z, double w) | |
| Constructor given vector components. | |
| double | dot (const SbVec4d &v) const |
| Returns dot (inner) product of vector and another vector. | |
| void | getReal (SbVec3d &v) const |
| Returns the real portion of the vector by dividing by the fourth value. | |
| SbVec3d | getReal () const |
| Returns the real portion of the vector by dividing by the fourth value. | |
| const double * | getValue () const |
| Returns vector components. | |
| void | getValue (double &x, double &y, double &z, double &w) const |
| Returns vector components. | |
| double | length () const |
| Returns geometric length of vector. | |
| void | negate () |
| Negates each component of vector in place. | |
| double | normalize () |
| Changes vector to be unit length. | |
| SbVec4d & | setValue (const double v[4]) |
| Sets the vector components. | |
| SbVec4d & | setValue (double x, double y, double z, double w) |
| Sets the vector components. | |
| double & | operator[] (int i) |
| Accesses indexed component of vector. | |
| const double & | operator[] (int i) const |
| SbVec4d & | operator*= (double d) |
| Component-wise scalar multiplication and division operators. | |
| SbVec4d & | operator/= (double d) |
| Component-wise scalar multiplication and division operators. | |
| SbVec4d & | operator+= (const SbVec4d &u) |
| Component-wise vector addition and subtraction operators. | |
| SbVec4d & | operator-= (const SbVec4d &u) |
| Component-wise vector addition and subtraction operators. | |
| SbVec4d | operator- () const |
| Nondestructive unary negation - returns a new vector. | |
| bool | equals (const SbVec4d v, double tolerance) const |
| Equality comparison within given tolerance em the square of the length of the maximum distance between the two vectors. | |
Protected Attributes | |
| double | vec [4] |
| Storage for vector components. | |
Friends | |
| INVENTOR_API SbVec4d | operator* (const SbVec4d &v, double d) |
| Component-wise binary scalar multiplication and division operators. | |
| INVENTOR_API SbVec4d | operator* (double d, const SbVec4d &v) |
| INVENTOR_API SbVec4d | operator/ (const SbVec4d &v, double d) |
| INVENTOR_API SbVec4d | operator+ (const SbVec4d &v1, const SbVec4d &v2) |
| Component-wise binary vector addition and subtraction operators. | |
| INVENTOR_API SbVec4d | operator- (const SbVec4d &v1, const SbVec4d &v2) |
| INVENTOR_API bool | operator== (const SbVec4d &v1, const SbVec4d &v2) |
| Equality comparison operator. | |
| INVENTOR_API bool | operator!= (const SbVec4d &v1, const SbVec4d &v2) |
4D vector class used to store homogeneous coordinates. This class is used in Inventor for arguments and return values. {}
Definition at line 349 of file SbLineard.h.
|
inline |
Definition at line 353 of file SbLineard.h.
|
inline |
Definition at line 356 of file SbLineard.h.
|
inline |
Definition at line 359 of file SbLineard.h.
| double SbVec4d::dot | ( | const SbVec4d & | v | ) | const |
| bool SbVec4d::equals | ( | const SbVec4d | v, |
| double | tolerance | ||
| ) | const |
|
inline |
| void SbVec4d::getReal | ( | SbVec3d & | v | ) | const |
|
inline |
Definition at line 371 of file SbLineard.h.
| void SbVec4d::getValue | ( | double & | x, |
| double & | y, | ||
| double & | z, | ||
| double & | w | ||
| ) | const |
| double SbVec4d::length | ( | ) | const |
| void SbVec4d::negate | ( | ) |
| double SbVec4d::normalize | ( | ) |
| SbVec4d & SbVec4d::operator*= | ( | double | d | ) |
| SbVec4d SbVec4d::operator- | ( | ) | const |
|
inline |
Definition at line 399 of file SbLineard.h.
|
inline |
Definition at line 392 of file SbLineard.h.
|
inline |
Definition at line 393 of file SbLineard.h.
| SbVec4d & SbVec4d::setValue | ( | const double | v[4] | ) |
| SbVec4d & SbVec4d::setValue | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | w | ||
| ) |
|
friend |
Definition at line 442 of file SbLineard.h.
|
friend |
|
friend |
Definition at line 433 of file SbLineard.h.
|
friend |
|
friend |
|
friend |
Definition at line 435 of file SbLineard.h.
|
friend |
|
protected |
Definition at line 429 of file SbLineard.h.