man SbVec3f () - 3D vector class

NAME

SbVec3f - 3D vector class

INHERITS FROM

SbVec3f

SYNOPSIS

#include <Inventor/SbLinear.h> Methods from class SbVec3f: c } c } SbVec3f()

c } c } SbVec3f(const float v[3])

c } c } SbVec3f(float x, float y, float z)

c } c } SbVec3f(SbPlane &p0, SbPlane &p1, SbPlane &p2)

c } c } cross(const SbVec3f &v) const

c } c } dot(const SbVec3f &v) const

c } c } equals(const SbVec3f v, float tolerance) const

c } c } getClosestAxis() const

c } c } getValue() const

c } c } getValue(float &x, float &y, float &z) const

c } c } length() const

c } c } negate()

c } c } normalize()

c } c } setValue(const float v[3])

c } c } setValue(float x, float y, float z)

c } c } setValue(const SbVec3f &barycentic, const SbVec3f &v0, const SbVec3f &v1, const SbVec3f &v2)

c } c } operator [](int i)

c } c } operator [](int i)

c } c } operator *=(float d)

c } c } operator /=(float d)

c } c } operator +=(const SbVec3f &u)

c } c } operator -=(const SbVec3f &u)

c } c } operator -() const

c } c } operator *(const SbVec3f &v, float d)

c } c } operator *(float d, const SbVec3f &v)

c } c } operator /(const SbVec3f &v, float d)

c } c } operator +(const SbVec3f &v1, const SbVec3f &v2)

c } c } operator -(const SbVec3f &v1, const SbVec3f &v2)

c } c } operator ==(const SbVec3f &v1, const SbVec3f &v2)

c } c } operator !=(const SbVec3f &v1, const SbVec3f &v2)

DESCRIPTION

3D vector class used to store 3D vectors and points. This class is used throughout Inventor for arguments and return values.

METHODS

c } c } SbVec3f()

Default constructor. c } c } SbVec3f(const float v[3])

c } c } SbVec3f(float x, float y, float z)

Constructor given vector components. c } c } SbVec3f(SbPlane &p0, SbPlane &p1, SbPlane &p2)

Constructor given 3 planes. c } c } cross(const SbVec3f &v) const

Returns right-handed cross product of vector and another vector. c } c } dot(const SbVec3f &v) const

Returns dot (inner) product of vector and another vector. c } c } equals(const SbVec3f v, float tolerance) const

Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors. c } c } getClosestAxis() const

Returns principal axis that is closest (based on maximum dot product) to this vector. c } c } getValue() const

c } c } getValue(float &x, float &y, float &z) const

Returns vector components. c } c } length() const

Returns geometric length of vector. c } c } negate()

Negates each component of vector in place. c } c } normalize()

Changes vector to be unit length, returning the length before normalization. c } c } setValue(const float v[3])

c } c } setValue(float x, float y, float z)

Sets the vector components. c } c } setValue(const SbVec3f &barycentic, const SbVec3f &v0, const SbVec3f &v1, const SbVec3f &v2)

Sets value of vector as the weighted average of 3 other vectors. c } c } operator [](int i)

c } c } operator [](int i)

Accesses indexed component of vector. c } c } operator *=(float d)

c } c } operator /=(float d)

Component-wise scalar multiplication and division operators. c } c } operator +=(const SbVec3f &u)

c } c } operator -=(const SbVec3f &u)

Component-wise vector addition and subtraction operators. c } c } operator -() const

Nondestructive unary negation - returns a new vector. c } c } operator *(const SbVec3f &v, float d)

c } c } operator *(float d, const SbVec3f &v)

c } c } operator /(const SbVec3f &v, float d)

Component-wise binary scalar multiplication and division operators. c } c } operator +(const SbVec3f &v1, const SbVec3f &v2)

c } c } operator -(const SbVec3f &v1, const SbVec3f &v2)

Component-wise binary vector addition and subtraction operators. c } c } operator ==(const SbVec3f &v1, const SbVec3f &v2)

c } c } operator !=(const SbVec3f &v1, const SbVec3f &v2)

Equality comparison operators.

SEE ALSO

SbVec2f, SbVec4f, SbVec2s, SbRotation