1SbVec3f(3IV)()                                                  SbVec3f(3IV)()
2
3
4

NAME

6       SbVec3f — 3D vector class
7

INHERITS FROM

9       SbVec3f
10

SYNOPSIS

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

DESCRIPTION

50       3D vector class used to store 3D vectors and points. This class is used
51       throughout Inventor for arguments and return values.
52

METHODS

54                         SbVec3f()
55          Default constructor.
56
57                         SbVec3f(const float v[3])
58                         SbVec3f(float x, float y, float z)
59          Constructor given vector components.
60
61                         SbVec3f(SbPlane &p0, SbPlane &p1, SbPlane &p2)
62          Constructor given 3 planes.
63
64     SbVec3f             cross(const SbVec3f &v) const
65          Returns right-handed cross product of vector and another vector.
66
67     float               dot(const SbVec3f &v) const
68          Returns dot (inner) product of vector and another vector.
69
70     SbBool              equals(const SbVec3f v, float tolerance) const
71          Equality  comparison  within  given  tolerance  —  the square of the
72          length of the maximum distance between the two vectors.
73
74     SbVec3f             getClosestAxis() const
75          Returns principal axis that is closest (based on maximum  dot  prod‐
76          uct) to this vector.
77
78     const float *       getValue() const
79     void                getValue(float &x, float &y, float &z) const
80          Returns vector components.
81
82     float               length() const
83          Returns geometric length of vector.
84
85     void                negate()
86          Negates each component of vector in place.
87
88     float               normalize()
89          Changes  vector  to be unit length, returning the length before nor‐
90          malization.
91
92     SbVec3f &           setValue(const float v[3])
93     SbVec3f &           setValue(float x, float y, float z)
94          Sets the vector components.
95
96     SbVec3f &           setValue(const  SbVec3f  &barycentic,  const  SbVec3f
97                              &v0, const SbVec3f &v1, const SbVec3f &v2)
98          Sets value of vector as the weighted average of 3 other vectors.
99
100     float &             operator [](int i)
101     const float &       operator [](int i)
102          Accesses indexed component of vector.
103
104     SbVec3f &           operator *=(float d)
105     SbVec3f &           operator /=(float d)
106          Component-wise scalar multiplication and division operators.
107
108     SbVec3f &           operator +=(const SbVec3f &u)
109     SbVec3f &           operator -=(const SbVec3f &u)
110          Component-wise vector addition and subtraction operators.
111
112     SbVec3f             operator -() const
113          Nondestructive unary negation — returns a new vector.
114
115     SbVec3f             operator *(const SbVec3f &v, float d)
116     SbVec3f             operator *(float d, const SbVec3f &v)
117     SbVec3f             operator /(const SbVec3f &v, float d)
118          Component-wise binary scalar multiplication and division operators.
119
120     SbVec3f             operator +(const SbVec3f &v1, const SbVec3f &v2)
121     SbVec3f             operator -(const SbVec3f &v1, const SbVec3f &v2)
122          Component-wise binary vector addition and subtraction operators.
123
124     int                 operator ==(const SbVec3f &v1, const SbVec3f &v2)
125     int                 operator !=(const SbVec3f &v1, const SbVec3f &v2)
126          Equality comparison operators.
127
128

SEE ALSO

130       SbVec2f, SbVec4f, SbVec2s, SbRotation
131
132
133
134
135                                                                SbVec3f(3IV)()
Impressum