VTK
vtkBridgeAttribute.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBridgeAttribute.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 =========================================================================*/
27 #ifndef vtkBridgeAttribute_h
28 #define vtkBridgeAttribute_h
29 
30 #include "vtkBridgeExport.h" //for module export macro
31 #include "vtkGenericAttribute.h"
32 
33 class vtkPointData;
34 class vtkCellData;
36 
38 {
39  public:
40  static vtkBridgeAttribute *New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
46  const char *GetName();
47 
51 
55  int GetCentering();
56 
63  int GetType();
64 
72  int GetComponentType();
73 
76 
78  unsigned long GetActualMemorySize();
79 
84  double *GetRange(int component);
85 
87 
89  void GetRange(int component,
90  double range[2]);
92 
95  double GetMaxNorm();
96 
101  virtual double *GetTuple(vtkGenericAdaptorCell *c);
102 
107  virtual void GetTuple(vtkGenericAdaptorCell *c, double *tuple);
108 
113  double *GetTuple(vtkGenericCellIterator *c);
114 
119  void GetTuple(vtkGenericCellIterator *c, double *tuple);
120 
124  double *GetTuple(vtkGenericPointIterator *p);
125 
130  void GetTuple(vtkGenericPointIterator *p, double *tuple);
131 
137  void GetComponent(int i,vtkGenericCellIterator *c, double *values);
138 
142  double GetComponent(int i,vtkGenericPointIterator *p);
143 
146  void DeepCopy(vtkGenericAttribute *other);
147 
150  void ShallowCopy(vtkGenericAttribute *other);
151 
153 
156  void InitWithPointData(vtkPointData *d,
157  int i);
159 
161 
164  void InitWithCellData(vtkCellData *d,
165  int i);
167 
168 protected:
172  virtual ~vtkBridgeAttribute();
173 
176  void AllocateInternalTuple(int size);
177 
178  friend class vtkBridgeCell;
179 
180  // only one of them is non-null at a time.
183  vtkDataSetAttributes *Data; // always not-null, equal to either on Pd or Cd
185 
186  double *InternalTuple; // used by vtkBridgeCell
188 
189 private:
190  vtkBridgeAttribute(const vtkBridgeAttribute&); // Not implemented
191  void operator=(const vtkBridgeAttribute&); // Not implemented
192 };
193 
194 #endif
virtual int GetCentering()=0
virtual double GetMaxNorm()=0
virtual void PrintSelf(ostream &os, vtkIndent indent)
represent and manipulate point attribute data
Definition: vtkPointData.h:36
virtual void ShallowCopy(vtkGenericAttribute *other)=0
virtual int GetComponentType()=0
Implementation of vtkGenericAdaptorCell.
Definition: vtkBridgeCell.h:37
#define VTKTESTINGGENERICBRIDGE_EXPORT
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
virtual vtkIdType GetSize()=0
int vtkIdType
Definition: vtkType.h:247
iterator used to traverse points
virtual unsigned long GetActualMemorySize()=0
abstract class defined API for attribute data
virtual int GetType()=0
virtual int GetNumberOfComponents()=0
iterator used to traverse cells
defines cell interface
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void GetComponent(int i, vtkGenericCellIterator *c, double *values)=0
virtual double * GetTuple(vtkGenericAdaptorCell *c)=0
represent and manipulate attribute data in a dataset
virtual double * GetRange(int component=0)=0
Implementation of vtkGenericAttribute.
virtual void DeepCopy(vtkGenericAttribute *other)=0
friend class vtkBridgeAttribute
static vtkObject * New()
vtkDataSetAttributes * Data
virtual const char * GetName()=0