Some useful tools for initialization, point search, ... More...
#include <nurbs_tools.h>
Static Public Member Functions | |
static void | computeBoundingBox (const ON_NurbsCurve &nurbs, Eigen::Vector3d &_min, Eigen::Vector3d &_max) |
static void | computeBoundingBox (const ON_NurbsSurface &nurbs, Eigen::Vector3d &_min, Eigen::Vector3d &_max) |
static Eigen::Vector3d | computeMean (const vector_vec3d &data) |
Compute the mean of a set of points. | |
static Eigen::Vector2d | computeMean (const vector_vec2d &data) |
Compute the mean of a set of points. | |
static double | computeRScale (const Eigen::Vector3d &_min, const Eigen::Vector3d &_max) |
static Eigen::Vector3d | computeVariance (const Eigen::Vector3d &mean, const vector_vec3d &data) |
Compute the variance of a set of points. | |
static Eigen::Vector2d | computeVariance (const Eigen::Vector2d &mean, const vector_vec2d &data) |
Compute the variance of a set of points. | |
static void | downsample_random (const vector_vec3d &data1, vector_vec3d &data2, unsigned size) |
Downsample data points to a certain size. | |
static void | downsample_random (vector_vec3d &data1, unsigned size) |
Downsample data points to a certain size. | |
static unsigned | getClosestPoint (const Eigen::Vector2d &point, const vector_vec2d &data) |
Get the closest point with respect to 'point'. | |
static unsigned | getClosestPoint (const Eigen::Vector3d &point, const vector_vec3d &data) |
Get the closest point with respect to 'point'. | |
static unsigned | getClosestPoint (const Eigen::Vector2d &point, const Eigen::Vector2d &dir, const vector_vec2d &data, unsigned &idxcp) |
Get the closest point with respect to 'point' in Non-Euclidean metric. | |
static void | pca (const vector_vec3d &data, Eigen::Vector3d &mean, Eigen::Matrix3d &eigenvectors, Eigen::Vector3d &eigenvalues) |
PCA - principal-component-analysis. | |
static void | pca (const vector_vec2d &data, Eigen::Vector2d &mean, Eigen::Matrix2d &eigenvectors, Eigen::Vector2d &eigenvalues) |
PCA - principal-component-analysis. |
Some useful tools for initialization, point search, ...
Definition at line 59 of file nurbs_tools.h.
void NurbsTools::computeBoundingBox | ( | const ON_NurbsCurve & | nurbs, |
Eigen::Vector3d & | _min, | ||
Eigen::Vector3d & | _max | ||
) | [static] |
compute bounding box of curve control points
Definition at line 258 of file nurbs_tools.cpp.
void NurbsTools::computeBoundingBox | ( | const ON_NurbsSurface & | nurbs, |
Eigen::Vector3d & | _min, | ||
Eigen::Vector3d & | _max | ||
) | [static] |
Definition at line 284 of file nurbs_tools.cpp.
Eigen::Vector3d NurbsTools::computeMean | ( | const vector_vec3d & | data | ) | [static] |
Compute the mean of a set of points.
[in] | data | Set of points. |
Definition at line 196 of file nurbs_tools.cpp.
Eigen::Vector2d NurbsTools::computeMean | ( | const vector_vec2d & | data | ) | [static] |
Compute the mean of a set of points.
[in] | data | Set of points. |
Definition at line 210 of file nurbs_tools.cpp.
double NurbsTools::computeRScale | ( | const Eigen::Vector3d & | _min, |
const Eigen::Vector3d & | _max | ||
) | [static] |
Definition at line 313 of file nurbs_tools.cpp.
Eigen::Vector3d NurbsTools::computeVariance | ( | const Eigen::Vector3d & | mean, |
const vector_vec3d & | data | ||
) | [static] |
Compute the variance of a set of points.
[in] | data | Set of points |
Definition at line 224 of file nurbs_tools.cpp.
Eigen::Vector2d NurbsTools::computeVariance | ( | const Eigen::Vector2d & | mean, |
const vector_vec2d & | data | ||
) | [static] |
Compute the variance of a set of points.
[in] | data | Set of points |
Definition at line 241 of file nurbs_tools.cpp.
void NurbsTools::downsample_random | ( | const vector_vec3d & | data1, |
vector_vec3d & | data2, | ||
unsigned | size | ||
) | [static] |
Downsample data points to a certain size.
[in] | data1 | The original set of points. |
[out] | data2 | The downsampled set of points of size 'size'. |
[in] | size | The desired size of the resulting set of points. |
Definition at line 49 of file nurbs_tools.cpp.
void NurbsTools::downsample_random | ( | vector_vec3d & | data1, |
unsigned | size | ||
) | [static] |
Downsample data points to a certain size.
in/out] | data1 The set of points for downsampling; will be replaced by the resulting set of points of size 'size'. | |
[in] | size | The desired size of the resulting set of points. |
Definition at line 68 of file nurbs_tools.cpp.
unsigned NurbsTools::getClosestPoint | ( | const Eigen::Vector2d & | point, |
const vector_vec2d & | data | ||
) | [static] |
Get the closest point with respect to 'point'.
[in] | point | The point to which the closest point is searched for. |
[in] | data | Vector containing the set of points for searching. |
Definition at line 119 of file nurbs_tools.cpp.
unsigned NurbsTools::getClosestPoint | ( | const Eigen::Vector3d & | point, |
const vector_vec3d & | data | ||
) | [static] |
Get the closest point with respect to 'point'.
[in] | point | The point to which the closest point is searched for. |
[in] | data | Vector containing the set of points for searching. |
Definition at line 139 of file nurbs_tools.cpp.
unsigned NurbsTools::getClosestPoint | ( | const Eigen::Vector2d & | point, |
const Eigen::Vector2d & | dir, | ||
const vector_vec2d & | data, | ||
unsigned & | idxcp | ||
) | [static] |
Get the closest point with respect to 'point' in Non-Euclidean metric.
Related paper: TODO
[in] | point | The point to which the closest point is searched for. |
[in] | dir | The direction defining 'inside' and 'outside' |
[in] | data | Vector containing the set of points for searching. |
[out] | idxcp | Closest point with respect to Euclidean metric. |
Definition at line 159 of file nurbs_tools.cpp.
void NurbsTools::pca | ( | const vector_vec3d & | data, |
Eigen::Vector3d & | mean, | ||
Eigen::Matrix3d & | eigenvectors, | ||
Eigen::Vector3d & | eigenvalues | ||
) | [static] |
PCA - principal-component-analysis.
[in] | data | Set of points. |
[out] | mean | The mean of the set of points. |
[out] | eigenvectors | Matrix containing column-wise the eigenvectors of the set of points. |
[out] | eigenvalues | The eigenvalues of the set of points with respect to the eigenvectors. |
Definition at line 321 of file nurbs_tools.cpp.
void NurbsTools::pca | ( | const vector_vec2d & | data, |
Eigen::Vector2d & | mean, | ||
Eigen::Matrix2d & | eigenvectors, | ||
Eigen::Vector2d & | eigenvalues | ||
) | [static] |
PCA - principal-component-analysis.
[in] | data | Set of points. |
[out] | mean | The mean of the set of points. |
[out] | eigenvectors | Matrix containing column-wise the eigenvectors of the set of points. |
[out] | eigenvalues | The eigenvalues of the set of points with respect to the eigenvectors. |
Definition at line 359 of file nurbs_tools.cpp.