BRL-CAD
NurbsTools Class Reference

Some useful tools for initialization, point search, ... More...

#include <opennurbs_fit.h>

Static Public Member Functions

static unsigned getClosestPoint (const ON_2dPoint &point, const vector_vec2d &data)
 Get the closest point with respect to 'point'. More...
 
static unsigned getClosestPoint (const ON_3dPoint &point, const vector_vec3d &data)
 Get the closest point with respect to 'point'. More...
 
static unsigned getClosestPoint (const ON_2dPoint &point, const ON_2dVector &dir, const vector_vec2d &data, unsigned &idxcp)
 Get the closest point with respect to 'point' in Non-Euclidean metric. More...
 
static ON_3dVector computeMean (const vector_vec3d &data)
 Compute the mean of a set of points. More...
 
static ON_2dVector computeMean (const vector_vec2d &data)
 Compute the mean of a set of points. More...
 
static void pca (const vector_vec3d &data, ON_3dVector &mean, Eigen::Matrix3d &eigenvectors, Eigen::Vector3d &eigenvalues)
 PCA - principal-component-analysis. More...
 
static void downsample_random (const vector_vec3d &data1, vector_vec3d &data2, unsigned size)
 Downsample data points to a certain size. More...
 
static void downsample_random (vector_vec3d &data1, unsigned size)
 Downsample data points to a certain size. More...
 

Detailed Description

Some useful tools for initialization, point search, ...

Definition at line 169 of file opennurbs_fit.h.

Member Function Documentation

unsigned getClosestPoint ( const ON_2dPoint &  point,
const vector_vec2d data 
)
static

Get the closest point with respect to 'point'.

Parameters
[in]pointThe point to which the closest point is searched for.
[in]dataVector containing the set of points for searching.

Definition at line 93 of file opennurbs_fit.cpp.

References OSL::Strings::v.

unsigned getClosestPoint ( const ON_3dPoint &  point,
const vector_vec3d data 
)
static

Get the closest point with respect to 'point'.

Parameters
[in]pointThe point to which the closest point is searched for.
[in]dataVector containing the set of points for searching.

Definition at line 113 of file opennurbs_fit.cpp.

References OSL::Strings::v.

unsigned getClosestPoint ( const ON_2dPoint &  point,
const ON_2dVector &  dir,
const vector_vec2d data,
unsigned &  idxcp 
)
static

Get the closest point with respect to 'point' in Non-Euclidean metric.

Related paper: TODO

Parameters
[in]pointThe point to which the closest point is searched for.
[in]dirThe direction defining 'inside' and 'outside'
[in]dataVector containing the set of points for searching.
[out]idxcpClosest point with respect to Euclidean metric.

Definition at line 133 of file opennurbs_fit.cpp.

References NEAR_ZERO, SMALL_FASTF, and OSL::Strings::v.

ON_3dVector computeMean ( const vector_vec3d data)
static

Compute the mean of a set of points.

Parameters
[in]dataSet of points.

Definition at line 168 of file opennurbs_fit.cpp.

References s, and OSL::Strings::u.

Referenced by NurbsTools::pca().

ON_2dVector computeMean ( const vector_vec2d data)
static

Compute the mean of a set of points.

Parameters
[in]dataSet of points.

Definition at line 183 of file opennurbs_fit.cpp.

References s, and OSL::Strings::u.

void pca ( const vector_vec3d data,
ON_3dVector &  mean,
Eigen::Matrix3d &  eigenvectors,
Eigen::Vector3d &  eigenvalues 
)
static

PCA - principal-component-analysis.

Parameters
[in]dataSet of points.
[out]meanThe mean of the set of points.
[out]eigenvectorsMatrix containing column-wise the eigenvectors of the set of points.
[out]eigenvaluesThe eigenvalues of the set of points with respect to the eigenvectors.

Definition at line 198 of file opennurbs_fit.cpp.

References C, NurbsTools::computeMean(), Q, and s.

Referenced by FittingSurface::initNurbsPCA(), and FittingSurface::initNurbsPCABoundingBox().

Here is the call graph for this function:

void downsample_random ( const vector_vec3d data1,
vector_vec3d data2,
unsigned  size 
)
static

Downsample data points to a certain size.

Parameters
[in]data1The original set of points.
[out]data2The downsampled set of points of size 'size'.
[in]sizeThe desired size of the resulting set of points.

Definition at line 56 of file opennurbs_fit.cpp.

References s.

void downsample_random ( vector_vec3d data1,
unsigned  size 
)
static

Downsample data points to a certain size.

Parameters

Definition at line 74 of file opennurbs_fit.cpp.

References s.


The documentation for this class was generated from the following files: