A simple set of vectors.
More...
#include <vectorset.h>
|
|
| VectorSet () |
| | Empty.
|
| |
| | VectorSet (const VectorSet2 &) |
| | Create a set of vectors.
|
| |
| | VectorSet (const QVector< Vector > &) |
| | Create a set of vectors.
|
| |
| | VectorSet (Vector *, unsigned int) |
| | Create a set of vectors.
|
| |
| VectorSet | VectorToPoint () const |
| | Convert a series of displacements into positions.
|
| |
|
void | Reverse () |
| | Reverse the order of the elements.
|
| |
|
| ~VectorSet () |
| | Empty.
|
| |
|
Vector | At (int) const |
| | Access to element.
|
| |
|
Vector | Vertex (int) const |
| | Access to element.
|
| |
|
Vector & | operator[] (int) |
| | Access to element.
|
| |
|
int | Size () const |
| | Return the size of the set.
|
| |
|
Vector | Barycenter () const |
| | Compute the barycenter.
|
| |
| void | Append (const Vector &) |
| | Add a point to the set.
|
| |
| Box | GetBox () const |
| | Compute the bounding box.
|
| |
| void | Rotate (const Matrix &) |
| | Rotate all the points.
|
| |
| void | Translate (const Vector &) |
| | Translate all the points.
|
| |
| void | Scale (const double &) |
| | Scale all the points.
|
| |
| void | Scale (const Vector &) |
| | Scale all the points.
|
| |
| void | Transform (const Frame &) |
| | Transform all the points.
|
| |
| void | Transform (const FrameScaled &) |
| | Transform all the points.
|
| |
|
QVector< Vector > & | Get () |
| | Access to the internal structure.
|
| |
|
const QVector< Vector > & | Get () const |
| | Access to the internal structure.
|
| |
| void | Clean (const double &) |
| | Remove redundant points that are within epsilon distance.
|
| |
| void | Load (const QString &) |
| | Extract vertexes from an .obj file.
|
| |
| int | Nearest (const Vector &) const |
| | Compute the index of the nearest point to the argument point.
|
| |
| QVector< Vector > | Nearest (const Vector &, int) const |
| | Compute the k-nearest points to the argument point.
|
| |
| QVector< int > | NearestIndexes (const Vector &, int) const |
| | Compute the set of indexes of the k-nearest points to the argument point.
|
| |
| QVector< int > | NearestIndexes (int, int, const double &=Math::Infinity) const |
| | Compute the set of indexes of the k-nearest points to the argument point in the set.
|
| |
|
|
QVector< Vector > | v |
| | Set of vectors.
|
| |
|
| std::ostream & | operator<< (std::ostream &s, const VectorSet &set) |
| | Overloaded output-stream operator.
|
| |
A simple set of vectors.
This class implements several simple functions to handle point sets: affine transforms, bounding box computation.
The class provides range-based for loops:
{
e *= 2.0 * e +
Vector(3.0, 2.0, -1);
}
Vectors in three dimensions.
Definition evector.h:20
QVector< Vector > v
Set of vectors.
Definition vectorset.h:18
VectorSet()
Empty.
Definition vectorset.h:21
◆ VectorSet() [1/3]
Create a set of vectors.
- Parameters
-
◆ VectorSet() [2/3]
| VectorSet::VectorSet |
( |
const QVector< Vector > & | s | ) |
|
|
explicit |
Create a set of vectors.
- Parameters
-
◆ VectorSet() [3/3]
| VectorSet::VectorSet |
( |
Vector * | s, |
|
|
unsigned int | n ) |
|
explicit |
Create a set of vectors.
- Parameters
-
◆ Append()
| void VectorSet::Append |
( |
const Vector & | p | ) |
|
Add a point to the set.
- Parameters
-
◆ Clean()
| void VectorSet::Clean |
( |
const double & | e | ) |
|
Remove redundant points that are within epsilon distance.
- Parameters
-
◆ GetBox()
| Box VectorSet::GetBox |
( |
| ) |
const |
Compute the bounding box.
Simply calls Box::Box(const QVector&).
◆ Load()
| void VectorSet::Load |
( |
const QString & | name | ) |
|
Extract vertexes from an .obj file.
- Parameters
-
◆ Nearest() [1/2]
| int VectorSet::Nearest |
( |
const Vector & | p | ) |
const |
Compute the index of the nearest point to the argument point.
- Parameters
-
◆ Nearest() [2/2]
| QVector< Vector > VectorSet::Nearest |
( |
const Vector & | 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 > VectorSet::NearestIndexes |
( |
const Vector & | 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 > VectorSet::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()
| void VectorSet::Rotate |
( |
const Matrix & | r | ) |
|
Rotate all the points.
- Parameters
-
◆ Scale() [1/2]
| void VectorSet::Scale |
( |
const double & | s | ) |
|
Scale all the points.
- Parameters
-
◆ Scale() [2/2]
| void VectorSet::Scale |
( |
const Vector & | s | ) |
|
Scale all the points.
- Parameters
-
◆ Transform() [1/2]
| void VectorSet::Transform |
( |
const Frame & | f | ) |
|
Transform all the points.
- Parameters
-
◆ Transform() [2/2]
Transform all the points.
- Parameters
-
◆ Translate()
| void VectorSet::Translate |
( |
const Vector & | t | ) |
|
Translate all the points.
- Parameters
-
◆ VectorToPoint()
Convert a series of displacements into positions.
Only the first vector will be kept as origin.
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | s, |
|
|
const VectorSet & | set ) |
|
friend |
Overloaded output-stream operator.
- Parameters
-