1SbVec4f(3IV)() SbVec4f(3IV)()
2
3
4
6 SbVec4f — 4D vector class
7
9 SbVec4f
10
12 #include <Inventor/SbLinear.h>
13
14 Methods from class SbVec4f:
15
16 SbVec4f()
17 SbVec4f(const float v[4])
18 SbVec4f(float x, float y, float z, float w)
19 float dot(const SbVec4f &v) const
20 SbBool equals(const SbVec4f v, float tolerance) const
21 void getReal(SbVec3f &v) const
22 const float * getValue() const
23 void getValue(float &x, float &y, float &z, float &w)
24 const
25 float length() const
26 void negate()
27 normalize()
28 SbVec4f & setValue(const float v[4])
29 SbVec4f & setValue(float x, float y, float z, float w)
30 float & operator [](int i)
31 const float & operator [](int i)
32 SbVec4f & operator *=(float d)
33 SbVec4f & operator /=(float d)
34 SbVec4f & operator +=(const SbVec4f &u)
35 SbVec4f & operator -=(const SbVec4f &u)
36 SbVec4f operator -() const
37 SbVec4f operator *(const SbVec4f &v, float d)
38 SbVec4f operator *(float d, const SbVec4f &v)
39 SbVec4f operator /(const SbVec4f &v, float d)
40 SbVec4f operator +(const SbVec4f &v1, const SbVec4f &v2)
41 SbVec4f operator -(const SbVec4f &v1, const SbVec4f &v2)
42 int operator ==(const SbVec4f &v1, const SbVec4f &v2)
43 int operator !=(const SbVec4f &v1, const SbVec4f &v2)
44
45
47 4D vector class used to store homogeneous coordinates. This class is
48 used in Inventor for arguments and return values.
49
51 SbVec4f()
52 Default constructor.
53
54 SbVec4f(const float v[4])
55 SbVec4f(float x, float y, float z, float w)
56 Constructor given vector components.
57
58 float dot(const SbVec4f &v) const
59 Returns dot (inner) product of vector and another vector.
60
61 SbBool equals(const SbVec4f v, float tolerance) const
62 Equality comparison within given tolerance — the square of the
63 length of the maximum distance between the two vectors.
64
65 void getReal(SbVec3f &v) const
66 Returns the real portion of the vector by dividing by the fourth
67 value.
68
69 const float * getValue() const
70 void getValue(float &x, float &y, float &z, float &w)
71 const
72 Returns vector components.
73
74 float length() const
75 Returns geometric length of vector.
76
77 void negate()
78 Negates each component of vector in place.
79
80 normalize()
81 Changes vector to be unit length.
82
83 SbVec4f & setValue(const float v[4])
84 SbVec4f & setValue(float x, float y, float z, float w)
85 Sets the vector components.
86
87 float & operator [](int i)
88 const float & operator [](int i)
89 Accesses indexed component of vector.
90
91 SbVec4f & operator *=(float d)
92 SbVec4f & operator /=(float d)
93 Component-wise scalar multiplication and division operators.
94
95 SbVec4f & operator +=(const SbVec4f &u)
96 SbVec4f & operator -=(const SbVec4f &u)
97 Component-wise vector addition and subtraction operators.
98
99 SbVec4f operator -() const
100 Nondestructive unary negation — returns a new vector.
101
102 SbVec4f operator *(const SbVec4f &v, float d)
103 SbVec4f operator *(float d, const SbVec4f &v)
104 SbVec4f operator /(const SbVec4f &v, float d)
105 Component-wise binary scalar multiplication and division operators.
106
107 SbVec4f operator +(const SbVec4f &v1, const SbVec4f &v2)
108 SbVec4f operator -(const SbVec4f &v1, const SbVec4f &v2)
109 Component-wise binary vector addition and subtraction operators.
110
111 int operator ==(const SbVec4f &v1, const SbVec4f &v2)
112 int operator !=(const SbVec4f &v1, const SbVec4f &v2)
113 Equality comparison operators.
114
115
117 SbVec2f, SbVec3f, SbVec2s, SbRotation
118
119
120
121
122 SbVec4f(3IV)()