00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 #ifndef __vtkSubdivisionAlgorithm_h
00016 #define __vtkSubdivisionAlgorithm_h
00017 
00037 #include "vtkObject.h"
00038 
00039 class vtkDataSetAttributes;
00040 class vtkMatrix4x4;
00041 class vtkStreamingTessellator;
00042 
00043 class VTK_EXPORT vtkSubdivisionAlgorithm : public vtkObject
00044 {
00045   public:
00046     vtkTypeRevisionMacro(vtkSubdivisionAlgorithm,vtkObject);
00047     virtual void PrintSelf( ostream& os, vtkIndent indent );
00048 
00052     virtual bool EvaluateEdge( const double* p0, double* p1, const double* p2, int field_start ) = 0 ;
00053 
00060     virtual int PassField( int sourceId, int sourceSize, vtkStreamingTessellator* t );
00061 
00065     virtual void ResetFieldList();
00066 
00070     virtual bool DontPassField( int sourceId, vtkStreamingTessellator* t );
00071 
00075     const int* GetFieldIds() const;
00076 
00081     const int* GetFieldOffsets() const;
00082 
00085     int GetOutputField( int fieldId ) const;
00086 
00090     int GetNumberOfFields() const;
00091 
00092   protected:
00093     vtkSubdivisionAlgorithm();
00094     virtual ~vtkSubdivisionAlgorithm();
00095 
00096     int* FieldIds;
00097     int* FieldOffsets;
00098     int  NumberOfFields;
00099 
00119     bool ViewDependentEval( const double* p0, double* p1, double* p1_actual, const double* p2, int field_start, vtkMatrix4x4* viewtrans, const double* pixelSize, double allowableChordErr ) const;
00120 
00144     bool FixedFieldErrorEval( const double* p0, double* p1, double* p1_actual, const double* p2, int field_start, int field_criteria, double* allowableFieldErr ) const;
00145 
00146   private:
00147     vtkSubdivisionAlgorithm( const vtkSubdivisionAlgorithm& ); 
00148     void operator = ( const vtkSubdivisionAlgorithm& ); 
00149 };
00150 
00151 
00152 
00153 inline const int* vtkSubdivisionAlgorithm::GetFieldIds() const { return this->FieldIds; }
00154 inline const int* vtkSubdivisionAlgorithm::GetFieldOffsets() const { return this->FieldOffsets; }
00155 inline int vtkSubdivisionAlgorithm::GetNumberOfFields() const { return this->NumberOfFields; }
00156 
00157 
00158 
00159 #endif // __vtkSubdivisionAlgorithm_h