VMTK
vtkvmtkNonManifoldSteepestDescent.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkNonManifoldSteepestDescent.h,v $
5 Language: C++
6 
7  Copyright (c) Luca Antiga, David Steinman. All rights reserved.
8  See LICENSE file for details.
9 
10  Portions of this code are covered under the VTK copyright.
11  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
12  for details.
13 
14  This software is distributed WITHOUT ANY WARRANTY; without even
15  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16  PURPOSE. See the above copyright notices for more information.
17 
18 =========================================================================*/
31 #ifndef __vtkvmtkNonManifoldSteepestDescent_h
32 #define __vtkvmtkNonManifoldSteepestDescent_h
33 
34 #include "vtkPolyDataAlgorithm.h"
35 #include "vtkDataArray.h"
36 //#include "vtkvmtkComputationalGeometryWin32Header.h"
37 #include "vtkvmtkWin32Header.h"
38 
39 #define VTK_VMTK_DOWNWARD 0
40 #define VTK_VMTK_UPWARD 1
41 
42 class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkNonManifoldSteepestDescent : public vtkPolyDataAlgorithm
43 {
44  public:
45  vtkTypeMacro(vtkvmtkNonManifoldSteepestDescent,vtkPolyDataAlgorithm);
46  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47 
49 
51 
53  vtkSetStringMacro(DescentArrayName);
54  vtkGetStringMacro(DescentArrayName);
56 
57  vtkSetMacro(Direction,int);
58  vtkGetMacro(Direction,int);
60  {this->SetDirection(VTK_VMTK_DOWNWARD); }
62  {this->SetDirection(VTK_VMTK_UPWARD); }
63 
64  protected:
67 
68  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
69 
71 
75  double GetSteepestDescent(vtkPolyData* input, vtkIdType* edge, double s, vtkIdType* steepestDescentEdge, double &steepestDescentS);
76  double GetSteepestDescentInCell(vtkPolyData* input, vtkIdType cellId, vtkIdType* edge, double s, vtkIdType* steepestDescentEdge, double &steepestDescentS, double &steepestDescentLength);
78 
79  vtkDataArray* DescentArray;
81 
83  int Direction;
84 
85  private:
87  void operator=(const vtkvmtkNonManifoldSteepestDescent&); // Not implemented.
88 };
89 
90 #endif
91 
#define VTK_VMTK_DOWNWARD
Abstract class for steepest descent on a polygonal non-manifold.