Public Member Functions |
| SbVec3f () |
| Default constructor.
|
| SbVec3f (const float v[3]) |
| Constructor given vector components.
|
| SbVec3f (float x, float y, float z) |
| Constructor given vector components.
|
| SbVec3f (SbPlane &p0, SbPlane &p1, SbPlane &p2) |
| Constructor given 3 planes.
|
SbVec3f | cross (const SbVec3f &v) const |
| Returns right-handed cross product of vector and another vector.
|
float | dot (const SbVec3f &v) const |
| Returns dot (inner) product of vector and another vector.
|
const float * | getValue () const |
| Returns vector components.
|
void | getValue (float &x, float &y, float &z) const |
| Returns vector components.
|
float | length () const |
| Returns geometric length of vector.
|
float | normalize () |
| Changes vector to be unit length, returning the length before normalization.
|
void | negate () |
| Negates each component of vector in place.
|
SbVec3f & | setValue (const float v[3]) |
| Sets the vector components.
|
SbVec3f & | setValue (float x, float y, float z) |
| Sets the vector components.
|
SbVec3f & | setValue (const SbVec3f &barycentic, const SbVec3f &v0, const SbVec3f &v1, const SbVec3f &v2) |
| Sets value of vector to be convex combination of 3 other vectors, using barycentic coordinates.
|
float & | operator[] (int i) |
| Accesses indexed component of vector.
|
const float & | operator[] (int i) const |
SbVec3f & | operator*= (float d) |
| Component-wise scalar multiplication and division operators.
|
SbVec3f & | operator/= (float d) |
| Component-wise scalar multiplication and division operators.
|
SbVec3f & | operator+= (SbVec3f v) |
| Component-wise vector addition and subtraction operators.
|
SbVec3f & | operator-= (SbVec3f v) |
| Component-wise vector addition and subtraction operators.
|
SbVec3f | operator- () const |
| Nondestructive unary negation - returns a new vector.
|
SbBool | equals (const SbVec3f v, float tolerance) const |
| Equality comparison within given tolerance em the square of the length of the maximum distance between the two vectors.
|
SbVec3f | getClosestAxis () const |
| Returns principal axis that is closest (based on maximum dot product) to this vector.
|
Protected Attributes |
float | vec [3] |
| Storage for vector components.
|
Friends |
INVENTOR_API SbVec3f | operator* (const SbVec3f &v, float d) |
| Component-wise binary scalar multiplication and division operators.
|
INVENTOR_API SbVec3f | operator* (float d, const SbVec3f &v) |
INVENTOR_API SbVec3f | operator/ (const SbVec3f &v, float d) |
INVENTOR_API SbVec3f | operator+ (const SbVec3f &v1, const SbVec3f &v2) |
| Component-wise binary vector addition and subtraction operators.
|
INVENTOR_API SbVec3f | operator- (const SbVec3f &v1, const SbVec3f &v2) |
INVENTOR_API int | operator== (const SbVec3f &v1, const SbVec3f &v2) |
| Equality comparison operator.
|
INVENTOR_API int | operator!= (const SbVec3f &v1, const SbVec3f &v2) |
3D vector class used to store 3D vectors and points. This class is used throughout Inventor for arguments and return values. {}
- See Also
- SbVec2f, SbVec4f, SbVec2s, SbRotation
Definition at line 120 of file SbLinear.h.