/usr/include/vtk-6.3/vtkDataSetEdgeSubdivisionCriterion.h is in libvtk6-dev 6.3.0+dfsg1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkDataSetEdgeSubdivisionCriterion.h
Language: C++
Date: $Date$
Version: $Revision$
Copyright 2003 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
license for use of this work by or on behalf of the
U.S. Government. Redistribution and use in source and binary forms, with
or without modification, are permitted provided that this Notice and any
statement of authorship are reproduced on all copies.
=========================================================================*/
#ifndef vtkDataSetEdgeSubdivisionCriterion_h
#define vtkDataSetEdgeSubdivisionCriterion_h
// .NAME vtkDataSetEdgeSubdivisionCriterion - a subclass of vtkEdgeSubdivisionCriterion for vtkDataSet objects.
//
// .SECTION Description
// This is a subclass of vtkEdgeSubdivisionCriterion that is used for
// tessellating cells of a vtkDataSet, particularly nonlinear
// cells.
//
// It provides functions for setting the current cell being tessellated and a
// convenience routine, \a EvaluateFields() to evaluate field values at a
// point. You should call \a EvaluateFields() from inside \a EvaluateEdge()
// whenever the result of \a EvaluateEdge() will be true. Otherwise, do
// not call \a EvaluateFields() as the midpoint is about to be discarded.
// (<i>Implementor's note</i>: This isn't true if UGLY_ASPECT_RATIO_HACK
// has been defined. But in that case, we don't want the exact field values;
// we need the linearly interpolated ones at the midpoint for continuity.)
//
// .SECTION See Also
// vtkEdgeSubdivisionCriterion
#include "vtkFiltersCoreModule.h" // For export macro
#include "vtkEdgeSubdivisionCriterion.h"
class vtkCell;
class vtkDataSet;
class VTKFILTERSCORE_EXPORT vtkDataSetEdgeSubdivisionCriterion : public vtkEdgeSubdivisionCriterion
{
public:
vtkTypeMacro(vtkDataSetEdgeSubdivisionCriterion,vtkEdgeSubdivisionCriterion);
static vtkDataSetEdgeSubdivisionCriterion* New();
virtual void PrintSelf( ostream& os, vtkIndent indent );
virtual void SetMesh( vtkDataSet* );
vtkDataSet* GetMesh();
//BTX
const vtkDataSet* GetMesh() const;
//ETX
virtual void SetCellId( vtkIdType cell );
vtkIdType GetCellId() const;
//BTX
vtkIdType& GetCellId();
//ETX
vtkCell* GetCell();
//BTX
const vtkCell* GetCell() const;
//ETX
virtual bool EvaluateEdge( const double* p0, double* midpt, const double* p1, int field_start );
// Description:
// Evaluate all of the fields that should be output with the
// given \a vertex and store them just past the parametric coordinates
// of \a vertex, at the offsets given by
// \p vtkEdgeSubdivisionCriterion::GetFieldOffsets() plus \a field_start.
// \a field_start contains the number of world-space coordinates (always 3)
// plus the embedding dimension (the size of the parameter-space in which
// the cell is embedded). It will range between 3 and 6, inclusive.
//
// You must have called SetCellId() before calling this routine or there
// will not be a mesh over which to evaluate the fields.
//
// You must have called \p vtkEdgeSubdivisionCriterion::PassDefaultFields()
// or \p vtkEdgeSubdivisionCriterion::PassField() or there will be no fields
// defined for the output vertex.
//
// This routine is public and returns its input argument so that it
// may be used as an argument to
// \p vtkStreamingTessellator::AdaptivelySamplekFacet():
// @verbatim
// vtkStreamingTessellator* t = vtkStreamingTessellator::New();
// vtkEdgeSubdivisionCriterion* s;
// ...
// t->AdaptivelySample1Facet( s->EvaluateFields( p0 ), s->EvaluateFields( p1 ) );
// ...
// @endverbatim
// Although this will work, using \p EvaluateFields() in this manner
// should be avoided. It's much more efficient to fetch the corner values
// for each attribute and copy them into \a p0, \a p1, ... as opposed to
// performing shape function evaluations. The only case where you wouldn't
// want to do this is when the field you are interpolating is discontinuous
// at cell borders, such as with a discontinuous galerkin method or when
// all the Gauss points for quadrature are interior to the cell.
//
// The final argument, \a weights, is the array of weights to apply to each
// point's data when interpolating the field. This is returned by
// \a vtkCell::EvaluateLocation() when evaluating the geometry.
double* EvaluateFields( double* vertex, double* weights, int field_start );
// Description:
// Evaluate either a cell or nodal field.
// This exists because of the funky way that Exodus data will be handled.
// Sure, it's a hack, but what are ya gonna do?
void EvaluatePointDataField( double* result, double* weights, int field );
void EvaluateCellDataField( double* result, double* weights, int field );
// Description:
// Get/Set the square of the allowable chord error at any edge's midpoint.
// This value is used by EvaluateEdge.
vtkSetMacro(ChordError2,double);
vtkGetMacro(ChordError2,double);
// Description:
// Get/Set the square of the allowable error magnitude for the
// scalar field \a s at any edge's midpoint.
// A value less than or equal to 0 indicates that the field
// should not be used as a criterion for subdivision.
virtual void SetFieldError2( int s, double err );
double GetFieldError2( int s ) const;
// Description:
// Tell the subdivider not to use any field values as subdivision criteria.
// Effectively calls SetFieldError2( a, -1. ) for all fields.
virtual void ResetFieldError2();
// Description:
// Return a bitfield specifying which FieldError2 criteria are positive (i.e., actively
// used to decide edge subdivisions).
// This is stored as separate state to make subdivisions go faster.
vtkGetMacro(ActiveFieldCriteria,int);
int GetActiveFieldCriteria() const { return this->ActiveFieldCriteria; }
protected:
vtkDataSetEdgeSubdivisionCriterion();
virtual ~vtkDataSetEdgeSubdivisionCriterion();
vtkDataSet* CurrentMesh;
vtkIdType CurrentCellId;
vtkCell* CurrentCellData;
double ChordError2;
double* FieldError2;
int FieldError2Length;
int FieldError2Capacity;
int ActiveFieldCriteria;
private:
vtkDataSetEdgeSubdivisionCriterion( const vtkDataSetEdgeSubdivisionCriterion& ); // Not implemented.
void operator = ( const vtkDataSetEdgeSubdivisionCriterion& ); // Not implemented.
};
//BTX
inline vtkIdType& vtkDataSetEdgeSubdivisionCriterion::GetCellId() { return this->CurrentCellId; }
inline vtkIdType vtkDataSetEdgeSubdivisionCriterion::GetCellId() const { return this->CurrentCellId; }
inline vtkDataSet* vtkDataSetEdgeSubdivisionCriterion::GetMesh() { return this->CurrentMesh; }
inline const vtkDataSet* vtkDataSetEdgeSubdivisionCriterion::GetMesh() const { return this->CurrentMesh; }
inline vtkCell* vtkDataSetEdgeSubdivisionCriterion::GetCell() { return this->CurrentCellData; }
inline const vtkCell* vtkDataSetEdgeSubdivisionCriterion::GetCell() const { return this->CurrentCellData; }
//ETX
#endif // vtkDataSetEdgeSubdivisionCriterion_h
|