Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Common/vtkDataSet.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00058 #ifndef __vtkDataSet_h
00059 #define __vtkDataSet_h
00060
00061 #include "vtkDataObject.h"
00062
00063 class vtkCell;
00064 class vtkCellData;
00065 class vtkCellTypes;
00066 class vtkGenericCell;
00067 class vtkIdList;
00068 class vtkPointData;
00069
00070 class VTK_COMMON_EXPORT vtkDataSet : public vtkDataObject
00071 {
00072 public:
00073 vtkTypeRevisionMacro(vtkDataSet,vtkDataObject);
00074 void PrintSelf(ostream& os, vtkIndent indent);
00075
00079 virtual void CopyStructure(vtkDataSet *ds) = 0;
00080
00083 virtual vtkIdType GetNumberOfPoints() = 0;
00084
00087 virtual vtkIdType GetNumberOfCells() = 0;
00088
00091 virtual float *GetPoint(vtkIdType ptId) = 0;
00092
00096 virtual void GetPoint(vtkIdType id, float x[3]);
00097
00100 virtual vtkCell *GetCell(vtkIdType cellId) = 0;
00101
00106 virtual void GetCell(vtkIdType cellId, vtkGenericCell *cell) = 0;
00107
00116 virtual void GetCellBounds(vtkIdType cellId, float bounds[6]);
00117
00121 virtual int GetCellType(vtkIdType cellId) = 0;
00122
00130 virtual void GetCellTypes(vtkCellTypes *types);
00131
00135 virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) = 0;
00136
00140 virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) = 0;
00141
00143
00147 virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds,
00148 vtkIdList *cellIds);
00150
00152
00156 vtkIdType FindPoint(float x, float y, float z)
00157 {
00158 float xyz[3];
00159 xyz[0] = x; xyz[1] = y; xyz[2] = z;
00160 return this->FindPoint (xyz);
00161 }
00162 virtual vtkIdType FindPoint(float x[3]) = 0;
00164
00166
00174 virtual vtkIdType FindCell(float x[3], vtkCell *cell, vtkIdType cellId,
00175 float tol2, int& subId, float pcoords[3],
00176 float *weights) = 0;
00178
00180
00185 virtual vtkIdType FindCell(float x[3], vtkCell *cell,
00186 vtkGenericCell *gencell, vtkIdType cellId,
00187 float tol2, int& subId, float pcoords[3],
00188 float *weights) = 0;
00190
00192
00198 virtual vtkCell *FindAndGetCell(float x[3], vtkCell *cell, vtkIdType cellId,
00199 float tol2, int& subId, float pcoords[3],
00200 float *weights);
00202
00205 unsigned long int GetMTime();
00206
00209 vtkCellData *GetCellData() {return this->CellData;};
00210
00213 vtkPointData *GetPointData() {return this->PointData;};
00214
00217 virtual void Squeeze();
00218
00221 virtual void ComputeBounds();
00222
00225 float *GetBounds();
00226
00230 void GetBounds(float bounds[6]);
00231
00233 float *GetCenter();
00234
00237 void GetCenter(float center[3]);
00238
00242 float GetLength();
00243
00245 void Initialize();
00246
00253 virtual void GetScalarRange(float range[2]);
00254
00257 float *GetScalarRange();
00258
00262 virtual int GetMaxCellSize() = 0;
00263
00269 unsigned long GetActualMemorySize();
00270
00272
00273 int GetDataObjectType()
00274 {return VTK_DATA_SET;}
00276
00278
00279 void ShallowCopy(vtkDataObject *src);
00280 void DeepCopy(vtkDataObject *src);
00282
00283
00284 enum FieldDataType
00285 {
00286 DATA_OBJECT_FIELD=0,
00287 POINT_DATA_FIELD=1,
00288 CELL_DATA_FIELD=2
00289 };
00290
00291
00298 int CheckAttributes();
00299
00300 protected:
00301
00302 vtkDataSet();
00303 ~vtkDataSet();
00304
00305 vtkCellData *CellData;
00306 vtkPointData *PointData;
00307 vtkTimeStamp ComputeTime;
00308 float Bounds[6];
00309 float ScalarRange[2];
00310 float Center[3];
00311
00312 private:
00313 void InternalDataSetCopy(vtkDataSet *src);
00314 private:
00315 vtkDataSet(const vtkDataSet&);
00316 void operator=(const vtkDataSet&);
00317 };
00318
00319 inline void vtkDataSet::GetPoint(vtkIdType id, float x[3])
00320 {
00321 float *pt = this->GetPoint(id);
00322 x[0] = pt[0]; x[1] = pt[1]; x[2] = pt[2];
00323 }
00324
00325 #endif