man SbVec2s () - 2D vector class

NAME

SbVec2s - 2D vector class

INHERITS FROM

SbVec2s

SYNOPSIS

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

c } c } SbVec2s(const short v[2])

c } c } SbVec2s(short x, short y)

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

c } c } getValue() const

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

c } c } negate()

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

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

c } c } operator [](int i)

c } c } operator [](int i)

c } c } operator *=(int d)

c } c } operator *=(double d)

c } c } operator /=(int d)

c } c } operator /=(double d)

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

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

c } c } operator -() const

c } c } operator *(const SbVec2s &v, int d)

c } c } operator *(const SbVec2s &v, double d)

c } c } operator *(int d, const SbVec2s &v)

c } c } operator *(double d, const SbVec2s &v)

c } c } operator /(const SbVec2s &v, int d)

c } c } operator /(const SbVec2s &v, double d)

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

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

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

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

DESCRIPTION

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

METHODS

c } c } SbVec2s()

Default constructor. c } c } SbVec2s(const short v[2])

c } c } SbVec2s(short x, short y)

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

Returns dot (inner) product of vector and another vector. c } c } getValue() const

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

Returns vector components. c } c } negate()

Negates each component of vector in place. c } c } setValue(const short v[2])

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

Sets vector components. c } c } operator [](int i)

c } c } operator [](int i)

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

c } c } operator *=(double d)

c } c } operator /=(int d)

c } c } operator /=(double d)

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

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

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

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

c } c } operator *(const SbVec2s &v, double d)

c } c } operator *(int d, const SbVec2s &v)

c } c } operator *(double d, const SbVec2s &v)

c } c } operator /(const SbVec2s &v, int d)

c } c } operator /(const SbVec2s &v, double d)

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

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

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

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

Equality comparison operators.

SEE ALSO

SbVec3f, SbVec4f, SbVec2f