vtkbone
vtkboneMaterialTable.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Copyright 2010-2016, Numerics88 Solutions Ltd.
4 http://www.numerics88.com/
5
6 Copyright (c) Eric Nodwell and Steven K. Boyd
7 See Copyright.txt for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12=========================================================================*/
13
34#ifndef __vtkboneMaterialTable_h
35#define __vtkboneMaterialTable_h
36
37#include "vtkDataObject.h"
38#include "vtkboneWin32Header.h"
39#include <map>
40#include <set>
41
42// Forward declarations
43class vtkboneMaterial;
45
46class VTKBONE_EXPORT vtkboneMaterialTable : public vtkDataObject
47{
48 public:
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
55
58
60
62 void AddMaterial(int index, vtkboneMaterial* material);
63 // The sole reason for the following overloaded method is that the Python
64 // wrapping in VTK (at least for version 6.3) fails to identify that subclasses
65 // of vtkboneMaterialArray are also subclasses of vtkboneMaterial.
66 void AddMaterial(int index, vtkboneMaterialArray* material)
67 { this->AddMaterial(index,(vtkboneMaterial*)material); }
69
73
76 void RemoveMaterial(int index);
77
79 void RemoveAll();
80
82 int GetIndex(const char* name);
83
85
87 vtkboneMaterial* GetMaterial(const char* name);
89
91
97 int index,
98 vtkboneMaterial*& material,
99 int& offset);
101
103
113
118
124
132
136
141
142 protected:
145
146 //BTX
147 typedef std::map<int,vtkboneMaterial*,std::less<int> > material_table_t;
149 material_table_t::iterator traversal_iterator;
150 std::set<vtkboneMaterial*> visited_materials;
152 //ETX
153
155
156 private:
157 vtkboneMaterialTable(const vtkboneMaterialTable&); // Not implemented.
158 void operator=(const vtkboneMaterialTable&); // Not implemented.
159};
160
161#endif
void operator=(const vtkObjectBase &)
An abstract base class for materials of materials of the same type.
Material Table finite element mesh.
static vtkboneMaterialTable * New()
vtkboneMaterial * GetMaterial(int index)
void AddMaterial(int index, vtkboneMaterialArray *material)
vtkboneMaterial * GetMaterialOrArray(int index)
std::map< int, vtkboneMaterial *, std::less< int > > material_table_t
material_table_t::iterator traversal_iterator
vtkboneMaterial * GetMaterial(const char *name)
vtkboneMaterial * GetCurrentMaterial()
void PrintSelf(ostream &os, vtkIndent indent) override
void GetMaterialOrArray(int index, vtkboneMaterial *&material, int &offset)
vtkboneMaterial * current_material
void RemoveMaterial(int index)
std::set< vtkboneMaterial * > visited_materials
int AppendMaterial(vtkboneMaterial *material)
void AddMaterial(int index, vtkboneMaterial *material)
int GetIndex(const char *name)
An abstract base class for materials used in finite element models.
index