1SbVec2s(3IV)()                                                  SbVec2s(3IV)()
2
3
4

NAME

6       SbVec2s — 2D vector class
7

INHERITS FROM

9       SbVec2s
10

SYNOPSIS

12       #include <Inventor/SbLinear.h>
13
14          Methods from class SbVec2s:
15
16                         SbVec2s()
17                         SbVec2s(const short v[2])
18                         SbVec2s(short x, short y)
19     int32_t             dot(const SbVec2f &v) const
20     const short *       getValue() const
21     void                getValue(short &x, short &y) const
22     void                negate()
23     SbVec2s &           setValue(const short v[2])
24     SbVec2s &           setValue(short x, short y)
25     short &             operator [](int i)
26     const short &       operator [](int i)
27     SbVec2s &           operator *=(int d)
28     SbVec2s &           operator *=(double d)
29     SbVec2s &           operator /=(int d)
30     SbVec2s &           operator /=(double d)
31     SbVec2s &           operator +=(const SbVec2s &u)
32     SbVec2s &           operator -=(const SbVec2s &u)
33     SbVec2s             operator -() const
34     SbVec2s             operator *(const SbVec2s &v, int d)
35     SbVec2s             operator *(const SbVec2s &v, double d)
36     SbVec2s             operator *(int d, const SbVec2s &v)
37     SbVec2s             operator *(double d, const SbVec2s &v)
38     SbVec2s             operator /(const SbVec2s &v, int d)
39     SbVec2s             operator /(const SbVec2s &v, double d)
40     SbVec2s             operator +(const SbVec2s &v1, const SbVec2s &v2)
41     SbVec2s             operator -(const SbVec2s &v1, const SbVec2s &v2)
42     int                 operator ==(const SbVec2s &v1, const SbVec2s &v2)
43     int                 operator !=(const SbVec2s &v1, const SbVec2s &v2)
44
45

DESCRIPTION

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

METHODS

51                         SbVec2s()
52          Default constructor.
53
54                         SbVec2s(const short v[2])
55                         SbVec2s(short x, short y)
56          Constructor given 2 components.
57
58     int32_t             dot(const SbVec2f &v) const
59          Returns dot (inner) product of vector and another vector.
60
61     const short *       getValue() const
62     void                getValue(short &x, short &y) const
63          Returns vector components.
64
65     void                negate()
66          Negates each component of vector in place.
67
68     SbVec2s &           setValue(const short v[2])
69     SbVec2s &           setValue(short x, short y)
70          Sets vector components.
71
72     short &             operator [](int i)
73     const short &       operator [](int i)
74          Accesses indexed component of vector.
75
76     SbVec2s &           operator *=(int d)
77     SbVec2s &           operator *=(double d)
78     SbVec2s &           operator /=(int d)
79     SbVec2s &           operator /=(double d)
80          Component-wise scalar multiplication and division operators.
81
82     SbVec2s &           operator +=(const SbVec2s &u)
83     SbVec2s &           operator -=(const SbVec2s &u)
84          Component-wise vector addition and subtraction operators.
85
86     SbVec2s             operator -() const
87          Nondestructive unary negation — returns a new vector.
88
89     SbVec2s             operator *(const SbVec2s &v, int d)
90     SbVec2s             operator *(const SbVec2s &v, double d)
91     SbVec2s             operator *(int d, const SbVec2s &v)
92     SbVec2s             operator *(double d, const SbVec2s &v)
93     SbVec2s             operator /(const SbVec2s &v, int d)
94     SbVec2s             operator /(const SbVec2s &v, double d)
95          Component-wise binary scalar multiplication and division operators.
96
97     SbVec2s             operator +(const SbVec2s &v1, const SbVec2s &v2)
98     SbVec2s             operator -(const SbVec2s &v1, const SbVec2s &v2)
99          Component-wise binary vector addition and subtraction operators.
100
101     int                 operator ==(const SbVec2s &v1, const SbVec2s &v2)
102     int                 operator !=(const SbVec2s &v1, const SbVec2s &v2)
103          Equality comparison operators.
104
105

SEE ALSO

107       SbVec3f, SbVec4f, SbVec2f
108
109
110
111
112                                                                SbVec2s(3IV)()
Impressum