logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

SbVec2s — 2D vector class

Description

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

Inherits From

       SbVec2s

Methods

SbVec2s()
          Default constructor.

                         SbVec2s(constshortv[2])SbVec2s(shortx,shorty)
          Constructor given 2 components.

     int32_tdot(constSbVec2f&v)const
          Returns dot (inner) product of vector and another vector.

     constshort*getValue()constvoidgetValue(short&x,short&y)const
          Returns vector components.

     voidnegate()
          Negates each component of vector in place.

     SbVec2s&setValue(constshortv[2])SbVec2s&setValue(shortx,shorty)
          Sets vector components.

     short&operator[](inti)constshort&operator[](inti)
          Accesses indexed component of vector.

     SbVec2s&operator*=(intd)SbVec2s&operator*=(doubled)SbVec2s&operator/=(intd)SbVec2s&operator/=(doubled)
          Component-wise scalar multiplication and division operators.

     SbVec2s&operator+=(constSbVec2s&u)SbVec2s&operator-=(constSbVec2s&u)
          Component-wise vector addition and subtraction operators.

     SbVec2soperator-()const
          Nondestructive unary negation — returns a new vector.

     SbVec2soperator*(constSbVec2s&v,intd)SbVec2soperator*(constSbVec2s&v,doubled)SbVec2soperator*(intd,constSbVec2s&v)SbVec2soperator*(doubled,constSbVec2s&v)SbVec2soperator/(constSbVec2s&v,intd)SbVec2soperator/(constSbVec2s&v,doubled)
          Component-wise binary scalar multiplication and division operators.

     SbVec2soperator+(constSbVec2s&v1,constSbVec2s&v2)SbVec2soperator-(constSbVec2s&v1,constSbVec2s&v2)
          Component-wise binary vector addition and subtraction operators.

     intoperator==(constSbVec2s&v1,constSbVec2s&v2)intoperator!=(constSbVec2s&v1,constSbVec2s&v2)
          Equality comparison operators.

Name

       SbVec2s — 2D vector class

See Also

SbVec3f,SbVec4f,SbVec2fSbVec2s(3IV)()

Synopsis

#include<Inventor/SbLinear.h>

          Methods from class SbVec2s:

                         SbVec2s()SbVec2s(constshortv[2])SbVec2s(shortx,shorty)int32_tdot(constSbVec2f&v)constconstshort*getValue()constvoidgetValue(short&x,short&y)constvoidnegate()SbVec2s&setValue(constshortv[2])SbVec2s&setValue(shortx,shorty)short&operator[](inti)constshort&operator[](inti)SbVec2s&operator*=(intd)SbVec2s&operator*=(doubled)SbVec2s&operator/=(intd)SbVec2s&operator/=(doubled)SbVec2s&operator+=(constSbVec2s&u)SbVec2s&operator-=(constSbVec2s&u)SbVec2soperator-()constSbVec2soperator*(constSbVec2s&v,intd)SbVec2soperator*(constSbVec2s&v,doubled)SbVec2soperator*(intd,constSbVec2s&v)SbVec2soperator*(doubled,constSbVec2s&v)SbVec2soperator/(constSbVec2s&v,intd)SbVec2soperator/(constSbVec2s&v,doubled)SbVec2soperator+(constSbVec2s&v1,constSbVec2s&v2)SbVec2soperator-(constSbVec2s&v1,constSbVec2s&v2)intoperator==(constSbVec2s&v1,constSbVec2s&v2)intoperator!=(constSbVec2s&v1,constSbVec2s&v2)

See Also