VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkEdgeSubdivisionCriterion.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkEdgeSubdivisionCriterion.h
5  Language: C++
6 
7  Copyright 2003 Sandia Corporation.
8  Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9  license for use of this work by or on behalf of the
10  U.S. Government. Redistribution and use in source and binary forms, with
11  or without modification, are permitted provided that this Notice and any
12  statement of authorship are reproduced on all copies.
13 
14 =========================================================================*/
15 #ifndef __vtkEdgeSubdivisionCriterion_h
16 #define __vtkEdgeSubdivisionCriterion_h
17 
40 #include "vtkFiltersCoreModule.h" // For export macro
41 #include "vtkObject.h"
42 
43 class vtkDataSetAttributes;
44 class vtkMatrix4x4;
46 
47 class VTKFILTERSCORE_EXPORT vtkEdgeSubdivisionCriterion : public vtkObject
48 {
49  public:
50  vtkTypeMacro(vtkEdgeSubdivisionCriterion,vtkObject);
51  virtual void PrintSelf( ostream& os, vtkIndent indent );
52 
56  virtual bool EvaluateEdge( const double* p0, double* p1, const double* p2, int field_start ) = 0 ;
57 
64  virtual int PassField( int sourceId, int sourceSize, vtkStreamingTessellator* t );
65 
69  virtual void ResetFieldList();
70 
74  virtual bool DontPassField( int sourceId, vtkStreamingTessellator* t );
75 
79  const int* GetFieldIds() const;
80 
85  const int* GetFieldOffsets() const;
86 
89  int GetOutputField( int fieldId ) const;
90 
94  int GetNumberOfFields() const;
95 
96  protected:
98  virtual ~vtkEdgeSubdivisionCriterion();
99 
100  int* FieldIds;
103 
123  bool ViewDependentEval( const double* p0, double* p1, double* p1_actual, const double* p2, int field_start, vtkMatrix4x4* viewtrans, const double* pixelSize, double allowableChordErr ) const;
124 
148  bool FixedFieldErrorEval( const double* p0, double* p1, double* p1_actual, const double* p2, int field_start, int field_criteria, double* allowableFieldErr ) const;
149 
150  private:
151  vtkEdgeSubdivisionCriterion( const vtkEdgeSubdivisionCriterion& ); // Not implemented.
152  void operator = ( const vtkEdgeSubdivisionCriterion& ); // Not implemented.
153 };
154 
155 //BTX
156 
157 inline const int* vtkEdgeSubdivisionCriterion::GetFieldIds() const { return this->FieldIds; }
158 inline const int* vtkEdgeSubdivisionCriterion::GetFieldOffsets() const { return this->FieldOffsets; }
160 
161 //ETX
162 
163 #endif // __vtkEdgeSubdivisionCriterion_h
An algorithm that refines an initial simplicial tessellation using edge subdivision.
how to decide whether a linear approximation to nonlinear geometry or field should be subdivided ...