OpenWalnut
1.5.0dev
|
Constructs a triangle mesh representation of a spline surface from a given number of input points. More...
#include <WSurface.h>
Public Member Functions | |
WSurface () | |
Constructs new WSurface. More... | |
~WSurface () | |
Destructs this WSurface. More... | |
void | execute () |
Runs the algo and constructs a spine surface from the given input points. More... | |
std::vector< WVector3d > | getSplinePoints () |
Returns a copy of the spline point vector. More... | |
void | setSetSampleRate (float r) |
SEts the sample rate for the splines. More... | |
void | setSupportPoints (std::vector< WVector3d > supportPoints, bool forceUpdate=false) |
sets the vector of support points the surface is calculated from More... | |
std::shared_ptr< WTriangleMesh > | getTriangleMesh () |
getter More... | |
Private Member Functions | |
WTensorSym< 2, 3, double > | getCovarianceMatrix (std::vector< WVector3d > points) |
Calculates the covariance matrix for a given number of points inspace. More... | |
void | getSplineSurfaceDeBoorPoints (std::vector< WVector3d > &givenPoints, std::vector< WVector3d > &deBoorPoints, int numRows, int numCols) |
Calculates numRows*numCols deBoor points from given input points. More... | |
Private Attributes | |
std::shared_ptr< WTriangleMesh > | m_tMesh |
Triangle mesh of the surface. More... | |
double | m_radius |
param for the algo More... | |
double | m_mu |
parameter of local shepard with franke-little-weights More... | |
int | m_numDeBoorRows |
number of of rows for deBoor grid More... | |
int | m_numDeBoorCols |
number of of columns for deBoor grid More... | |
int | m_order |
order the splines More... | |
double | m_sampleRateT |
sampling rate of spline in first direction More... | |
double | m_sampleRateU |
sampling rate of spline in second direction More... | |
double | m_xAverage |
global mean of x values for covariance matrix More... | |
double | m_yAverage |
global mean of y values for covariance matrix More... | |
double | m_zAverage |
global mean of z values for covariance matrix More... | |
std::vector< WVector3d > | m_supportPoints |
stores the support points More... | |
std::vector< WVector3d > | m_splinePoints |
stores the input points ???? More... | |
int | m_renderpointsPerCol |
resolution of the output mesh More... | |
int | m_renderpointsPerRow |
resolution of the output mesh More... | |
Constructs a triangle mesh representation of a spline surface from a given number of input points.
Definition at line 39 of file WSurface.h.
WSurface::WSurface | ( | ) |
Constructs new WSurface.
Definition at line 36 of file WSurface.cpp.
WSurface::~WSurface | ( | ) |
Destructs this WSurface.
Definition at line 51 of file WSurface.cpp.
void WSurface::execute | ( | ) |
Runs the algo and constructs a spine surface from the given input points.
Definition at line 174 of file WSurface.cpp.
References getCovarianceMatrix(), WBSplineSurface::getNumSamplePointsT(), WBSplineSurface::getNumSamplePointsU(), getSplineSurfaceDeBoorPoints(), m_numDeBoorCols, m_numDeBoorRows, m_order, m_renderpointsPerCol, m_renderpointsPerRow, m_sampleRateT, m_sampleRateU, m_splinePoints, m_supportPoints, m_tMesh, m_xAverage, m_yAverage, m_zAverage, and WBSplineSurface::samplePoints().
Referenced by WMSplineSurface::moduleMain(), setSetSampleRate(), and setSupportPoints().
|
private |
Calculates the covariance matrix for a given number of points inspace.
points | vector of points |
Definition at line 55 of file WSurface.cpp.
References m_xAverage, m_yAverage, and m_zAverage.
Referenced by execute().
std::vector< WVector3d > WSurface::getSplinePoints | ( | ) |
Returns a copy of the spline point vector.
Definition at line 280 of file WSurface.cpp.
References m_splinePoints.
|
private |
Calculates numRows*numCols deBoor points from given input points.
givenPoints | the input points |
deBoorPoints | reference to the output vector |
numRows | number of points in first direction of spline surface |
numCols | number of points in second direction of spline surface |
Definition at line 94 of file WSurface.cpp.
References m_mu, and m_radius.
Referenced by execute().
std::shared_ptr< WTriangleMesh > WSurface::getTriangleMesh | ( | ) |
getter
Definition at line 300 of file WSurface.cpp.
References m_tMesh.
Referenced by WMSplineSurface::moduleMain().
void WSurface::setSetSampleRate | ( | float | r | ) |
SEts the sample rate for the splines.
r | the new sample rate |
Definition at line 285 of file WSurface.cpp.
References execute(), m_sampleRateT, and m_sampleRateU.
void WSurface::setSupportPoints | ( | std::vector< WVector3d > | supportPoints, |
bool | forceUpdate = false |
||
) |
sets the vector of support points the surface is calculated from
supportPoints | vector of support points |
forceUpdate | if true the surface will be updated with the new support points |
Definition at line 291 of file WSurface.cpp.
References execute(), and m_supportPoints.
Referenced by WMSplineSurface::moduleMain().
|
private |
parameter of local shepard with franke-little-weights
Definition at line 106 of file WSurface.h.
Referenced by getSplineSurfaceDeBoorPoints().
|
private |
number of of columns for deBoor grid
Definition at line 108 of file WSurface.h.
Referenced by execute().
|
private |
number of of rows for deBoor grid
Definition at line 107 of file WSurface.h.
Referenced by execute().
|
private |
|
private |
param for the algo
Definition at line 105 of file WSurface.h.
Referenced by getSplineSurfaceDeBoorPoints().
|
private |
|
private |
|
private |
sampling rate of spline in first direction
Definition at line 110 of file WSurface.h.
Referenced by execute(), and setSetSampleRate().
|
private |
sampling rate of spline in second direction
Definition at line 111 of file WSurface.h.
Referenced by execute(), and setSetSampleRate().
|
private |
stores the input points ????
Definition at line 118 of file WSurface.h.
Referenced by execute(), and getSplinePoints().
|
private |
stores the support points
Definition at line 116 of file WSurface.h.
Referenced by execute(), and setSupportPoints().
|
private |
Triangle mesh of the surface.
Definition at line 103 of file WSurface.h.
Referenced by execute(), and getTriangleMesh().
|
private |
global mean of x values for covariance matrix
Definition at line 112 of file WSurface.h.
Referenced by execute(), and getCovarianceMatrix().
|
private |
global mean of y values for covariance matrix
Definition at line 113 of file WSurface.h.
Referenced by execute(), and getCovarianceMatrix().
|
private |
global mean of z values for covariance matrix
Definition at line 114 of file WSurface.h.
Referenced by execute(), and getCovarianceMatrix().