00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __vtkEdgeSubdivisionCriterion_h
00016 #define __vtkEdgeSubdivisionCriterion_h
00017
00040 #include "vtkObject.h"
00041
00042 class vtkDataSetAttributes;
00043 class vtkMatrix4x4;
00044 class vtkStreamingTessellator;
00045
00046 class VTK_GRAPHICS_EXPORT vtkEdgeSubdivisionCriterion : public vtkObject
00047 {
00048 public:
00049 vtkTypeMacro(vtkEdgeSubdivisionCriterion,vtkObject);
00050 virtual void PrintSelf( ostream& os, vtkIndent indent );
00051
00055 virtual bool EvaluateEdge( const double* p0, double* p1, const double* p2, int field_start ) = 0 ;
00056
00063 virtual int PassField( int sourceId, int sourceSize, vtkStreamingTessellator* t );
00064
00068 virtual void ResetFieldList();
00069
00073 virtual bool DontPassField( int sourceId, vtkStreamingTessellator* t );
00074
00078 const int* GetFieldIds() const;
00079
00084 const int* GetFieldOffsets() const;
00085
00088 int GetOutputField( int fieldId ) const;
00089
00093 int GetNumberOfFields() const;
00094
00095 protected:
00096 vtkEdgeSubdivisionCriterion();
00097 virtual ~vtkEdgeSubdivisionCriterion();
00098
00099 int* FieldIds;
00100 int* FieldOffsets;
00101 int NumberOfFields;
00102
00122 bool ViewDependentEval( const double* p0, double* p1, double* p1_actual, const double* p2, int field_start, vtkMatrix4x4* viewtrans, const double* pixelSize, double allowableChordErr ) const;
00123
00147 bool FixedFieldErrorEval( const double* p0, double* p1, double* p1_actual, const double* p2, int field_start, int field_criteria, double* allowableFieldErr ) const;
00148
00149 private:
00150 vtkEdgeSubdivisionCriterion( const vtkEdgeSubdivisionCriterion& );
00151 void operator = ( const vtkEdgeSubdivisionCriterion& );
00152 };
00153
00154
00155
00156 inline const int* vtkEdgeSubdivisionCriterion::GetFieldIds() const { return this->FieldIds; }
00157 inline const int* vtkEdgeSubdivisionCriterion::GetFieldOffsets() const { return this->FieldOffsets; }
00158 inline int vtkEdgeSubdivisionCriterion::GetNumberOfFields() const { return this->NumberOfFields; }
00159
00160
00161
00162 #endif // __vtkEdgeSubdivisionCriterion_h