Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkBridgeAttribute.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkBridgeAttribute.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
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   vtkTypeRevisionMacro(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   // Description:
00177   // Destructor.
00178   virtual ~vtkBridgeAttribute();
00180   
00183   void AllocateInternalTuple(int size);
00184   
00185   friend class vtkBridgeCell;
00186   
00187   // only one of them is non-null at a time.
00188   vtkPointData *Pd;
00189   vtkCellData *Cd;
00190   vtkDataSetAttributes *Data; // always not-null, equal to either on Pd or Cd
00191   int AttributeNumber;
00192   
00193   double *InternalTuple; // used by vtkBridgeCell
00194   int InternalTupleCapacity;
00195   
00196 private:
00197   vtkBridgeAttribute(const vtkBridgeAttribute&); // Not implemented
00198   void operator=(const vtkBridgeAttribute&); // Not implemented
00199 };
00200 
00201 #endif

Generated on Mon Jan 21 23:07:22 2008 for VTK by  doxygen 1.4.3-20050530