VTK  9.2.5
vtkGenericAttribute.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkGenericAttribute.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=========================================================================*/
33#ifndef vtkGenericAttribute_h
34#define vtkGenericAttribute_h
35
36#include "vtkCommonDataModelModule.h" // For export macro
37#include "vtkObject.h"
38
42
43enum
44{
48};
49
50class VTKCOMMONDATAMODEL_EXPORT vtkGenericAttribute : public vtkObject
51{
52public:
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
60 virtual const char* GetName() = 0;
61
69 virtual int GetNumberOfComponents() = 0;
70
75 virtual int GetCentering() = 0;
76
85 virtual int GetType() = 0;
86
96 virtual int GetComponentType() = 0;
97
102 virtual vtkIdType GetSize() = 0;
103
107 virtual unsigned long GetActualMemorySize() = 0;
108
117 virtual double* GetRange(int component = 0) = 0;
118
125 virtual void GetRange(int component, double range[2]) = 0;
126
131 virtual double GetMaxNorm() = 0;
132
140 virtual double* GetTuple(vtkGenericAdaptorCell* c) = 0;
141
149 virtual void GetTuple(vtkGenericAdaptorCell* c, double* tuple) = 0;
150
158 virtual double* GetTuple(vtkGenericCellIterator* c) = 0;
159
167 virtual void GetTuple(vtkGenericCellIterator* c, double* tuple) = 0;
168
176 virtual double* GetTuple(vtkGenericPointIterator* p) = 0;
177
185 virtual void GetTuple(vtkGenericPointIterator* p, double* tuple) = 0;
186
195 virtual void GetComponent(int i, vtkGenericCellIterator* c, double* values) = 0;
196
203 virtual double GetComponent(int i, vtkGenericPointIterator* p) = 0;
204
210 virtual void DeepCopy(vtkGenericAttribute* other) = 0;
211
217 virtual void ShallowCopy(vtkGenericAttribute* other) = 0;
218
219protected:
222
223private:
225 void operator=(const vtkGenericAttribute&) = delete;
226};
227
228#endif
defines cell interface
abstract class defined API for attribute data
virtual void GetRange(int component, double range[2])=0
Range of the attribute component ‘component’.
virtual void GetTuple(vtkGenericPointIterator *p, double *tuple)=0
Put the value of the attribute at position ‘p’ into ‘tuple’.
virtual const char * GetName()=0
Name of the attribute.
virtual int GetNumberOfComponents()=0
Dimension of the attribute.
virtual void GetTuple(vtkGenericAdaptorCell *c, double *tuple)=0
Put attribute at all points of cell ‘c’ in ‘tuple’.
virtual double * GetTuple(vtkGenericCellIterator *c)=0
Attribute at all points of cell ‘c’.
virtual double * GetTuple(vtkGenericPointIterator *p)=0
Value of the attribute at position ‘p’.
virtual int GetCentering()=0
Is the attribute centered either on points, cells or boundaries?
~vtkGenericAttribute() override
virtual double * GetRange(int component=0)=0
Range of the attribute component ‘component’.
virtual unsigned long GetActualMemorySize()=0
Size in kibibytes (1024 bytes) taken by the attribute.
virtual double GetMaxNorm()=0
Return the maximum euclidean norm for the tuples.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int GetType()=0
Type of the attribute: scalar, vector, normal, texture coordinate, tensor.
virtual void GetComponent(int i, vtkGenericCellIterator *c, double *values)=0
Put component ‘i’ of the attribute at all points of cell ‘c’ in ‘values’.
virtual int GetComponentType()=0
Type of the components of the attribute: int, float, double.
virtual void DeepCopy(vtkGenericAttribute *other)=0
Recursive duplication of ‘other’ in ‘this’.
virtual void GetTuple(vtkGenericCellIterator *c, double *tuple)=0
Put attribute at all points of cell ‘c’ in ‘tuple’.
virtual double GetComponent(int i, vtkGenericPointIterator *p)=0
Value of the component ‘i’ of the attribute at position ‘p’.
virtual void ShallowCopy(vtkGenericAttribute *other)=0
Update ‘this’ using fields of ‘other’.
virtual double * GetTuple(vtkGenericAdaptorCell *c)=0
Attribute at all points of cell ‘c’.
virtual vtkIdType GetSize()=0
Number of tuples.
iterator used to traverse cells
iterator used to traverse points
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:63
@ vtkBoundaryCentered
@ vtkCellCentered
@ vtkPointCentered
int vtkIdType
Definition: vtkType.h:332