dox/Common/vtkDataSet.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00042
#ifndef __vtkDataSet_h
00043
#define __vtkDataSet_h
00044
00045
#include "vtkDataObject.h"
00046
00047
class vtkCell;
00048
class vtkCellData;
00049
class vtkCellTypes;
00050
class vtkGenericCell;
00051
class vtkIdList;
00052
class vtkPointData;
00053
00054 class VTK_COMMON_EXPORT vtkDataSet :
public vtkDataObject
00055 {
00056
public:
00057 vtkTypeRevisionMacro(vtkDataSet,
vtkDataObject);
00058
void PrintSelf(ostream& os,
vtkIndent indent);
00059
00063
virtual void CopyStructure(vtkDataSet *ds) = 0;
00064
00067
virtual vtkIdType GetNumberOfPoints() = 0;
00068
00071
virtual vtkIdType GetNumberOfCells() = 0;
00072
00075
virtual double *GetPoint(
vtkIdType ptId) = 0;
00076
00080
virtual void GetPoint(
vtkIdType id,
double x[3]);
00081
00084
virtual vtkCell *GetCell(
vtkIdType cellId) = 0;
00085
00090
virtual void GetCell(
vtkIdType cellId,
vtkGenericCell *cell) = 0;
00091
00100
virtual void GetCellBounds(
vtkIdType cellId,
double bounds[6]);
00101
00105
virtual int GetCellType(
vtkIdType cellId) = 0;
00106
00114
virtual void GetCellTypes(
vtkCellTypes *types);
00115
00119
virtual void GetCellPoints(
vtkIdType cellId,
vtkIdList *ptIds) = 0;
00120
00124
virtual void GetPointCells(
vtkIdType ptId,
vtkIdList *cellIds) = 0;
00125
00127
00131
virtual void GetCellNeighbors(
vtkIdType cellId,
vtkIdList *ptIds,
00132
vtkIdList *cellIds);
00134
00136
00140 vtkIdType FindPoint(
double x,
double y,
double z)
00141 {
00142
double xyz[3];
00143 xyz[0] = x; xyz[1] = y; xyz[2] = z;
00144
return this->FindPoint (xyz);
00145 }
00146
virtual vtkIdType FindPoint(
double x[3]) = 0;
00148
00150
00158
virtual vtkIdType FindCell(
double x[3],
vtkCell *cell,
vtkIdType cellId,
00159
double tol2,
int& subId,
double pcoords[3],
00160
double *weights) = 0;
00162
00164
00169
virtual vtkIdType FindCell(
double x[3],
vtkCell *cell,
00170
vtkGenericCell *gencell,
vtkIdType cellId,
00171
double tol2,
int& subId,
double pcoords[3],
00172
double *weights) = 0;
00174
00176
00182
virtual vtkCell *FindAndGetCell(
double x[3],
vtkCell *cell,
vtkIdType cellId,
00183
double tol2,
int& subId,
double pcoords[3],
00184
double *weights);
00186
00189
unsigned long int GetMTime();
00190
00193 vtkCellData *GetCellData() {
return this->CellData;};
00194
00197 vtkPointData *GetPointData() {
return this->PointData;};
00198
00201
virtual void Squeeze();
00202
00205
virtual void ComputeBounds();
00206
00209
double *GetBounds();
00210
00214
void GetBounds(
double bounds[6]);
00215
00217
double *GetCenter();
00218
00221
void GetCenter(
double center[3]);
00222
00226
double GetLength();
00227
00229
void Initialize();
00230
00237
virtual void GetScalarRange(
double range[2]);
00238
00241
double *GetScalarRange();
00242
00246
virtual int GetMaxCellSize() = 0;
00247
00253
unsigned long GetActualMemorySize();
00254
00256
00257 int GetDataObjectType()
00258 {
return VTK_DATA_SET;}
00260
00262
00263
void ShallowCopy(
vtkDataObject *src);
00264
void DeepCopy(
vtkDataObject *src);
00266
00267
00268 enum FieldDataType
00269 {
00270 DATA_OBJECT_FIELD=0,
00271 POINT_DATA_FIELD=1,
00272 CELL_DATA_FIELD=2
00273 };
00274
00275
00282
int CheckAttributes();
00283
00284
protected:
00285
00286 vtkDataSet();
00287 ~vtkDataSet();
00288
00289 vtkCellData *CellData;
00290 vtkPointData *PointData;
00291 vtkTimeStamp ComputeTime;
00292 double Bounds[6];
00293 double ScalarRange[2];
00294 double Center[3];
00295
00296
private:
00297
void InternalDataSetCopy(vtkDataSet *src);
00298
private:
00299 vtkDataSet(
const vtkDataSet&);
00300
void operator=(
const vtkDataSet&);
00301 };
00302
00303 inline void vtkDataSet::GetPoint(
vtkIdType id,
double x[3])
00304 {
00305
double *pt = this->
GetPoint(
id);
00306 x[0] = pt[0]; x[1] = pt[1]; x[2] = pt[2];
00307 }
00308
00309
#endif