VTK
vtkQuadraticEdge.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuadraticEdge.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
33 #ifndef vtkQuadraticEdge_h
34 #define vtkQuadraticEdge_h
35 
36 #include "vtkCommonDataModelModule.h" // For export macro
37 #include "vtkNonLinearCell.h"
38 
39 class vtkLine;
40 class vtkDoubleArray;
41 
43 {
44 public:
45  static vtkQuadraticEdge *New();
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
53  int GetCellDimension() {return 1;}
54  int GetNumberOfEdges() {return 0;}
55  int GetNumberOfFaces() {return 0;}
56  vtkCell *GetEdge(int) {return 0;}
57  vtkCell *GetFace(int) {return 0;}
59 
60  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
61  void Contour(double value, vtkDataArray *cellScalars,
63  vtkCellArray *lines, vtkCellArray *polys,
64  vtkPointData *inPd, vtkPointData *outPd,
65  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
66  int EvaluatePosition(double x[3], double* closestPoint,
67  int& subId, double pcoords[3],
68  double& dist2, double *weights);
69  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
70  double *weights);
71  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
72  void Derivatives(int subId, double pcoords[3], double *values,
73  int dim, double *derivs);
74  virtual double *GetParametricCoords();
75 
77 
79  void Clip(double value, vtkDataArray *cellScalars,
81  vtkPointData *inPd, vtkPointData *outPd,
82  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
83  int insideOut);
85 
87 
89  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
90  double x[3], double pcoords[3], int& subId);
92 
94  int GetParametricCenter(double pcoords[3]);
95 
98  static void InterpolationFunctions(double pcoords[3], double weights[3]);
101  static void InterpolationDerivs(double pcoords[3], double derivs[3]);
103 
105  virtual void InterpolateFunctions(double pcoords[3], double weights[3])
106  {
108  }
109  virtual void InterpolateDerivs(double pcoords[3], double derivs[3])
110  {
112  }
114 
115 protected:
118 
120  vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
121 
122 private:
123  vtkQuadraticEdge(const vtkQuadraticEdge&); // Not implemented.
124  void operator=(const vtkQuadraticEdge&); // Not implemented.
125 };
126 //----------------------------------------------------------------------------
127 inline int vtkQuadraticEdge::GetParametricCenter(double pcoords[3])
128 {
129  pcoords[0] = 0.5;
130  pcoords[1] = pcoords[2] = 0.;
131  return 0;
132 }
133 
134 #endif
135 
136 
vtkQuadraticEdge::GetEdge
vtkCell * GetEdge(int)
Definition: vtkQuadraticEdge.h:56
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkQuadraticEdge::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkQuadraticEdge::Line
vtkLine * Line
Definition: vtkQuadraticEdge.h:119
vtkQuadraticEdge::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkQuadraticEdge.h:55
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkQuadraticEdge::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkQuadraticEdge::Contour
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)
vtkQuadraticEdge::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkQuadraticEdge::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkQuadraticEdge::GetCellDimension
int GetCellDimension()
Definition: vtkQuadraticEdge.h:53
vtkQuadraticEdge::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkQuadraticEdge::GetFace
vtkCell * GetFace(int)
Definition: vtkQuadraticEdge.h:57
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkQuadraticEdge::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkQuadraticEdge.h:54
vtkQuadraticEdge::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[3])
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkQuadraticEdge::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkQuadraticEdge::vtkQuadraticEdge
vtkQuadraticEdge()
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkQuadraticEdge::Clip
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *lines, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkQuadraticEdge::Scalars
vtkDoubleArray * Scalars
Definition: vtkQuadraticEdge.h:120
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:54
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkQuadraticEdge::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
VTK_QUADRATIC_EDGE
@ VTK_QUADRATIC_EDGE
Definition: vtkCellType.h:63
vtkQuadraticEdge::GetParametricCoords
virtual double * GetParametricCoords()
vtkNonLinearCell.h
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkQuadraticEdge::~vtkQuadraticEdge
~vtkQuadraticEdge()
vtkNonLinearCell
abstract superclass for non-linear cells
Definition: vtkNonLinearCell.h:36
vtkQuadraticEdge::GetParametricCenter
int GetParametricCenter(double pcoords[3])
Definition: vtkQuadraticEdge.h:127
vtkCell::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
vtkQuadraticEdge::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[3])
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:49
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkQuadraticEdge::New
static vtkQuadraticEdge * New()
vtkQuadraticEdge::GetCellType
int GetCellType()
Definition: vtkQuadraticEdge.h:52
vtkQuadraticEdge::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[3])
Definition: vtkQuadraticEdge.h:109
vtkQuadraticEdge
cell represents a parabolic, isoparametric edge
Definition: vtkQuadraticEdge.h:43
vtkQuadraticEdge::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[3])
Definition: vtkQuadraticEdge.h:105