VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Parallel
vtkExtractUserDefinedPiece.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkExtractUserDefinedPiece.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
15
/*----------------------------------------------------------------------------
16
Copyright (c) Sandia Corporation
17
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18
----------------------------------------------------------------------------*/
19
35
#ifndef __vtkExtractUserDefinedPiece_h
36
#define __vtkExtractUserDefinedPiece_h
37
38
#include "
vtkExtractUnstructuredGridPiece.h
"
39
40
class
VTK_PARALLEL_EXPORT
vtkExtractUserDefinedPiece
:
public
vtkExtractUnstructuredGridPiece
41
{
42
public
:
43
vtkTypeMacro(
vtkExtractUserDefinedPiece
,
vtkExtractUnstructuredGridPiece
);
44
static
vtkExtractUserDefinedPiece
*
New
();
45
virtual
void
PrintSelf
(ostream& os,
vtkIndent
indent);
46
47
//BTX
48
typedef
int (*UserDefFunc)(
vtkIdType
cellID,
vtkUnstructuredGrid
*grid,
void
*constantData);
49
//ETX
50
51
// Set the function used to identify the piece. The function should
52
// return 1 if the cell is in the piece, and 0 otherwise.
53
void
SetPieceFunction
(UserDefFunc func) {this->InPiece = func; this->
Modified
();}
54
55
// Set constant data to be used by the piece identifying function.
56
void
SetConstantData(
void
*
data
,
int
len);
57
58
// Get constant data to be used by the piece identifying function.
59
// Return the length of the data buffer.
60
int
GetConstantData(
void
**
data
);
61
62
// The function should return 1 if the cell
63
// is in the piece, and 0 otherwise.
64
65
protected
:
66
67
vtkExtractUserDefinedPiece
();
68
~
vtkExtractUserDefinedPiece
();
69
70
virtual
int
RequestData
(
vtkInformation
*,
vtkInformationVector
**,
vtkInformationVector
*);
71
72
void
ComputeCellTagsWithFunction(
vtkIntArray
*tags,
vtkIdList
*pointOwnership,
73
vtkUnstructuredGrid
*input);
74
75
private
:
76
vtkExtractUserDefinedPiece
(
const
vtkExtractUserDefinedPiece
&);
// Not implemented
77
void
operator=(
const
vtkExtractUserDefinedPiece
&);
// Not implemented
78
79
void
*ConstantData;
80
int
ConstantDataLen;
81
82
UserDefFunc InPiece;
83
};
84
#endif
Generated on Sun Sep 9 2012 13:03:43 for VTK by
1.8.1.2