Public Member Functions |
| SbVec4f () |
| Default constructor.
|
| SbVec4f (const float v[4]) |
| Constructor given vector components.
|
| SbVec4f (float x, float y, float z, float w) |
| Constructor given vector components.
|
float | dot (const SbVec4f &v) const |
| Returns dot (inner) product of vector and another vector.
|
void | getReal (SbVec3f &v) const |
| Returns the real portion of the vector by dividing by the fourth value.
|
const float * | getValue () const |
| Returns vector components.
|
void | getValue (float &x, float &y, float &z, float &w) const |
| Returns vector components.
|
float | length () const |
| Returns geometric length of vector.
|
void | negate () |
| Negates each component of vector in place.
|
float | normalize () |
| Changes vector to be unit length.
|
SbVec4f & | setValue (const float v[4]) |
| Sets the vector components.
|
SbVec4f & | setValue (float x, float y, float z, float w) |
| Sets the vector components.
|
float & | operator[] (int i) |
| Accesses indexed component of vector.
|
const float & | operator[] (int i) const |
SbVec4f & | operator*= (float d) |
| Component-wise scalar multiplication and division operators.
|
SbVec4f & | operator/= (float d) |
| Component-wise scalar multiplication and division operators.
|
SbVec4f & | operator+= (const SbVec4f &u) |
| Component-wise vector addition and subtraction operators.
|
SbVec4f & | operator-= (const SbVec4f &u) |
| Component-wise vector addition and subtraction operators.
|
SbVec4f | operator- () const |
| Nondestructive unary negation - returns a new vector.
|
SbBool | equals (const SbVec4f v, float tolerance) const |
| Equality comparison within given tolerance em the square of the length of the maximum distance between the two vectors.
|
Protected Attributes |
float | vec [4] |
| Storage for vector components.
|
Friends |
INVENTOR_API SbVec4f | operator* (const SbVec4f &v, float d) |
| Component-wise binary scalar multiplication and division operators.
|
INVENTOR_API SbVec4f | operator* (float d, const SbVec4f &v) |
INVENTOR_API SbVec4f | operator/ (const SbVec4f &v, float d) |
INVENTOR_API SbVec4f | operator+ (const SbVec4f &v1, const SbVec4f &v2) |
| Component-wise binary vector addition and subtraction operators.
|
INVENTOR_API SbVec4f | operator- (const SbVec4f &v1, const SbVec4f &v2) |
INVENTOR_API int | operator== (const SbVec4f &v1, const SbVec4f &v2) |
| Equality comparison operator.
|
INVENTOR_API int | operator!= (const SbVec4f &v1, const SbVec4f &v2) |
4D vector class used to store homogeneous coordinates. This class is used in Inventor for arguments and return values. {}
- See Also
- SbVec2f, SbVec3f, SbVec2s, SbRotation
Definition at line 515 of file SbLinear.h.