1SbVec2f(3IV)()                                                  SbVec2f(3IV)()
2
3
4

NAME

6       SbVec2f — 2D vector class
7

INHERITS FROM

9       SbVec2f
10

SYNOPSIS

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

DESCRIPTION

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

METHODS

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

SEE ALSO

110       SbVec3f, SbVec4f, SbVec2s, SbRotation
111
112
113
114
115                                                                SbVec2f(3IV)()
Impressum