2D vector class.
More...
#include <Inventor/SbLinear.h>
|
| SbVec2f () |
| Default constructor.
|
|
| SbVec2f (const float v[2]) |
| Constructor given vector components.
|
|
| SbVec2f (float x, float y) |
| Constructor given vector components.
|
|
float | dot (const SbVec2f &v) const |
| Returns dot (inner) product of vector and another vector.
|
|
const float * | getValue () const |
| Returns vector components.
|
|
void | getValue (float &x, float &y) const |
| Returns vector components.
|
|
float | length () const |
| Returns geometric length of vector.
|
|
void | negate () |
| Negates each component of vector in place.
|
|
float | normalize () |
| Changes vector to be unit length.
|
|
SbVec2f & | setValue (const float v[2]) |
| Sets the vector components.
|
|
SbVec2f & | setValue (float x, float y) |
| Sets the vector components.
|
|
float & | operator[] (int i) |
| Accesses indexed component of vector.
|
|
const float & | operator[] (int i) const |
|
SbVec2f & | operator*= (float d) |
| Component-wise scalar multiplication and division operators.
|
|
SbVec2f & | operator/= (float d) |
| Component-wise scalar multiplication and division operators.
|
|
SbVec2f & | operator+= (const SbVec2f &u) |
| Component-wise vector addition and subtraction operators.
|
|
SbVec2f & | operator-= (const SbVec2f &u) |
| Component-wise vector addition and subtraction operators.
|
|
SbVec2f | operator- () const |
| Nondestructive unary negation - returns a new vector.
|
|
bool | equals (const SbVec2f v, float tolerance) const |
| Equality comparison within given tolerance em the square of the length of the maximum distance between the two vectors.
|
|
|
float | vec [2] |
| Storage for vector components.
|
|
2D vector class used to store 2D vectors and points. This class is used throughout Inventor for arguments and return values. {}
- See Also
- SbVec3f, SbVec4f, SbVec2s, SbRotation
Definition at line 246 of file SbLinear.h.
◆ SbVec2f() [1/3]
◆ SbVec2f() [2/3]
SbVec2f::SbVec2f |
( |
const float |
v[2] | ) |
|
|
inline |
◆ SbVec2f() [3/3]
SbVec2f::SbVec2f |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inline |
◆ dot()
float SbVec2f::dot |
( |
const SbVec2f & |
v | ) |
const |
◆ equals()
bool SbVec2f::equals |
( |
const SbVec2f |
v, |
|
|
float |
tolerance |
|
) |
| const |
◆ getValue() [1/2]
const float * SbVec2f::getValue |
( |
| ) |
const |
|
inline |
◆ getValue() [2/2]
void SbVec2f::getValue |
( |
float & |
x, |
|
|
float & |
y |
|
) |
| const |
◆ length()
float SbVec2f::length |
( |
| ) |
const |
◆ negate()
◆ normalize()
float SbVec2f::normalize |
( |
| ) |
|
◆ operator*=()
SbVec2f & SbVec2f::operator*= |
( |
float |
d | ) |
|
◆ operator+=()
◆ operator-()
SbVec2f SbVec2f::operator- |
( |
| ) |
const |
◆ operator-=()
◆ operator/=()
SbVec2f & SbVec2f::operator/= |
( |
float |
d | ) |
|
|
inline |
◆ operator[]() [1/2]
float & SbVec2f::operator[] |
( |
int |
i | ) |
|
|
inline |
◆ operator[]() [2/2]
const float & SbVec2f::operator[] |
( |
int |
i | ) |
const |
|
inline |
◆ setValue() [1/2]
SbVec2f & SbVec2f::setValue |
( |
const float |
v[2] | ) |
|
◆ setValue() [2/2]
SbVec2f & SbVec2f::setValue |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
◆ operator!=
◆ operator* [1/2]
◆ operator* [2/2]
◆ operator+
◆ operator-
◆ operator/
◆ operator==
◆ vec
The documentation for this class was generated from the following file:
- C:/jh/mevislab/4.0.2_1/build/MeVis/ThirdParty/Sources/Inventor/include/Inventor/SbLinear.h