00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00027 #ifndef __vtkBridgeAttribute_h
00028 #define __vtkBridgeAttribute_h
00029 
00030 #include "vtkBridgeExport.h"
00031 #include "vtkGenericAttribute.h"
00032 
00033 class vtkPointData;
00034 class vtkCellData;
00035 class vtkDataSetAttributes;
00036 
00037 class VTK_BRIDGE_EXPORT vtkBridgeAttribute : public vtkGenericAttribute
00038 {
00039  public:
00040   static vtkBridgeAttribute *New();
00041   vtkTypeMacro(vtkBridgeAttribute,vtkGenericAttribute);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00046   const char *GetName();
00047 
00050   int GetNumberOfComponents();
00051 
00055   int GetCentering();
00056   
00063   int GetType();
00064 
00072   int GetComponentType();
00073   
00075   vtkIdType GetSize();
00076 
00078   unsigned long GetActualMemorySize();
00079 
00084   double *GetRange(int component);
00085   
00087 
00089   void GetRange(int component,
00090                 double range[2]);
00092   
00095   double GetMaxNorm();
00096   
00102   virtual double *GetTuple(vtkGenericAdaptorCell *c);
00103   
00109   virtual void GetTuple(vtkGenericAdaptorCell *c, double *tuple);
00110   
00116   double *GetTuple(vtkGenericCellIterator *c);
00117 
00123   void GetTuple(vtkGenericCellIterator *c, double *tuple);
00124 
00128   double *GetTuple(vtkGenericPointIterator *p);
00129   
00134   void GetTuple(vtkGenericPointIterator *p, double *tuple);
00135   
00141   void GetComponent(int i,vtkGenericCellIterator *c, double *values);
00142 
00146   double GetComponent(int i,vtkGenericPointIterator *p);
00147   
00150   void DeepCopy(vtkGenericAttribute *other);
00151   
00154   void ShallowCopy(vtkGenericAttribute *other);
00155   
00157 
00160   void InitWithPointData(vtkPointData *d,
00161                          int i);
00163   
00165 
00168   void InitWithCellData(vtkCellData *d,
00169                         int i);
00171   
00172 protected:
00174 
00175   vtkBridgeAttribute();
00176   
00177   
00178   virtual ~vtkBridgeAttribute();
00180   
00183   void AllocateInternalTuple(int size);
00184   
00185   friend class vtkBridgeCell;
00186   
00187   
00188   vtkPointData *Pd;
00189   vtkCellData *Cd;
00190   vtkDataSetAttributes *Data; 
00191   int AttributeNumber;
00192   
00193   double *InternalTuple; 
00194   int InternalTupleCapacity;
00195   
00196 private:
00197   vtkBridgeAttribute(const vtkBridgeAttribute&); 
00198   void operator=(const vtkBridgeAttribute&); 
00199 };
00200 
00201 #endif