00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef NURBS_FITTING_PATCH_TDM_H
00039 #define NURBS_FITTING_PATCH_TDM_H
00040
00041 #include <pcl/surface/on_nurbs/fitting_surface_pdm.h>
00042
00043 namespace pcl
00044 {
00045 namespace on_nurbs
00046 {
00051 class FittingSurfaceTDM : public FittingSurface
00052 {
00053 public:
00054
00056 struct ParameterTDM : public FittingSurface::Parameter
00057 {
00058 double interior_tangent_weight;
00059 double boundary_tangent_weight;
00060
00061 ParameterTDM (double intW = 1.0, double intS = 0.000001, double intR = 0.0, double intTW = 0.1,
00062 double bndW = 1.0, double bndS = 0.000001, double bndR = 0.0, double bndTW = 0.1,
00063 unsigned regU = 0, unsigned regV = 0) :
00064 Parameter (intW, intS, intR, bndW, bndS, bndR, regU, regV), interior_tangent_weight (intTW),
00065 boundary_tangent_weight (bndTW)
00066 {
00067 }
00068 };
00069
00073 FittingSurfaceTDM (NurbsDataSurface *data, const ON_NurbsSurface &ns);
00074
00079 FittingSurfaceTDM (int order, NurbsDataSurface *data, Eigen::Vector3d z = Eigen::Vector3d (0.0, 0.0, 1.0));
00080
00084 virtual void
00085 assemble (ParameterTDM param = ParameterTDM ());
00086
00089 virtual void
00090 solve (double damp = 1.0);
00091
00094 virtual void
00095 updateSurf (double damp);
00096
00097 protected:
00098
00100 virtual void
00101 assembleInterior (double wInt, double wTangent, unsigned &row);
00102
00104 virtual void
00105 assembleBoundary (double wBnd, double wTangent, unsigned &row);
00106
00108 virtual void
00109 addPointConstraint (const Eigen::Vector2d ¶ms, const Eigen::Vector3d &point, const Eigen::Vector3d &normal,
00110 const Eigen::Vector3d &tu, const Eigen::Vector3d &tv, double tangent_weight, double weight,
00111 unsigned &row);
00112
00114 virtual void
00115 addCageInteriorRegularisation (double weight, unsigned &row);
00116
00118 virtual void
00119 addCageBoundaryRegularisation (double weight, int side, unsigned &row);
00120
00122 virtual void
00123 addCageCornerRegularisation (double weight, unsigned &row);
00124
00125 virtual void
00126 addInteriorRegularisation (int, int, int, double, unsigned &)
00127 {
00128 }
00129 virtual void
00130 addBoundaryRegularisation (int, int, int, double, unsigned &)
00131 {
00132 }
00133 };
00134
00135 }
00136 }
00137
00138 #endif