00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00054 #ifndef __vtkDataSetAttributes_h
00055 #define __vtkDataSetAttributes_h
00056
00057 #include "vtkObject.h"
00058 #include "vtkScalars.h"
00059 #include "vtkVectors.h"
00060 #include "vtkNormals.h"
00061 #include "vtkTCoords.h"
00062 #include "vtkTensors.h"
00063 #include "vtkFieldData.h"
00064 #include "vtkGhostLevels.h"
00065
00066 class VTK_EXPORT vtkDataSetAttributes : public vtkObject
00067 {
00068 public:
00070 static vtkDataSetAttributes *New();
00071
00072 vtkTypeMacro(vtkDataSetAttributes,vtkObject);
00073 void PrintSelf(ostream& os, vtkIndent indent);
00074
00076 void Initialize();
00077
00080 virtual void Update() {};
00081
00084 void PassData(vtkDataSetAttributes* pd);
00085
00089 void PassNoReplaceData(vtkDataSetAttributes* pd);
00090
00095 void CopyAllocate(vtkDataSetAttributes* pd, int sze=0, int ext=1000);
00096
00099 void CopyData(vtkDataSetAttributes *fromPd, int fromId, int toId);
00100
00102 void InterpolateAllocate(vtkDataSetAttributes* pd, int sze=0, int ext=1000);
00103
00106 void InterpolatePoint(vtkDataSetAttributes *fromPd, int toId,
00107 vtkIdList *ids, float *weights);
00108
00113 void InterpolateEdge(vtkDataSetAttributes *fromPd, int toId, int p1, int p2,
00114 float t);
00115
00123 void InterpolateTime(vtkDataSetAttributes *from1, vtkDataSetAttributes *from2,
00124 int id, float t);
00125
00128 void DeepCopy(vtkDataSetAttributes *pd);
00129
00131 void ShallowCopy(vtkDataSetAttributes *pd);
00132
00134 void Squeeze();
00135
00137 unsigned long int GetMTime();
00138
00140 vtkSetObjectMacro(Scalars,vtkScalars);
00141 vtkGetObjectMacro(Scalars,vtkScalars);
00142
00144 vtkSetObjectMacro(Vectors,vtkVectors);
00145 vtkGetObjectMacro(Vectors,vtkVectors);
00146
00148 vtkSetObjectMacro(Normals,vtkNormals);
00149 vtkGetObjectMacro(Normals,vtkNormals);
00150
00152 vtkSetObjectMacro(GhostLevels, vtkGhostLevels);
00153 vtkGetObjectMacro(GhostLevels, vtkGhostLevels);
00154
00156 vtkSetObjectMacro(TCoords,vtkTCoords);
00157 vtkGetObjectMacro(TCoords,vtkTCoords);
00158
00160 vtkSetObjectMacro(Tensors,vtkTensors);
00161 vtkGetObjectMacro(Tensors,vtkTensors);
00162
00164 vtkSetObjectMacro(FieldData,vtkFieldData);
00165 vtkGetObjectMacro(FieldData,vtkFieldData);
00166
00168 vtkSetMacro(CopyScalars,int);
00169 vtkGetMacro(CopyScalars,int);
00170 vtkBooleanMacro(CopyScalars,int);
00171
00173 vtkSetMacro(CopyVectors,int);
00174 vtkGetMacro(CopyVectors,int);
00175 vtkBooleanMacro(CopyVectors,int);
00176
00178 vtkSetMacro(CopyGhostLevels, int);
00179 vtkGetMacro(CopyGhostLevels, int);
00180 vtkBooleanMacro(CopyGhostLevels, int);
00181
00183 vtkSetMacro(CopyNormals,int);
00184 vtkGetMacro(CopyNormals,int);
00185 vtkBooleanMacro(CopyNormals,int);
00186
00188 vtkSetMacro(CopyTCoords,int);
00189 vtkGetMacro(CopyTCoords,int);
00190 vtkBooleanMacro(CopyTCoords,int);
00191
00193 vtkSetMacro(CopyTensors,int);
00194 vtkGetMacro(CopyTensors,int);
00195 vtkBooleanMacro(CopyTensors,int);
00196
00198 vtkSetMacro(CopyFieldData,int);
00199 vtkGetMacro(CopyFieldData,int);
00200 vtkBooleanMacro(CopyFieldData,int);
00201
00206 int GetAnyEnabled() {return this->AnyEnabled;}
00207
00209 void CopyAllOn();
00210
00212 void CopyAllOff();
00213
00218 void CopyTuple(vtkDataArray *fromData, vtkDataArray *toData, int fromId,
00219 int toId);
00220
00227 unsigned long GetActualMemorySize();
00228
00229 #ifndef VTK_REMOVE_LEGACY_CODE
00230
00231 void DeepCopy(vtkDataSetAttributes &pd)
00232 {VTK_LEGACY_METHOD(DeepCopy,"3.2"); this->DeepCopy(&pd);}
00233 void ShallowCopy(vtkDataSetAttributes &pd)
00234 {VTK_LEGACY_METHOD(ShalowCopy,"3.2"); this->ShallowCopy(&pd);}
00235 #endif
00236
00237 protected:
00238 vtkDataSetAttributes();
00239 ~vtkDataSetAttributes();
00240 vtkDataSetAttributes(const vtkDataSetAttributes&) {};
00241 void operator=(const vtkDataSetAttributes&) {};
00242
00243
00244 void InterpolateTuple(vtkDataArray *fromData, vtkDataArray *toData, int toId,
00245 vtkIdList *ptIds, float *weights);
00246 void InterpolateTuple(vtkDataArray *fromData, vtkDataArray *toData, int toId,
00247 int id1, int id2, float t);
00248 void InterpolateTuple(vtkDataArray *fromData1, vtkDataArray *fromData2,
00249 vtkDataArray *toData, int id, float t);
00250
00251
00252 vtkScalars *Scalars;
00253 vtkVectors *Vectors;
00254 vtkNormals *Normals;
00255 vtkTCoords *TCoords;
00256 vtkTensors *Tensors;
00257 vtkFieldData *FieldData;
00258 vtkGhostLevels *GhostLevels;
00259
00260
00261 int CopyScalars;
00262 int CopyVectors;
00263 int CopyNormals;
00264 int CopyTCoords;
00265 int CopyTensors;
00266 int CopyFieldData;
00267 int CopyGhostLevels;
00268
00269
00270 int AnyEnabled;
00271 int CopyScalarsEnabled;
00272 int CopyVectorsEnabled;
00273 int CopyNormalsEnabled;
00274 int CopyTCoordsEnabled;
00275 int CopyTensorsEnabled;
00276 int CopyFieldDataEnabled;
00277 int CopyGhostLevelsEnabled;
00278
00279
00280 float Null3Tuple[3];
00281 float Null4Tuple[4];
00282 vtkTensor *NullTensor;
00283 float *NullTuple;
00284 int TupleSize;
00285 float *Tuple;
00286 };
00287
00288 #endif
00289
00290