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 =========================================================================*/
28 #ifndef vtkVertex_h
29 #define vtkVertex_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkCell.h"
33 
35 
36 class VTKCOMMONDATAMODEL_EXPORT vtkVertex : public vtkCell
37 {
38 public:
39  static vtkVertex *New();
40  vtkTypeMacro(vtkVertex,vtkCell);
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
51  int GetCellType() VTK_OVERRIDE {return VTK_VERTEX;};
52  int GetCellDimension() VTK_OVERRIDE {return 0;};
53  int GetNumberOfEdges() VTK_OVERRIDE {return 0;};
54  int GetNumberOfFaces() VTK_OVERRIDE {return 0;};
55  vtkCell *GetEdge(int) VTK_OVERRIDE {return 0;};
56  vtkCell *GetFace(int) VTK_OVERRIDE {return 0;};
57  void Clip(double value, vtkDataArray *cellScalars,
59  vtkPointData *inPd, vtkPointData *outPd,
60  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
61  int insideOut) VTK_OVERRIDE;
62  int EvaluatePosition(double x[3], double* closestPoint,
63  int& subId, double pcoords[3],
64  double& dist2, double *weights) VTK_OVERRIDE;
65  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
66  double *weights) VTK_OVERRIDE;
67  double *GetParametricCoords() VTK_OVERRIDE;
69 
77  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts) VTK_OVERRIDE;
78 
85  void Contour(double value, vtkDataArray *cellScalars,
86  vtkIncrementalPointLocator *locator, vtkCellArray *verts1,
87  vtkCellArray *lines, vtkCellArray *verts2,
88  vtkPointData *inPd, vtkPointData *outPd,
89  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd) VTK_OVERRIDE;
90 
94  int GetParametricCenter(double pcoords[3]) VTK_OVERRIDE;
95 
101  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
102  double x[3], double pcoords[3], int& subId) VTK_OVERRIDE;
103 
108  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts) VTK_OVERRIDE;
109 
114  void Derivatives(int subId, double pcoords[3], double *values,
115  int dim, double *derivs) VTK_OVERRIDE;
116 
120  static void InterpolationFunctions(double pcoords[3], double weights[1]);
124  static void InterpolationDerivs(double pcoords[3], double derivs[3]);
126 
130  void InterpolateFunctions(double pcoords[3], double weights[1]) VTK_OVERRIDE
131  {
132  vtkVertex::InterpolationFunctions(pcoords,weights);
133  }
134  void InterpolateDerivs(double pcoords[3], double derivs[3]) VTK_OVERRIDE
135  {
136  vtkVertex::InterpolationDerivs(pcoords,derivs);
137  }
139 
140 protected:
141  vtkVertex();
142  ~vtkVertex() VTK_OVERRIDE {}
143 
144 private:
145  vtkVertex(const vtkVertex&) VTK_DELETE_FUNCTION;
146  void operator=(const vtkVertex&) VTK_DELETE_FUNCTION;
147 };
148 
149 //----------------------------------------------------------------------------
150 inline int vtkVertex::GetParametricCenter(double pcoords[3])
151 {
152  pcoords[0] = pcoords[1] = pcoords[2] = 0.0;
153  return 0;
154 }
155 
156 #endif
157 
158 
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCell * GetFace(int) override
Make a new vtkVertex object with the same information as this object.
Definition: vtkVertex.h:56
represent and manipulate point attribute data
Definition: vtkPointData.h:37
a cell that represents a 3D point
Definition: vtkVertex.h:36
virtual double * GetParametricCoords()
Return a contiguous array of parametric coordinates of the points defining this cell.
static void InterpolationFunctions(double pcoords[3], double weights[1])
int GetCellDimension() override
Make a new vtkVertex object with the same information as this object.
Definition: vtkVertex.h:52
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
Abstract class in support of both point location and point insertion.
virtual void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)=0
Determine global coordinate (x[3]) from subId and parametric coordinates.
virtual int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)=0
Given a point x[3] return inside(=1), outside(=0) cell, or (-1) computational problem encountered; ev...
int vtkIdType
Definition: vtkType.h:287
void InterpolateDerivs(double pcoords[3], double derivs[3]) override
Compute the interpolation functions/derivatives (aka shape functions/derivatives) ...
Definition: vtkVertex.h:134
abstract class to specify cell behavior
Definition: vtkCell.h:59
static void InterpolationDerivs(double pcoords[3], double derivs[3])
int GetNumberOfFaces() override
Make a new vtkVertex object with the same information as this object.
Definition: vtkVertex.h:54
~vtkVertex() override
Definition: vtkVertex.h:142
a simple class to control print indentation
Definition: vtkIndent.h:39
list of point or cell ids
Definition: vtkIdList.h:36
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)=0
Cut (or clip) the cell based on the input cellScalars and the specified value.
object to represent cell connectivity
Definition: vtkCellArray.h:50
int GetNumberOfEdges() override
Make a new vtkVertex object with the same information as this object.
Definition: vtkVertex.h:53
vtkCell * GetEdge(int) override
Make a new vtkVertex object with the same information as this object.
Definition: vtkVertex.h:55
int Contour(vtkDataSet *input, vtkPolyData *output, vtkDataArray *field, float isoValue, bool computeScalars)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
int GetCellType() override
Make a new vtkVertex object with the same information as this object.
Definition: vtkVertex.h:51
represent and manipulate 3D points
Definition: vtkPoints.h:39