MSDM
 All Classes Namespaces Files Functions Variables Typedefs Pages
Functions
CGAL_MSDM.h File Reference

Declaration of the the gateway functions between MATLAB and C++. More...

#include "Header.h"
#include "MatlabPolyhedron.h"
#include "normal_cycle.h"
#include "Distance3D.h"

Go to the source code of this file.

Functions

void init_MSDM_options (MSDM_options &options)
 Initialize the various options of the MSDM estimation. More...
 
void parse_MSDM_options (const mxArray *MATLAB_MSDM_options, MSDM_options &options)
 Parse MATLAB structure options and accordingly modify the MSDM option structure previously default intialized. More...
 
void mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
 Standard gateway between MATLAB and C++. More...
 
double compute_MSDM (Polyhedron &p1, Polyhedron &p2, const MSDM_options &options, std::vector< double > &local_MSDM)
 Main computation procedure to estimate the MSDM between 2 meshes. More...
 

Detailed Description

Declaration of the the gateway functions between MATLAB and C++.

Author
Guillaume Lavoué, Xavier Rolland-Nevière

Function Documentation

double compute_MSDM ( Polyhedron p1,
Polyhedron p2,
const MSDM_options options,
std::vector< double > &  local_MSDM 
)

Main computation procedure to estimate the MSDM between 2 meshes.

Parameters
p1Original polyhedron
p2Distorted polyhedron
optionsParameter settings
[out]local_MSDMvector of local MSDM value estimated at every vertex location

See the MSDM paper for more details on the steps of the procedure.

void init_MSDM_options ( MSDM_options options)

Initialize the various options of the MSDM estimation.

Parameters
optionsoptions of the MSDM whose values are initialized to the defaults

Default values are indicated in the documentation on MSDM_options.

void mexFunction ( int  nlhs,
mxArray *  plhs[],
int  nrhs,
const mxArray *  prhs[] 
)

Standard gateway between MATLAB and C++.

Parameters
*prhs[]Pointer to right-hand side array of matrices in MATLAB (argument to the mex library)
nrhsSize of the prhs[] array
*plhs[]Pointer to left-hand side array of matrices in MATLAB (output to the mex library)
nlhsSize of the plhs[] array
Author
Xavier Rolland-Nevière

prhs[0] is a 3 by number-of-vertices MATLAB matrix of vertex locations and prhs[1] is a 3 by number-of-facet MATLAB matrix linking vertices to form triangle facets. prhs[2] and prhs[3] are the corresponding matrices for the distorted version of the mesh. prhs[4] is a scalar indicating the radius of the search. prhs[5] is optional and represents a MATLAB matrix with an option structure. Its field are detailed in the MSDM_option structure.

Prerequisite: the MSDM only works for polyhedron sharing the same connectivity, i.e. prhs[1] and prhs[3] shoud be identical.

void parse_MSDM_options ( const mxArray *  MATLAB_MSDM_options,
MSDM_options options 
)

Parse MATLAB structure options and accordingly modify the MSDM option structure previously default intialized.

Parameters
MATLAB_MSDM_optionsMSDM option structure (MATLAB style) that may be only partially filled
optionsMSDM option structure (C style)