A simple set of vectors in the plane.
More...
#include <vectorset.h>
A simple set of vectors in the plane.
- See also
- VectorSet
◆ VectorSet2()
VectorSet2::VectorSet2 |
( |
const QVector< Vector2 > & |
s | ) |
|
Create a set of vectors.
- Parameters
-
◆ GetBox()
Box2 VectorSet2::GetBox |
( |
| ) |
const |
Compute the bounding box.
Simply calls Box::Box(const QVector&).
◆ Nearest() [1/2]
int VectorSet2::Nearest |
( |
const Vector2 & |
p | ) |
const |
Compute the index of the nearest point to the argument point.
- Parameters
-
◆ Nearest() [2/2]
QVector< Vector2 > VectorSet2::Nearest |
( |
const Vector2 & |
p, |
|
|
int |
n |
|
) |
| const |
Compute the k-nearest points to the argument point.
- Parameters
-
p | Point. |
n | Number of points. |
◆ NearestIndexes() [1/2]
QVector< int > VectorSet2::NearestIndexes |
( |
const Vector2 & |
p, |
|
|
int |
n |
|
) |
| const |
Compute the set of indexes of the k-nearest points to the argument point.
- Parameters
-
p | Point. |
n | Number of points. |
◆ NearestIndexes() [2/2]
QVector< int > VectorSet2::NearestIndexes |
( |
int |
ip, |
|
|
int |
n, |
|
|
const double & |
d = Math::Infinity |
|
) |
| const |
Compute the set of indexes of the k-nearest points to the argument point in the set.
- Parameters
-
ip | Index of the point. |
n | Number of points. |
d | Maximum distance threshold. |
◆ Rotate() [1/2]
void VectorSet2::Rotate |
( |
const double & |
a | ) |
|
Rotate all the points.
- Parameters
-
◆ Rotate() [2/2]
void VectorSet2::Rotate |
( |
const Matrix2 & |
r | ) |
|
Rotate all the points.
- Parameters
-
◆ Rotated()
VectorSet2 VectorSet2::Rotated |
( |
const double & |
a | ) |
const |
Compute the rotated set.
- Parameters
-
◆ Scale() [1/2]
void VectorSet2::Scale |
( |
const double & |
s | ) |
|
Scale all the points.
- Parameters
-
◆ Scale() [2/2]
void VectorSet2::Scale |
( |
const Vector2 & |
s | ) |
|
Scale all the points.
- Parameters
-
◆ Scaled()
Compute the scaled set.
- Parameters
-
◆ Translate()
void VectorSet2::Translate |
( |
const Vector2 & |
t | ) |
|
Translate all the points.
- Parameters
-
◆ Translated()
Compute the translated set.
- Parameters
-
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & |
s, |
|
|
const VectorSet2 & |
set |
|
) |
| |
|
friend |
Overloaded output-stream operator.
- Parameters
-