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

SbVec4f — 4D vector class

Description

       4D  vector  class used to store homogeneous coordinates. This class is used in Inventor for arguments and
       return values.

Inherits From

       SbVec4f

Methods

SbVec4f()
          Default constructor.

                         SbVec4f(constfloatv[4])SbVec4f(floatx,floaty,floatz,floatw)
          Constructor given vector components.

     floatdot(constSbVec4f&v)const
          Returns dot (inner) product of vector and another vector.

     SbBoolequals(constSbVec4fv,floattolerance)const
          Equality comparison within given tolerance — the square of the length of the maximum distance  between
          the two vectors.

     voidgetReal(SbVec3f&v)const
          Returns the real portion of the vector by dividing by the fourth value.

     constfloat*getValue()constvoidgetValue(float&x,float&y,float&z,float&w)const
          Returns vector components.

     floatlength()const
          Returns geometric length of vector.

     voidnegate()
          Negates each component of vector in place.

                         normalize()
          Changes vector to be unit length.

     SbVec4f&setValue(constfloatv[4])SbVec4f&setValue(floatx,floaty,floatz,floatw)
          Sets the vector components.

     float&operator[](inti)constfloat&operator[](inti)
          Accesses indexed component of vector.

     SbVec4f&operator*=(floatd)SbVec4f&operator/=(floatd)
          Component-wise scalar multiplication and division operators.

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

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

     SbVec4foperator*(constSbVec4f&v,floatd)SbVec4foperator*(floatd,constSbVec4f&v)SbVec4foperator/(constSbVec4f&v,floatd)
          Component-wise binary scalar multiplication and division operators.

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

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

Name

       SbVec4f — 4D vector class

See Also

SbVec2f,SbVec3f,SbVec2s,SbRotationSbVec4f(3IV)()

Synopsis

#include<Inventor/SbLinear.h>

          Methods from class SbVec4f:

                         SbVec4f()SbVec4f(constfloatv[4])SbVec4f(floatx,floaty,floatz,floatw)floatdot(constSbVec4f&v)constSbBoolequals(constSbVec4fv,floattolerance)constvoidgetReal(SbVec3f&v)constconstfloat*getValue()constvoidgetValue(float&x,float&y,float&z,float&w)constfloatlength()constvoidnegate()normalize()SbVec4f&setValue(constfloatv[4])SbVec4f&setValue(floatx,floaty,floatz,floatw)float&operator[](inti)constfloat&operator[](inti)SbVec4f&operator*=(floatd)SbVec4f&operator/=(floatd)SbVec4f&operator+=(constSbVec4f&u)SbVec4f&operator-=(constSbVec4f&u)SbVec4foperator-()constSbVec4foperator*(constSbVec4f&v,floatd)SbVec4foperator*(floatd,constSbVec4f&v)SbVec4foperator/(constSbVec4f&v,floatd)SbVec4foperator+(constSbVec4f&v1,constSbVec4f&v2)SbVec4foperator-(constSbVec4f&v1,constSbVec4f&v2)intoperator==(constSbVec4f&v1,constSbVec4f&v2)intoperator!=(constSbVec4f&v1,constSbVec4f&v2)

See Also