VTK
vtkPixel.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPixel.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 =========================================================================*/
30 #ifndef vtkPixel_h
31 #define vtkPixel_h
32 
33 #include "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkCell.h"
35 
36 class vtkLine;
38 
40 {
41 public:
42  static vtkPixel *New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
48  int GetCellType() {return VTK_PIXEL;};
49  int GetCellDimension() {return 2;};
50  int GetNumberOfEdges() {return 4;};
51  int GetNumberOfFaces() {return 0;};
52  vtkCell *GetEdge(int edgeId);
53  vtkCell *GetFace(int) {return 0;};
54  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
55  void Contour(double value, vtkDataArray *cellScalars,
57  vtkCellArray *lines, vtkCellArray *polys,
58  vtkPointData *inPd, vtkPointData *outPd,
59  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
60  void Clip(double value, vtkDataArray *cellScalars,
62  vtkPointData *inPd, vtkPointData *outPd,
63  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
64  int insideOut);
65  int EvaluatePosition(double x[3], double* closestPoint,
66  int& subId, double pcoords[3],
67  double& dist2, double *weights);
68  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
69  double *weights);
71 
73  int GetParametricCenter(double pcoords[3]);
74 
75  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
76  double x[3], double pcoords[3], int& subId);
77  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
78  void Derivatives(int subId, double pcoords[3], double *values,
79  int dim, double *derivs);
80  virtual double *GetParametricCoords();
81 
83  static void InterpolationFunctions(double pcoords[3], double weights[4]);
85  static void InterpolationDerivs(double pcoords[3], double derivs[8]);
87 
89  virtual void InterpolateFunctions(double pcoords[3], double weights[4])
90  {
92  }
93  virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
94  {
95  vtkPixel::InterpolationDerivs(pcoords,derivs);
96  }
98 
99 protected:
102 
104 
105 private:
106  vtkPixel(const vtkPixel&); // Not implemented.
107  void operator=(const vtkPixel&); // Not implemented.
108 };
109 
110 //----------------------------------------------------------------------------
111 inline int vtkPixel::GetParametricCenter(double pcoords[3])
112 {
113  pcoords[0] = pcoords[1] = 0.5;
114  pcoords[2] = 0.0;
115  return 0;
116 }
117 
118 #endif
119 
120 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkPixel::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[4])
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
VTK_PIXEL
@ VTK_PIXEL
Definition: vtkCellType.h:52
vtkPixel::GetCellType
int GetCellType()
Definition: vtkPixel.h:48
vtkPixel::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkPixel::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkPixel.h:50
vtkPixel::GetEdge
vtkCell * GetEdge(int edgeId)
vtkPixel::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)
vtkPixel::GetParametricCenter
int GetParametricCenter(double pcoords[3])
Definition: vtkPixel.h:111
vtkPixel::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkPixel::GetFace
vtkCell * GetFace(int)
Definition: vtkPixel.h:53
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkCell.h
vtkPixel::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkPixel.h:51
vtkPixel::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkPixel::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkPixel::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPixel::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkPixel::New
static vtkPixel * New()
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
vtkPixel::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
Definition: vtkPixel.h:93
vtkPixel::Line
vtkLine * Line
Definition: vtkPixel.h:103
vtkPixel::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkPixel
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:40
vtkPixel::~vtkPixel
~vtkPixel()
vtkPixel::GetCellDimension
int GetCellDimension()
Definition: vtkPixel.h:49
vtkCell::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkPixel::Clip
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)
vtkPixel::GetParametricCoords
virtual double * GetParametricCoords()
vtkPixel::vtkPixel
vtkPixel()
vtkPixel::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[8])
vtkPixel::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[4])
Definition: vtkPixel.h:89