VTK
vtkVertex.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVertex.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 =========================================================================*/
27 #ifndef vtkVertex_h
28 #define vtkVertex_h
29 
30 #include "vtkCommonDataModelModule.h" // For export macro
31 #include "vtkCell.h"
32 
34 
36 {
37 public:
38  static vtkVertex *New();
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
46  int GetCellType() {return VTK_VERTEX;};
47  int GetCellDimension() {return 0;};
48  int GetNumberOfEdges() {return 0;};
49  int GetNumberOfFaces() {return 0;};
50  vtkCell *GetEdge(int) {return 0;};
51  vtkCell *GetFace(int) {return 0;};
52  void Clip(double value, vtkDataArray *cellScalars,
54  vtkPointData *inPd, vtkPointData *outPd,
55  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
56  int insideOut);
57  int EvaluatePosition(double x[3], double* closestPoint,
58  int& subId, double pcoords[3],
59  double& dist2, double *weights);
60  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
61  double *weights);
62  virtual double *GetParametricCoords();
64 
70  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
71 
73 
77  void Contour(double value, vtkDataArray *cellScalars,
78  vtkIncrementalPointLocator *locator, vtkCellArray *verts1,
79  vtkCellArray *lines, vtkCellArray *verts2,
80  vtkPointData *inPd, vtkPointData *outPd,
81  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
83 
85  int GetParametricCenter(double pcoords[3]);
86 
88 
91  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
92  double x[3], double pcoords[3], int& subId);
94 
97  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
98 
100 
102  void Derivatives(int subId, double pcoords[3], double *values,
103  int dim, double *derivs);
105 
107  static void InterpolationFunctions(double pcoords[3], double weights[1]);
109  static void InterpolationDerivs(double pcoords[3], double derivs[3]);
111 
113  virtual void InterpolateFunctions(double pcoords[3], double weights[1])
114  {
116  }
117  virtual void InterpolateDerivs(double pcoords[3], double derivs[3])
118  {
119  vtkVertex::InterpolationDerivs(pcoords,derivs);
120  }
122 
123 protected:
126 
127 private:
128  vtkVertex(const vtkVertex&); // Not implemented.
129  void operator=(const vtkVertex&); // Not implemented.
130 };
131 
132 //----------------------------------------------------------------------------
133 inline int vtkVertex::GetParametricCenter(double pcoords[3])
134 {
135  pcoords[0] = pcoords[1] = pcoords[2] = 0.0;
136  return 0;
137 }
138 
139 #endif
140 
141 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkVertex::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkVertex::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkVertex::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkVertex::GetEdge
vtkCell * GetEdge(int)
Definition: vtkVertex.h:50
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkVertex::~vtkVertex
~vtkVertex()
Definition: vtkVertex.h:125
vtkVertex
a cell that represents a 3D point
Definition: vtkVertex.h:36
vtkVertex::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[1])
Definition: vtkVertex.h:113
vtkCell.h
vtkVertex::GetParametricCoords
virtual double * GetParametricCoords()
vtkVertex::Contour
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts1, vtkCellArray *lines, vtkCellArray *verts2, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkVertex::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkVertex::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[3])
vtkVertex::vtkVertex
vtkVertex()
vtkVertex::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkVertex.h:49
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkVertex::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkVertex::GetFace
vtkCell * GetFace(int)
Definition: vtkVertex.h:51
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
vtkVertex::GetParametricCenter
int GetParametricCenter(double pcoords[3])
Definition: vtkVertex.h:133
vtkVertex::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkVertex::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[1])
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkVertex::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkVertex.h:48
vtkVertex::New
static vtkVertex * New()
vtkCell::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
vtkVertex::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[3])
Definition: vtkVertex.h:117
vtkVertex::Clip
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *pts, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkVertex::GetCellType
int GetCellType()
Definition: vtkVertex.h:46
vtkVertex::GetCellDimension
int GetCellDimension()
Definition: vtkVertex.h:47
VTK_VERTEX
@ VTK_VERTEX
Definition: vtkCellType.h:45
vtkVertex::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)