VTK  9.3.20240328
vtkGenericAttribute.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkGenericAttribute_h
22 #define vtkGenericAttribute_h
23 
24 #include "vtkCommonDataModelModule.h" // For export macro
25 #include "vtkObject.h"
26 
27 VTK_ABI_NAMESPACE_BEGIN
31 
32 enum
33 {
37 };
38 
39 class VTKCOMMONDATAMODEL_EXPORT vtkGenericAttribute : public vtkObject
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
49  virtual const char* GetName() = 0;
50 
58  virtual int GetNumberOfComponents() = 0;
59 
64  virtual int GetCentering() = 0;
65 
74  virtual int GetType() = 0;
75 
85  virtual int GetComponentType() = 0;
86 
91  virtual vtkIdType GetSize() = 0;
92 
96  virtual unsigned long GetActualMemorySize() = 0;
97 
106  virtual double* GetRange(int component = 0) = 0;
107 
114  virtual void GetRange(int component, double range[2]) = 0;
115 
120  virtual double GetMaxNorm() = 0;
121 
129  virtual double* GetTuple(vtkGenericAdaptorCell* c) = 0;
130 
138  virtual void GetTuple(vtkGenericAdaptorCell* c, double* tuple) = 0;
139 
147  virtual double* GetTuple(vtkGenericCellIterator* c) = 0;
148 
156  virtual void GetTuple(vtkGenericCellIterator* c, double* tuple) = 0;
157 
165  virtual double* GetTuple(vtkGenericPointIterator* p) = 0;
166 
174  virtual void GetTuple(vtkGenericPointIterator* p, double* tuple) = 0;
175 
184  virtual void GetComponent(int i, vtkGenericCellIterator* c, double* values) = 0;
185 
192  virtual double GetComponent(int i, vtkGenericPointIterator* p) = 0;
193 
199  virtual void DeepCopy(vtkGenericAttribute* other) = 0;
200 
206  virtual void ShallowCopy(vtkGenericAttribute* other) = 0;
207 
208 protected:
211 
212 private:
213  vtkGenericAttribute(const vtkGenericAttribute&) = delete;
214  void operator=(const vtkGenericAttribute&) = delete;
215 };
216 
217 VTK_ABI_NAMESPACE_END
218 #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 const char * GetName()=0
Name of the attribute.
virtual void GetTuple(vtkGenericPointIterator *p, double *tuple)=0
Put the value of the attribute at position ‘p’ into ‘tuple’.
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(vtkGenericPointIterator *p)=0
Value of the attribute at position ‘p’.
virtual double * GetRange(int component=0)=0
Range of the attribute component ‘component’.
virtual int GetCentering()=0
Is the attribute centered either on points, cells or boundaries?
~vtkGenericAttribute() override
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 double * GetTuple(vtkGenericCellIterator *c)=0
Attribute at all points of cell ‘c’.
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 double * GetTuple(vtkGenericAdaptorCell *c)=0
Attribute at all points of cell ‘c’.
virtual void ShallowCopy(vtkGenericAttribute *other)=0
Update ‘this’ using fields of ‘other’.
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:108
abstract base class for most VTK objects
Definition: vtkObject.h:161
@ component
Definition: vtkX3D.h:175
@ range
Definition: vtkX3D.h:238
@ vtkBoundaryCentered
@ vtkCellCentered
@ vtkPointCentered
int vtkIdType
Definition: vtkType.h:315