File: vtkHyperTreeGridGeometry.h

package info (click to toggle)
vtk9 9.5.2%2Bdfsg3-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 205,916 kB
  • sloc: cpp: 2,336,565; ansic: 327,116; python: 111,200; yacc: 4,104; java: 3,977; sh: 3,032; xml: 2,771; perl: 2,189; lex: 1,787; makefile: 178; javascript: 165; objc: 153; tcl: 59
file content (145 lines) | stat: -rw-r--r-- 4,295 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
// SPDX-License-Identifier: BSD-3-Clause
/**
 * @class   vtkHyperTreeGridGeometry
 * @brief   Generate vtkHyperTreeGrid external surface
 *
 * Generate the external surface (vtkPolyData) of the input 1D/2D/3D vtkHyperTreeGrid.
 * Delegate the work internally to different implementation classes depending on the
 * dimension of the input HyperTreeGrid.
 *
 * In the HTG case the surface generated is:
 * - 1D from a 1D HTG (segments)
 * - 2D from a 2D and 3D HTG (faces)
 *
 * This filters also take account of interfaces, that will generate "cuts"
 * over the generated segments/surfaces.
 *
 * @sa
 * vtkHyperTreeGrid vtkHyperTreeGridAlgorithm
 *
 * @par Thanks:
 * This class was written by Philippe Pebay, Joachim Pouderoux, and Charles Law, Kitware 2013
 * This class was modified by Guenole Harel and Jacques-Bernard Lekien, 2014
 * This class was rewritten by Philippe Pebay, 2016
 * This class was modified by Jacques-Bernard Lekien and Guenole Harel, 2018
 * This class has been corrected and extended by Jacques-Bernard Lekien to fully support
 * the subcell notion of onion skin interface (mixed cell), 2023
 * This work was supported by Commissariat a l'Energie Atomique
 * CEA, DAM, DIF, F-91297 Arpajon, France.
 */

#ifndef vtkHyperTreeGridGeometry_h
#define vtkHyperTreeGridGeometry_h

#include "vtkFiltersHyperTreeModule.h" // For export macro
#include "vtkHyperTreeGridAlgorithm.h"

VTK_ABI_NAMESPACE_BEGIN

class vtkCellArray;
class vtkDataObject;
class vtkHyperTreeGrid;
class vtkInformation;
class vtkPoints;

class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridGeometry : public vtkHyperTreeGridAlgorithm
{
public:
  static vtkHyperTreeGridGeometry* New();
  vtkTypeMacro(vtkHyperTreeGridGeometry, vtkHyperTreeGridAlgorithm);
  void PrintSelf(ostream& os, vtkIndent indent) override;

  ///@{
  /**
   * Turn on/off merging of coincident points using a locator.
   * Note that when merging is on, points with different point attributes
   * (e.g., normals) are merged, which may cause rendering artifacts.
   */
  vtkSetMacro(Merging, bool);
  vtkGetMacro(Merging, bool);
  ///@}

  ///@{
  /**
   * Set/Get for the PassThroughCellIds boolean.
   *
   * When set to true this boolean ensures an array named with whatever is
   * in `OriginalCellIdArrayName` gets created in the output holding the
   * original cell ids
   *
   * default is false
   */
  vtkSetMacro(PassThroughCellIds, bool);
  vtkGetMacro(PassThroughCellIds, bool);
  vtkBooleanMacro(PassThroughCellIds, bool);
  ///@}

  ///@{
  /**
   * Set/Get the OriginalCellIdArrayName string.
   *
   * When PassThroughCellIds is set to true, the name of the generated
   * array is whatever is set in this variable.
   *
   * default to vtkOriginalCellIds
   */
  vtkSetMacro(OriginalCellIdArrayName, std::string);
  vtkGetMacro(OriginalCellIdArrayName, std::string);
  ///@}

  ///@{
  /**
   * If false, only draw the interface (lines).
   * Otherwise, draw the full cell with interface (poly).
   *
   * default is true
   */
  vtkSetMacro(FillMaterial, bool);
  vtkGetMacro(FillMaterial, bool);
  vtkBooleanMacro(FillMaterial, bool);
  ///@}

protected:
  vtkHyperTreeGridGeometry() = default;
  ~vtkHyperTreeGridGeometry() override = default;

  /**
   * For this algorithm the output is a vtkPolyData instance
   */
  int FillOutputPortInformation(int, vtkInformation*) override;

  /**
   * Main routine to generate external boundary
   */
  int ProcessTrees(vtkHyperTreeGrid*, vtkDataObject*) override;

  /**
   * Boolean for passing input original cell ids to the output poly data
   *
   * default is false
   */
  bool PassThroughCellIds = false;

  /**
   * Name of the array holding original cell ids in output if PassThroughCellIds is true
   */
  std::string OriginalCellIdArrayName = "vtkOriginalCellIds";

  /**
   * If true, a vtkIncrementalPointLocator is used when inserting
   * new points to the output.
   *
   * XXX: Only used in the 3D case.
   */
  bool Merging = false;

private:
  vtkHyperTreeGridGeometry(const vtkHyperTreeGridGeometry&) = delete;
  void operator=(const vtkHyperTreeGridGeometry&) = delete;

  bool FillMaterial = true;
};

VTK_ABI_NAMESPACE_END
#endif /* vtkHyperTreeGridGeometry_h */