man SbVec2f () - 2D vector class

NAME

SbVec2f - 2D vector class

INHERITS FROM

SbVec2f

SYNOPSIS

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

c } c } SbVec2f(const float v[2])

c } c } SbVec2f(float x, float y)

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

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

c } c } getValue() const

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

c } c } length() const

c } c } negate()

c } c } normalize()

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

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

c } c } operator [](int i)

c } c } operator [](int i)

c } c } operator *=(float d)

c } c } operator /=(float d)

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

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

c } c } operator -() const

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

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

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

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

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

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

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

DESCRIPTION

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

METHODS

c } c } SbVec2f()

Default constructor. c } c } SbVec2f(const float v[2])

c } c } SbVec2f(float x, float y)

Constructor given vector components. c } c } dot(const SbVec2f &v) const

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

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

c } c } getValue(float &x, float &y) 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. c } c } setValue(const float v[2])

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

Sets the vector components. 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 SbVec2f &u)

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

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

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

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

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

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

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

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

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

Equality comparison operators.

SEE ALSO

SbVec3f, SbVec4f, SbVec2s, SbRotation