VTK
dox
Common
DataModel
vtkAMRDataInternals.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkAMRDataInternals.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
=========================================================================*/
26
#ifndef vtkAMRDataInternals_h
27
#define vtkAMRDataInternals_h
28
29
#include "vtkCommonDataModelModule.h"
// For export macro
30
#include "
vtkObject.h
"
31
#include "
vtkSmartPointer.h
"
//for storing smart pointers to blocks
32
#include <vector>
//for storing blocks
33
34
class
vtkUniformGrid
;
35
class
VTKCOMMONDATAMODEL_EXPORT
vtkAMRDataInternals
:
public
vtkObject
36
{
37
public
:
38
struct
Block
39
{
40
vtkSmartPointer<vtkUniformGrid>
Grid
;
41
unsigned
int
Index
;
42
Block
(
unsigned
int
i,
vtkUniformGrid
* g);
43
};
44
typedef
std::vector<vtkAMRDataInternals::Block>
BlockList
;
45
46
static
vtkAMRDataInternals
*
New
();
47
vtkTypeMacro(
vtkAMRDataInternals
,
vtkObject
);
48
49
void
Initialize();
50
void
PrintSelf
(ostream& os,
vtkIndent
indent) VTK_OVERRIDE;
51
52
void
Insert(
unsigned
int
index
,
vtkUniformGrid
* grid);
53
vtkUniformGrid
* GetDataSet(
unsigned
int
compositeIndex);
54
55
virtual
void
ShallowCopy(
vtkObject
*src);
56
57
bool
Empty
()
const
{
return
this->GetNumberOfBlocks()==0;}
58
59
public
:
60
unsigned
int
GetNumberOfBlocks
()
const
{
return
static_cast<
unsigned
int
>
(this->Blocks.size());}
61
const
Block
&
GetBlock
(
unsigned
int
i) {
return
this->Blocks[i];}
62
const
BlockList
&
GetAllBlocks
()
const
{
return
this->Blocks;}
63
64
protected
:
65
66
vtkAMRDataInternals
();
67
~
vtkAMRDataInternals
() VTK_OVERRIDE;
68
69
void
GenerateIndex(
bool
force=false);
70
71
std::
vector
<
Block
> Blocks;
72
std::
vector
<
int
>* InternalIndex;
//map from the composite index to internal index
73
bool
GetInternalIndex(
unsigned
int
compositeIndex,
unsigned
int
& internalIndex);
74
75
private:
76
vtkAMRDataInternals
(const
vtkAMRDataInternals
&) VTK_DELETE_FUNCTION;
77
void
operator=(const
vtkAMRDataInternals
&) VTK_DELETE_FUNCTION;
78
};
79
80
#endif
vtkX3D::vector
@ vector
Definition:
vtkX3D.h:237
vtkAMRDataInternals::Block::Grid
vtkSmartPointer< vtkUniformGrid > Grid
Definition:
vtkAMRDataInternals.h:40
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkUniformGrid
image data with blanking
Definition:
vtkUniformGrid.h:40
vtkAMRDataInternals::Block
Definition:
vtkAMRDataInternals.h:38
vtkSmartPointer< vtkUniformGrid >
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
vtkAMRDataInternals::GetBlock
const Block & GetBlock(unsigned int i)
Definition:
vtkAMRDataInternals.h:61
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkAMRDataInternals::GetNumberOfBlocks
unsigned int GetNumberOfBlocks() const
Definition:
vtkAMRDataInternals.h:60
vtkSmartPointer.h
vtkAMRDataInternals::Block::Index
unsigned int Index
Definition:
vtkAMRDataInternals.h:41
vtkAMRDataInternals::Empty
bool Empty() const
Definition:
vtkAMRDataInternals.h:57
vtkAMRDataInternals::BlockList
std::vector< vtkAMRDataInternals::Block > BlockList
Definition:
vtkAMRDataInternals.h:44
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAMRDataInternals::GetAllBlocks
const BlockList & GetAllBlocks() const
Definition:
vtkAMRDataInternals.h:62
vtkObject.h
Block
struct tagBlock Block
vtkX3D::index
@ index
Definition:
vtkX3D.h:246
vtkAMRDataInternals
container of vtkUniformGrid for an AMR data set
Definition:
vtkAMRDataInternals.h:35
Generated by
1.8.17