VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
vtkXMLHyperOctreeReader.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkXMLHyperOctreeReader.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
=========================================================================*/
34
#ifndef __vtkXMLHyperOctreeReader_h
35
#define __vtkXMLHyperOctreeReader_h
36
37
#include "
vtkXMLDataReader.h
"
38
39
class
vtkHyperOctree
;
40
class
vtkHyperOctreeCursor
;
41
class
vtkIntArray
;
42
43
class
VTK_IO_EXPORT
vtkXMLHyperOctreeReader
:
public
vtkXMLDataReader
44
{
45
public
:
46
vtkTypeMacro(
vtkXMLHyperOctreeReader
,
vtkXMLDataReader
);
47
void
PrintSelf
(ostream& os,
vtkIndent
indent);
48
static
vtkXMLHyperOctreeReader
*
New
();
49
51
52
vtkHyperOctree
*GetOutput();
53
vtkHyperOctree
*GetOutput(
int
idx);
55
56
protected
:
57
vtkXMLHyperOctreeReader
();
58
~
vtkXMLHyperOctreeReader
();
59
60
const
char
*
GetDataSetName
();
61
62
// Setup the output with no data available. Used in error cases.
63
void
SetupEmptyOutput
();
64
65
// Declare that this reader produces HyperOctrees
66
virtual
int
FillOutputPortInformation
(
int
,
vtkInformation
*);
67
68
//These defer to the HyperOctree output.
69
vtkIdType
GetNumberOfPoints
();
70
vtkIdType
GetNumberOfCells
();
71
72
// Overriden here to do allocation.
73
virtual
int
ReadArrayForPoints
(
vtkXMLDataElement
* da,
74
vtkAbstractArray
* outArray);
75
virtual
int
ReadArrayForCells
(
vtkXMLDataElement
* da,
76
vtkAbstractArray
* outArray);
77
78
79
80
// The most important stuff is here.
81
// Read the rest of the file and create the HyperOctree.
82
void
ReadXMLData
();
83
84
// Recover the structure of the HyperOctree, used by ReadXMLData.
85
void
ReadTopology(
vtkXMLDataElement
*elem);
86
87
// Used by ReadTopology to recusively build the tree, one cell at a time.
88
int
BuildNextCell(
vtkIntArray
*,
vtkHyperOctreeCursor
*,
int
);
89
90
//Helper for BuildNextCell
91
int
ArrayIndex
;
92
93
private
:
94
vtkXMLHyperOctreeReader
(
const
vtkXMLHyperOctreeReader
&);
// Not implemented.
95
void
operator=(
const
vtkXMLHyperOctreeReader
&);
// Not implemented.
96
};
97
98
#endif
Generated on Sun Sep 9 2012 13:03:42 for VTK by
1.8.1.2