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 146 147
|
//=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
/**
* @class vtkDataSetRegionSurfaceFilter
* @brief Extract surface of materials.
*
* This filter extracts surfaces of materials such that a surface
* could have a material on each side of it. It also stores a
* mapping of the original cells and their sides back to the original grid
* so that we can output boundary information for those cells given
* only surfaces.
*/
#ifndef vtkDataSetRegionSurfaceFilter_h
#define vtkDataSetRegionSurfaceFilter_h
#include "vtkFiltersGeometryModule.h" // For export macro
#include "vtkDataSetSurfaceFilter.h"
class vtkCharArray;
class VTKFILTERSGEOMETRY_EXPORT vtkDataSetRegionSurfaceFilter : public vtkDataSetSurfaceFilter
{
public:
static vtkDataSetRegionSurfaceFilter* New();
vtkTypeMacro(vtkDataSetRegionSurfaceFilter, vtkDataSetSurfaceFilter);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
//@{
/**
* The name of the cell based array that we use to extract interfaces from
* Default is "Regions"
*/
vtkSetStringMacro(RegionArrayName);
vtkGetStringMacro(RegionArrayName);
//@}
int UnstructuredGridExecute(vtkDataSet *input,
vtkPolyData *output) VTK_OVERRIDE;
//make it clear we want all the recordOrigCellId signatures from our parent
using vtkDataSetSurfaceFilter::RecordOrigCellId;
//override one of the signatures
void RecordOrigCellId(vtkIdType newIndex, vtkFastGeomQuad *quad) VTK_OVERRIDE;
//@{
/**
* Whether to return single sided material interfaces or double sided
* Default is single
*/
vtkSetMacro(SingleSided, bool);
vtkGetMacro(SingleSided, bool);
//@}
//@{
/**
* The name of the field array that has characteristics of each material
* Default is "material_properties"
*/
vtkSetStringMacro(MaterialPropertiesName);
vtkGetStringMacro(MaterialPropertiesName);
//@}
//@{
/**
* The name of the field array that has material type identifiers in it
* Default is "material_ids"
*/
vtkSetStringMacro(MaterialIDsName);
vtkGetStringMacro(MaterialIDsName);
//@}
//@{
/**
* The name of the output field array that records parent materials of each interface
* Default is "material_ancestors"
*/
vtkSetStringMacro(MaterialPIDsName);
vtkGetStringMacro(MaterialPIDsName);
//@}
//@{
/**
* The name of the field array that has material interface type identifiers in it
* Default is "interface_ids"
*/
vtkSetStringMacro(InterfaceIDsName);
vtkGetStringMacro(InterfaceIDsName);
//@}
protected:
vtkDataSetRegionSurfaceFilter();
~vtkDataSetRegionSurfaceFilter() VTK_OVERRIDE;
int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
/// Implementation of the algorithm.
int RequestData(vtkInformation *,
vtkInformationVector **,
vtkInformationVector *) VTK_OVERRIDE;
virtual void InsertQuadInHash(vtkIdType a, vtkIdType b, vtkIdType c,
vtkIdType d, vtkIdType sourceId, vtkIdType faceId);
void InsertQuadInHash(vtkIdType a, vtkIdType b, vtkIdType c,
vtkIdType d, vtkIdType sourceId) VTK_OVERRIDE
{
this->InsertQuadInHash(a,b,c,d,sourceId, -1); //for -Woverloaded-virtual comp warning
}
void InsertTriInHash(vtkIdType a, vtkIdType b, vtkIdType c,
vtkIdType sourceId, vtkIdType faceId) VTK_OVERRIDE;
virtual void InsertTriInHash(vtkIdType a, vtkIdType b, vtkIdType c,
vtkIdType sourceId)
{
this->InsertTriInHash(a,b,c,sourceId, -1); //for -Woverloaded-virtual comp warning
}
virtual vtkFastGeomQuad *GetNextVisibleQuadFromHash();
private:
vtkDataSetRegionSurfaceFilter(const vtkDataSetRegionSurfaceFilter&) VTK_DELETE_FUNCTION;
void operator=(const vtkDataSetRegionSurfaceFilter&) VTK_DELETE_FUNCTION;
char *RegionArrayName;
vtkIntArray *RegionArray;
vtkIdTypeArray *OrigCellIds;
vtkCharArray *CellFaceIds;
bool SingleSided;
char *MaterialPropertiesName;
char *MaterialIDsName;
char *MaterialPIDsName;
char *InterfaceIDsName;
class Internals;
Internals *Internal;
};
#endif
|