Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkGenericSubdivisionErrorMetric Class Reference

#include <vtkGenericSubdivisionErrorMetric.h>

Inheritance diagram for vtkGenericSubdivisionErrorMetric:

Inheritance graph
[legend]
Collaboration diagram for vtkGenericSubdivisionErrorMetric:

Collaboration graph
[legend]
List of all members.

Detailed Description

class to compute error during cell tessellation

This class is used to compute a tessellation error during cell subdivision. Cell subdivision is performed in the context of the adaptor framework: higher-order, or complex cells, are automatically tessellated into simplices so that they can be processed with conventional visualization algorithms.

While this class implements a simple error measure based on geometric and attribute error (i.e., variation of edge from a straight line, variation of the attribute value from a linear ramp), it is designed to be subclassed.

See Also vtkGenericCellTessellator

Created by:
  • Bertel, Francois
CVS contributions (if > 5%):
  • Bertel, Francois (100%)
CVS logs (CVSweb):
  • .cxx (/Filtering/vtkGenericSubdivisionErrorMetric.cxx)
  • .h (/Filtering/vtkGenericSubdivisionErrorMetric.h)

Definition at line 52 of file vtkGenericSubdivisionErrorMetric.h.

[NOHEADER]

typedef vtkObject Superclass
virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
int IsTypeOf (const char *type)
vtkGenericSubdivisionErrorMetricSafeDownCast (vtkObject *o)

Public Member Functions

void SetAbsoluteGeometricTolerance (double value)
void SetPixelTolerance (double value)
void SetAttributeTolerance (double value)
virtual bool EvaluateEdge (double *e1, double *e2)
virtual double GetGeometricTolerance ()
void SetRelativeGeometricTolerance (double value, vtkGenericDataSet *ds)
virtual double GetPixelTolerance ()
virtual double GetAttributeTolerance ()
virtual void SetGenericCell (vtkGenericAdaptorCell *)
virtual vtkGenericAdaptorCellGetGenericCell ()
virtual void SetAttributeCollection (vtkGenericAttributeCollection *)
virtual vtkGenericAttributeCollectionGetAttributeCollection ()
virtual double EvaluateScreenError (double *vtkNotUsed(e1), double *vtkNotUsed(e2))

Static Public Member Functions

vtkGenericSubdivisionErrorMetricNew ()

Protected Member Functions

 vtkGenericSubdivisionErrorMetric ()
virtual ~vtkGenericSubdivisionErrorMetric ()
void ComputeAbsoluteAttributeTolerance ()
double EvaluateGeometricError (double *e1, double *e2)
double EvaluateAttributesError (double *e1, double *e2)
void ComputeCoordinates (double *e1, double *e2)
double Distance2LinePoint (double x[3], double y[3], double z[3])

Protected Attributes

double GeometricTolerance
double PixelTolerance
double AttributeTolerance
double AbsoluteAttributeTolerance
vtkTimeStamp AbsoluteAttributeToleranceComputeTime
vtkGenericAttributeCollectionAttributeCollection
vtkGenericAdaptorCellGenericCell
vtkTimeStamp SubdivisionMTime
double * Edge1Cache
double * Edge2Cache
double RealCenterCache [3]
double InterpolatedCenterCache [3]


Member Typedef Documentation

typedef vtkObject vtkGenericSubdivisionErrorMetric::Superclass
 

Standard VTK type and error macros.

Reimplemented from vtkObject.

Definition at line 60 of file vtkGenericSubdivisionErrorMetric.h.


Constructor & Destructor Documentation

vtkGenericSubdivisionErrorMetric::vtkGenericSubdivisionErrorMetric  )  [protected]
 

virtual vtkGenericSubdivisionErrorMetric::~vtkGenericSubdivisionErrorMetric  )  [protected, virtual]
 


Member Function Documentation

vtkGenericSubdivisionErrorMetric* vtkGenericSubdivisionErrorMetric::New  )  [static]
 

Construct the tessellator.

Reimplemented from vtkObject.

virtual const char* vtkGenericSubdivisionErrorMetric::GetClassName  )  [virtual]
 

Standard VTK type and error macros.

Reimplemented from vtkObject.

int vtkGenericSubdivisionErrorMetric::IsTypeOf const char *  type  )  [static]
 

Standard VTK type and error macros.

Reimplemented from vtkObject.

virtual int vtkGenericSubdivisionErrorMetric::IsA const char *  type  )  [virtual]
 

Standard VTK type and error macros.

Reimplemented from vtkObject.

vtkGenericSubdivisionErrorMetric* vtkGenericSubdivisionErrorMetric::SafeDownCast vtkObject o  )  [static]
 

Standard VTK type and error macros.

Reimplemented from vtkObject.

void vtkGenericSubdivisionErrorMetric::PrintSelf ostream &  os,
vtkIndent  indent
[virtual]
 

Standard VTK type and error macros.

Reimplemented from vtkObject.

virtual double vtkGenericSubdivisionErrorMetric::GetGeometricTolerance  )  [virtual]
 

Specify the number of component to interpolate This is for internal use only

void vtkGenericSubdivisionErrorMetric::SetAbsoluteGeometricTolerance double  value  ) 
 

Set the geometric accuracy with an absolute value. This is the geometric object-based accuracy. Subdivision will be required if the square distance between the real point and the interpolated point is greater than `value'. For instance 0.01 will give better result than 0.1.

Precondition:
positive_value: value>0

void vtkGenericSubdivisionErrorMetric::SetRelativeGeometricTolerance double  value,
vtkGenericDataSet ds
 

Set the geometric accuracy with a value relative to the length of the bounding box of the dataset. Internally compute the absolute tolerance. For instance 0.01 will give better result than 0.1.

Precondition:
valid_range_value: value>0 && value<1

ds_exists: ds!=0

virtual double vtkGenericSubdivisionErrorMetric::GetPixelTolerance  )  [virtual]
 

Subdivision is required if the square distance between the projection of the real point and the projection of the interpolated point is greater than PixelTolerance. This is the geometric screen-based accuracy. An accuracy less or equal to 0.25 means that the two projected point are on the same pixel. CAN WE HAVE A VALUE <0.25 with antialiasing ?

void vtkGenericSubdivisionErrorMetric::SetPixelTolerance double  value  ) 
 

Set the pixel accuracy to `value'. See GetPixelTolerance() for details.

Precondition:
valid_value: value>=0.25

virtual double vtkGenericSubdivisionErrorMetric::GetAttributeTolerance  )  [virtual]
 

Relative tolerance of the active scalar (attribute+component). Subdivision is required if the square distance between the real attribute at the mid point on the edge and the interpolated attribute is greater than AttributeTolerance. This is the attribute accuracy. 0.01 will give better result than 0.1.

void vtkGenericSubdivisionErrorMetric::SetAttributeTolerance double  value  ) 
 

Set the relative attribute accuracy to `value'. See GetAttributeTolerance() for details.

Precondition:
valid_range_value: value>0 && value<1

virtual bool vtkGenericSubdivisionErrorMetric::EvaluateEdge double *  e1,
double *  e2
[virtual]
 

Return whether the indicated edge exceeds the error metric. e1 and e2 are in parametric coordinates.

virtual void vtkGenericSubdivisionErrorMetric::SetGenericCell vtkGenericAdaptorCell  )  [virtual]
 

The error metric is based on variation of the tessellation from the actual cell geometry.

virtual vtkGenericAdaptorCell* vtkGenericSubdivisionErrorMetric::GetGenericCell  )  [virtual]
 

The error metric is based on variation of the tessellation from the actual cell geometry.

virtual void vtkGenericSubdivisionErrorMetric::SetAttributeCollection vtkGenericAttributeCollection  )  [virtual]
 

The error metric may be based on attribute variation.

virtual vtkGenericAttributeCollection* vtkGenericSubdivisionErrorMetric::GetAttributeCollection  )  [virtual]
 

The error metric may be based on attribute variation.

virtual double vtkGenericSubdivisionErrorMetric::EvaluateScreenError double *  vtkNotUsed(e1),
double *  vtkNotUsed(e2)
[inline, virtual]
 

Subclasses of this class may evaluate screen error by overloading this method. This method returns the screen error of a particular edge given the coordinates of the endpoint of the edge. (It has been made virtual to avoid dependencies on the VTK/Rendering subdirectory. Subclasses of this class can be found in VTK/GenericFiltering.)

Definition at line 137 of file vtkGenericSubdivisionErrorMetric.h.

void vtkGenericSubdivisionErrorMetric::ComputeAbsoluteAttributeTolerance  )  [protected]
 

Compute the absolute attribute tolerance, only if the cached value is obsolete.

void vtkGenericSubdivisionErrorMetric::ComputeCoordinates double *  e1,
double *  e2
[protected]
 

Compute world coordinates of the vertices `e1' and `e2' defining the edge. The result is in Edge1Cache and Edge2Cache. The middle of the straight line is InterpolatedCenterCache, the middle of the arc is RealCenterCache.

double vtkGenericSubdivisionErrorMetric::Distance2LinePoint double  x[3],
double  y[3],
double  z[3]
[protected]
 

Square distance between a straight line (defined by points x and y) and a point z. Property: if x and y are equal, the line is a point and the result is the square distance between points x and z.

double vtkGenericSubdivisionErrorMetric::EvaluateGeometricError double *  e1,
double *  e2
[protected]
 

double vtkGenericSubdivisionErrorMetric::EvaluateAttributesError double *  e1,
double *  e2
[protected]
 


Member Data Documentation

double vtkGenericSubdivisionErrorMetric::GeometricTolerance [protected]
 

Definition at line 169 of file vtkGenericSubdivisionErrorMetric.h.

double vtkGenericSubdivisionErrorMetric::PixelTolerance [protected]
 

Definition at line 170 of file vtkGenericSubdivisionErrorMetric.h.

double vtkGenericSubdivisionErrorMetric::AttributeTolerance [protected]
 

Definition at line 171 of file vtkGenericSubdivisionErrorMetric.h.

double vtkGenericSubdivisionErrorMetric::AbsoluteAttributeTolerance [protected]
 

Definition at line 173 of file vtkGenericSubdivisionErrorMetric.h.

vtkTimeStamp vtkGenericSubdivisionErrorMetric::AbsoluteAttributeToleranceComputeTime [protected]
 

Definition at line 175 of file vtkGenericSubdivisionErrorMetric.h.

vtkGenericAttributeCollection* vtkGenericSubdivisionErrorMetric::AttributeCollection [protected]
 

Definition at line 177 of file vtkGenericSubdivisionErrorMetric.h.

vtkGenericAdaptorCell* vtkGenericSubdivisionErrorMetric::GenericCell [protected]
 

Definition at line 178 of file vtkGenericSubdivisionErrorMetric.h.

vtkTimeStamp vtkGenericSubdivisionErrorMetric::SubdivisionMTime [protected]
 

Definition at line 179 of file vtkGenericSubdivisionErrorMetric.h.

double* vtkGenericSubdivisionErrorMetric::Edge1Cache [protected]
 

Definition at line 182 of file vtkGenericSubdivisionErrorMetric.h.

double* vtkGenericSubdivisionErrorMetric::Edge2Cache [protected]
 

Definition at line 183 of file vtkGenericSubdivisionErrorMetric.h.

double vtkGenericSubdivisionErrorMetric::RealCenterCache[3] [protected]
 

Definition at line 186 of file vtkGenericSubdivisionErrorMetric.h.

double vtkGenericSubdivisionErrorMetric::InterpolatedCenterCache[3] [protected]
 

Definition at line 187 of file vtkGenericSubdivisionErrorMetric.h.


The documentation for this class was generated from the following file: