OpenWalnut  1.5.0dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WSurface Class Reference

Constructs a triangle mesh representation of a spline surface from a given number of input points. More...

#include <WSurface.h>

+ Collaboration diagram for WSurface:

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< WVector3dgetSplinePoints ()
 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< WTriangleMeshgetTriangleMesh ()
 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< WTriangleMeshm_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< WVector3dm_supportPoints
 stores the support points More...
 
std::vector< WVector3dm_splinePoints
 stores the input points ???? More...
 
int m_renderpointsPerCol
 resolution of the output mesh More...
 
int m_renderpointsPerRow
 resolution of the output mesh More...
 

Detailed Description

Constructs a triangle mesh representation of a spline surface from a given number of input points.

Definition at line 39 of file WSurface.h.

Constructor & Destructor Documentation

◆ WSurface()

WSurface::WSurface ( )

Constructs new WSurface.

Definition at line 36 of file WSurface.cpp.

◆ ~WSurface()

WSurface::~WSurface ( )

Destructs this WSurface.

Definition at line 51 of file WSurface.cpp.

Member Function Documentation

◆ execute()

void WSurface::execute ( )

◆ getCovarianceMatrix()

WTensorSym< 2, 3, double > WSurface::getCovarianceMatrix ( std::vector< WVector3d points)
private

Calculates the covariance matrix for a given number of points inspace.

Parameters
pointsvector of points
Returns
the matrix

Definition at line 55 of file WSurface.cpp.

References m_xAverage, m_yAverage, and m_zAverage.

Referenced by execute().

+ Here is the caller graph for this function:

◆ getSplinePoints()

std::vector< WVector3d > WSurface::getSplinePoints ( )

Returns a copy of the spline point vector.

Returns
points

Definition at line 280 of file WSurface.cpp.

References m_splinePoints.

◆ getSplineSurfaceDeBoorPoints()

void WSurface::getSplineSurfaceDeBoorPoints ( std::vector< WVector3d > &  givenPoints,
std::vector< WVector3d > &  deBoorPoints,
int  numRows,
int  numCols 
)
private

Calculates numRows*numCols deBoor points from given input points.

Parameters
givenPointsthe input points
deBoorPointsreference to the output vector
numRowsnumber of points in first direction of spline surface
numColsnumber 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().

+ Here is the caller graph for this function:

◆ getTriangleMesh()

std::shared_ptr< WTriangleMesh > WSurface::getTriangleMesh ( )

getter

Returns
the triangle mesh representing the surface

Definition at line 300 of file WSurface.cpp.

References m_tMesh.

Referenced by WMSplineSurface::moduleMain().

+ Here is the caller graph for this function:

◆ setSetSampleRate()

void WSurface::setSetSampleRate ( float  r)

SEts the sample rate for the splines.

Parameters
rthe new sample rate

Definition at line 285 of file WSurface.cpp.

References execute(), m_sampleRateT, and m_sampleRateU.

+ Here is the call graph for this function:

◆ setSupportPoints()

void WSurface::setSupportPoints ( std::vector< WVector3d supportPoints,
bool  forceUpdate = false 
)

sets the vector of support points the surface is calculated from

Parameters
supportPointsvector of support points
forceUpdateif 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_mu

double WSurface::m_mu
private

parameter of local shepard with franke-little-weights

Definition at line 106 of file WSurface.h.

Referenced by getSplineSurfaceDeBoorPoints().

◆ m_numDeBoorCols

int WSurface::m_numDeBoorCols
private

number of of columns for deBoor grid

Definition at line 108 of file WSurface.h.

Referenced by execute().

◆ m_numDeBoorRows

int WSurface::m_numDeBoorRows
private

number of of rows for deBoor grid

Definition at line 107 of file WSurface.h.

Referenced by execute().

◆ m_order

int WSurface::m_order
private

order the splines

Definition at line 109 of file WSurface.h.

Referenced by execute().

◆ m_radius

double WSurface::m_radius
private

param for the algo

Definition at line 105 of file WSurface.h.

Referenced by getSplineSurfaceDeBoorPoints().

◆ m_renderpointsPerCol

int WSurface::m_renderpointsPerCol
private

resolution of the output mesh

Definition at line 120 of file WSurface.h.

Referenced by execute().

◆ m_renderpointsPerRow

int WSurface::m_renderpointsPerRow
private

resolution of the output mesh

Definition at line 121 of file WSurface.h.

Referenced by execute().

◆ m_sampleRateT

double WSurface::m_sampleRateT
private

sampling rate of spline in first direction

Definition at line 110 of file WSurface.h.

Referenced by execute(), and setSetSampleRate().

◆ m_sampleRateU

double WSurface::m_sampleRateU
private

sampling rate of spline in second direction

Definition at line 111 of file WSurface.h.

Referenced by execute(), and setSetSampleRate().

◆ m_splinePoints

std::vector< WVector3d > WSurface::m_splinePoints
private

stores the input points ????

Definition at line 118 of file WSurface.h.

Referenced by execute(), and getSplinePoints().

◆ m_supportPoints

std::vector< WVector3d > WSurface::m_supportPoints
private

stores the support points

Definition at line 116 of file WSurface.h.

Referenced by execute(), and setSupportPoints().

◆ m_tMesh

std::shared_ptr< WTriangleMesh > WSurface::m_tMesh
private

Triangle mesh of the surface.

Definition at line 103 of file WSurface.h.

Referenced by execute(), and getTriangleMesh().

◆ m_xAverage

double WSurface::m_xAverage
private

global mean of x values for covariance matrix

Definition at line 112 of file WSurface.h.

Referenced by execute(), and getCovarianceMatrix().

◆ m_yAverage

double WSurface::m_yAverage
private

global mean of y values for covariance matrix

Definition at line 113 of file WSurface.h.

Referenced by execute(), and getCovarianceMatrix().

◆ m_zAverage

double WSurface::m_zAverage
private

global mean of z values for covariance matrix

Definition at line 114 of file WSurface.h.

Referenced by execute(), and getCovarianceMatrix().


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