Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SbVec2s(3IV)()							SbVec2s(3IV)()

NAME
       SbVec2s -- 2D vector class

INHERITS FROM
       SbVec2s

SYNOPSIS
       #include	<Inventor/SbLinear.h>

	  Methods from class SbVec2s:

			 SbVec2s()
			 SbVec2s(const short v[2])
			 SbVec2s(short x, short	y)
     int32_t		 dot(const SbVec2f &v) const
     const short *	 getValue() const
     void		 getValue(short	&x, short &y) const
     void		 negate()
     SbVec2s &		 setValue(const	short v[2])
     SbVec2s &		 setValue(short	x, short y)
     short &		 operator [](int i)
     const short &	 operator [](int i)
     SbVec2s &		 operator *=(int d)
     SbVec2s &		 operator *=(double d)
     SbVec2s &		 operator /=(int d)
     SbVec2s &		 operator /=(double d)
     SbVec2s &		 operator +=(const SbVec2s &u)
     SbVec2s &		 operator -=(const SbVec2s &u)
     SbVec2s		 operator -() const
     SbVec2s		 operator *(const SbVec2s &v, int d)
     SbVec2s		 operator *(const SbVec2s &v, double d)
     SbVec2s		 operator *(int	d, const SbVec2s &v)
     SbVec2s		 operator *(double d, const SbVec2s &v)
     SbVec2s		 operator /(const SbVec2s &v, int d)
     SbVec2s		 operator /(const SbVec2s &v, double d)
     SbVec2s		 operator +(const SbVec2s &v1, const SbVec2s &v2)
     SbVec2s		 operator -(const SbVec2s &v1, const SbVec2s &v2)
     int		 operator ==(const SbVec2s &v1,	const SbVec2s &v2)
     int		 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
			 SbVec2s()
	  Default constructor.

			 SbVec2s(const short v[2])
			 SbVec2s(short x, short	y)
	  Constructor given 2 components.

     int32_t		 dot(const SbVec2f &v) const
	  Returns dot (inner) product of vector	and another vector.

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

     void		 negate()
	  Negates each component of vector in place.

     SbVec2s &		 setValue(const	short v[2])
     SbVec2s &		 setValue(short	x, short y)
	  Sets vector components.

     short &		 operator [](int i)
     const short &	 operator [](int i)
	  Accesses indexed component of	vector.

     SbVec2s &		 operator *=(int d)
     SbVec2s &		 operator *=(double d)
     SbVec2s &		 operator /=(int d)
     SbVec2s &		 operator /=(double d)
	  Component-wise scalar	multiplication and division operators.

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

     SbVec2s		 operator -() const
	  Nondestructive unary negation	-- returns a new vector.

     SbVec2s		 operator *(const SbVec2s &v, int d)
     SbVec2s		 operator *(const SbVec2s &v, double d)
     SbVec2s		 operator *(int	d, const SbVec2s &v)
     SbVec2s		 operator *(double d, const SbVec2s &v)
     SbVec2s		 operator /(const SbVec2s &v, int d)
     SbVec2s		 operator /(const SbVec2s &v, double d)
	  Component-wise binary	scalar multiplication and division operators.

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

     int		 operator ==(const SbVec2s &v1,	const SbVec2s &v2)
     int		 operator !=(const SbVec2s &v1,	const SbVec2s &v2)
	  Equality comparison operators.

FILE FORMAT/DEFAULTS
SEE ALSO
       SbVec3f,	SbVec4f, SbVec2f

								SbVec2s(3IV)()

NAME | INHERITS FROM | SYNOPSIS | DESCRIPTION | METHODS | FILE FORMAT/DEFAULTS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=SbVec2s&sektion=3iv&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help