logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SbVec2f — 2D vector class

Description

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

Inherits From

       SbVec2f

Methods

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.

Name

       SbVec2f — 2D vector class

See Also

SbVec3f,SbVec4f,SbVec2s,SbRotationSbVec2f(3IV)()

Synopsis

#include<Inventor/SbLinear.h>

          Methods from class SbVec2f:

                         SbVec2f()SbVec2f(constfloatv[2])SbVec2f(floatx,floaty)floatdot(constSbVec2f&v)constSbBoolequals(constSbVec2fv,floattolerance)constconstfloat*getValue()constvoidgetValue(float&x,float&y)constfloatlength()constvoidnegate()floatnormalize()SbVec2f&setValue(constfloatv[2])SbVec2f&setValue(floatx,floaty)float&operator[](inti)constfloat&operator[](inti)SbVec2f&operator*=(floatd)SbVec2f&operator/=(floatd)SbVec2f&operator+=(constSbVec2f&u)SbVec2f&operator-=(constSbVec2f&u)SbVec2foperator-()constSbVec2foperator*(constSbVec2f&v,floatd)SbVec2foperator*(floatd,constSbVec2f&v)SbVec2foperator/(constSbVec2f&v,floatd)SbVec2foperator+(constSbVec2f&v1,constSbVec2f&v2)SbVec2foperator-(constSbVec2f&v1,constSbVec2f&v2)intoperator==(constSbVec2f&v1,constSbVec2f&v2)intoperator!=(constSbVec2f&v1,constSbVec2f&v2)

See Also