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
36class VTKCOMMONDATAMODEL_EXPORT vtkVertex : public vtkCell
37{
38public:
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,
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
140protected:
142 ~vtkVertex() VTK_OVERRIDE {}
143
144private:
145 vtkVertex(const vtkVertex&) VTK_DELETE_FUNCTION;
146 void operator=(const vtkVertex&) VTK_DELETE_FUNCTION;
147};
148
149//----------------------------------------------------------------------------
150inline 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
object to represent cell connectivity
Definition: vtkCellArray.h:51
represent and manipulate cell attribute data
Definition: vtkCellData.h:39
abstract class to specify cell behavior
Definition: vtkCell.h:60
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
list of point or cell ids
Definition: vtkIdList.h:37
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate point attribute data
Definition: vtkPointData.h:38
represent and manipulate 3D points
Definition: vtkPoints.h:40
a cell that represents a 3D point
Definition: vtkVertex.h:37
double * GetParametricCoords() override
Return a contiguous array of parametric coordinates of the points defining this cell.
~vtkVertex() override
Definition: vtkVertex.h:142
vtkCell * GetEdge(int) override
Return the edge cell from the edgeId of the cell.
Definition: vtkVertex.h:55
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights) override
Determine global coordinate (x[3]) from subId and parametric coordinates.
int GetNumberOfFaces() override
Return the number of faces in the cell.
Definition: vtkVertex.h:54
vtkCell * GetFace(int) override
Return the face cell from the faceId of the cell.
Definition: vtkVertex.h:56
int GetCellDimension() override
Return the topological dimensional of the cell (0,1,2, or 3).
Definition: vtkVertex.h:52
int GetParametricCenter(double pcoords[3]) override
Return the center of the triangle in parametric coordinates.
Definition: vtkVertex.h:150
static void InterpolationFunctions(double pcoords[3], double weights[1])
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights) override
Given a point x[3] return inside(=1), outside(=0) cell, or (-1) computational problem encountered; ev...
void InterpolateDerivs(double pcoords[3], double derivs[3]) override
Definition: vtkVertex.h:134
static void InterpolationDerivs(double pcoords[3], double derivs[3])
int GetNumberOfEdges() override
Return the number of edges in the cell.
Definition: vtkVertex.h:53
static vtkVertex * New()
int GetCellType() override
Make a new vtkVertex object with the same information as this object.
Definition: vtkVertex.h:51
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *pts, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut) override
Cut (or clip) the cell based on the input cellScalars and the specified value.
int Contour(vtkDataSet *input, vtkPolyData *output, vtkDataArray *field, float isoValue, bool computeScalars)
@ value
Definition: vtkX3D.h:220
@ index
Definition: vtkX3D.h:246
@ VTK_VERTEX
Definition: vtkCellType.h:46
int vtkIdType
Definition: vtkType.h:287