-
Notifications
You must be signed in to change notification settings - Fork 0
/
PolyDataCellCopier.h
79 lines (67 loc) · 1.58 KB
/
PolyDataCellCopier.h
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
/*
____ _ __ ____ __ ____
/ __/___(_) / ___ ____/ __ \__ _____ ___ / /_ / _/__ ____
_\ \/ __/ / _ \/ -_) __/ /_/ / // / -_|_-</ __/ _/ // _ \/ __/
/___/\__/_/_.__/\__/_/ \___\_\_,_/\__/___/\__/ /___/_//_/\__(_)
Copyright 2012 SciberQuest Inc.
*/
#ifndef __PolyDataCellCopier_h
#define __PolyDataCellCopier_h
#include "CellCopier.h"
#include "IdBlock.h"
class vtkCellArray;
class vtkFloatArray;
/// Copy geometry and data between unstructured datasets.
/**
Copies specific cells and associated geometry from/to a
pair of unstructured grid datasets.
*/
class PolyDataCellCopier : public CellCopier
{
public:
PolyDataCellCopier()
:
SourcePts(0),
SourceCells(0),
OutPts(0),
OutCells(0),
CellType(NONE)
{ }
virtual ~PolyDataCellCopier();
/**
Initialize the object with an input and an output. This
will set up array copiers. Derived classes must make sure
this method gets called if they override it.
*/
virtual void Initialize(vtkDataSet *in, vtkDataSet *out);
/**
Free resources used by the object.
*/
virtual void Clear();
/**
Copy a contiguous block of cells and their associated point
and cell data from iniput to output.
*/
virtual int Copy(IdBlock &block);
using CellCopier::Copy;
private:
void ClearSource();
void ClearOutput();
private:
// source
vtkFloatArray *SourcePts;
vtkCellArray *SourceCells;
// output
vtkFloatArray *OutPts;
vtkCellArray *OutCells;
// cell type
enum {
NONE=0,
POLY=1,
VERT=2,
STRIP=3,
LINE=4
};
int CellType;
};
#endif