00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __vtkDataSetEdgeSubdivisionCriterion_h
00016 #define __vtkDataSetEdgeSubdivisionCriterion_h
00017
00041 #include "vtkEdgeSubdivisionCriterion.h"
00042
00043 class vtkCell;
00044 class vtkDataSet;
00045
00046 class VTK_GRAPHICS_EXPORT vtkDataSetEdgeSubdivisionCriterion : public vtkEdgeSubdivisionCriterion
00047 {
00048 public:
00049 vtkTypeMacro(vtkDataSetEdgeSubdivisionCriterion,vtkEdgeSubdivisionCriterion);
00050 static vtkDataSetEdgeSubdivisionCriterion* New();
00051 virtual void PrintSelf( ostream& os, vtkIndent indent );
00052
00053 virtual void SetMesh( vtkDataSet* );
00054 vtkDataSet* GetMesh();
00055
00056 const vtkDataSet* GetMesh() const;
00057
00058
00059 virtual void SetCellId( vtkIdType cell );
00060 vtkIdType GetCellId() const;
00061
00062 vtkIdType& GetCellId();
00063
00064 vtkCell* GetCell();
00065
00066 const vtkCell* GetCell() const;
00067
00068
00069 virtual bool EvaluateEdge( const double* p0, double* midpt, const double* p1, int field_start );
00070
00100 double* EvaluateFields( double* vertex, double* weights, int field_start );
00101
00103
00106 void EvaluatePointDataField( double* result, double* weights, int field );
00107 void EvaluateCellDataField( double* result, double* weights, int field );
00109
00111
00113 vtkSetMacro(ChordError2,double);
00114 vtkGetMacro(ChordError2,double);
00116
00118
00122 virtual void SetFieldError2( int s, double err );
00123 double GetFieldError2( int s ) const;
00125
00129 virtual void ResetFieldError2();
00130
00132
00135 vtkGetMacro(ActiveFieldCriteria,int);
00136 int GetActiveFieldCriteria() const { return this->ActiveFieldCriteria; }
00138
00139 protected:
00140 vtkDataSetEdgeSubdivisionCriterion();
00141 virtual ~vtkDataSetEdgeSubdivisionCriterion();
00142
00143 vtkDataSet* CurrentMesh;
00144 vtkIdType CurrentCellId;
00145 vtkCell* CurrentCellData;
00146
00147 double ChordError2;
00148 double* FieldError2;
00149 int FieldError2Length;
00150 int FieldError2Capacity;
00151 int ActiveFieldCriteria;
00152
00153 private:
00154 vtkDataSetEdgeSubdivisionCriterion( const vtkDataSetEdgeSubdivisionCriterion& );
00155 void operator = ( const vtkDataSetEdgeSubdivisionCriterion& );
00156
00157 };
00158
00159
00160
00161 inline vtkIdType& vtkDataSetEdgeSubdivisionCriterion::GetCellId() { return this->CurrentCellId; }
00162 inline vtkIdType vtkDataSetEdgeSubdivisionCriterion::GetCellId() const { return this->CurrentCellId; }
00163
00164 inline vtkDataSet* vtkDataSetEdgeSubdivisionCriterion::GetMesh() { return this->CurrentMesh; }
00165 inline const vtkDataSet* vtkDataSetEdgeSubdivisionCriterion::GetMesh() const { return this->CurrentMesh; }
00166
00167 inline vtkCell* vtkDataSetEdgeSubdivisionCriterion::GetCell() { return this->CurrentCellData; }
00168 inline const vtkCell* vtkDataSetEdgeSubdivisionCriterion::GetCell() const { return this->CurrentCellData; }
00169
00170
00171
00172 #endif // __vtkDataSetEdgeSubdivisionCriterion_h