- Main Page
- Classes
- Files

- File List

# D:/work/as_smooth/MeshSmoothingTools/include/features/CVertexInfoGarland.h

    00001 #ifndef CVERTEXINFOGARLAND_H
    00002 #define CVERTEXINFOGARLAND_H
    00003
    00004 #include <features/CVertexInfoMV.h>
    00005 #include <features/CVertexInfoGenerator.h>
    00006
    00007 //==============================================================================
    00013 class CVertexInfoGarland : public CVertexInfoMV
    00014 {
    00015     public :
    00016
    00018             CVertexInfoGarland( vctl::MCVertex * vertex );
    00019
    00021             virtual ~CVertexInfoGarland();
    00022
    00023 };
    00024
    00025 //==============================================================================
    00030 class CVertexInfoGeneratorGarland : public CVertexInfoGenerator
    00031 {
    00032     public :
    00033
    00035             MDS_SHAREDPTR( CVertexInfoGeneratorGarland );
    00036
    00037     public :
    00038
    00040             enum
    00041             {
    00042                 FROM_VERTICES   =   0x1,        // from neighbourhood vertices normals
    00043                 FROM_TRIANGLES  =   0x2,        // from neighbourhood triangles normals ( default )
    00044             };
    00045
    00047             enum
    00048             {
    00049                 TYPE_GARLAND    =   0x1,        // zero-mean covariance matrix
    00050                 TYPE_COVARIANCE =   0x2,        // standard covariance matrix against average normal
    00051             };
    00052
    00053     protected :
    00054
    00056             int                 iSize;
    00057
    00059             unsigned    iType;
    00060
    00062             unsigned    iSource;
    00063
    00065             bool        bInvert, bNormalize, bTrim, bCont;
    00066
    00067     public :
    00068
    00070             CVertexInfoGeneratorGarland( unsigned type = TYPE_GARLAND, unsigned source = FROM_TRIANGLES, int iSize = 1, bool cont = false );
    00071
    00073             virtual ~CVertexInfoGeneratorGarland();
    00074
    00076             bool    operator!= ( const CVertexInfoGeneratorGarland & g );
    00077
    00079             virtual bool generate( CSmoothingMesh * mesh );
    00080
    00082             virtual bool init();
    00083
    00085             void    xMatrixVertCov( vctl::MCVertex * vertex, CSmoothingMesh * mesh, mds::math::CDMatrix & X );
    00086
    00088             void    xMatrixVertGar( vctl::MCVertex * vertex, CSmoothingMesh * mesh, mds::math::CDMatrix & X );
    00089
    00091             void    xMatrixTriCov( vctl::MCVertex * vertex, CSmoothingMesh * mesh, mds::math::CDMatrix & X );
    00092
    00094             void    xMatrixTriGar( vctl::MCVertex * vertex, CSmoothingMesh * mesh, mds::math::CDMatrix & X );
    00095
    00097             virtual void normalize();
    00098
    00100             void    setSize( int size )
    00101             {
    00102                 iSize = size;
    00103             }
    00104
    00106             int     getSize()
    00107             {
    00108                 return iSize;
    00109             }
    00110
    00112             void    setType( unsigned type )
    00113             {
    00114                 iType = type;
    00115             }
    00116
    00118             unsigned    getType()
    00119             {
    00120                 return iType;
    00121             }
    00122
    00124             void    setSource( unsigned source )
    00125             {
    00126                 iSource = source;
    00127             }
    00128
    00130             unsigned    getSource()
    00131             {
    00132                 return iSource;
    00133             }
    00134
    00136             bool        setCont( bool cont )
    00137             {
    00138                 bCont = cont;
    00139             }
    00140
    00141
    00142     public :
    00143
    00145             static CVertexInfoGenerator * create();
    00146
    00147 };
    00148
    00149 #endif // CVERTEXINFOGARLAND_H

All Classes Functions Variables