SbVec2f()
Default constructor.
SbVec2f(constfloatv[2])SbVec2f(floatx,floaty)
Constructor given vector components.
floatdot(constSbVec2f&v)const
Returns dot (inner) product of vector and another vector.
SbBoolequals(constSbVec2fv,floattolerance)const
Equality comparison within given tolerance — the square of the length of the maximum distance between
the two vectors.
constfloat*getValue()constvoidgetValue(float&x,float&y)const
Returns vector components.
floatlength()const
Returns geometric length of vector.
voidnegate()
Negates each component of vector in place.
floatnormalize()
Changes vector to be unit length.
SbVec2f&setValue(constfloatv[2])SbVec2f&setValue(floatx,floaty)
Sets the vector components.
float&operator[](inti)constfloat&operator[](inti)
Accesses indexed component of vector.
SbVec2f&operator*=(floatd)SbVec2f&operator/=(floatd)
Component-wise scalar multiplication and division operators.
SbVec2f&operator+=(constSbVec2f&u)SbVec2f&operator-=(constSbVec2f&u)
Component-wise vector addition and subtraction operators.
SbVec2foperator-()const
Nondestructive unary negation — returns a new vector.
SbVec2foperator*(constSbVec2f&v,floatd)SbVec2foperator*(floatd,constSbVec2f&v)SbVec2foperator/(constSbVec2f&v,floatd)
Component-wise binary scalar multiplication and division operators.
SbVec2foperator+(constSbVec2f&v1,constSbVec2f&v2)SbVec2foperator-(constSbVec2f&v1,constSbVec2f&v2)
Component-wise binary vector addition and subtraction operators.
intoperator==(constSbVec2f&v1,constSbVec2f&v2)intoperator!=(constSbVec2f&v1,constSbVec2f&v2)
Equality comparison operators.