1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkVertex.h,v $
6 Date: $Date: 2002/11/12 18:55:41 $
7 Version: $Revision: 1.60 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkVertex - a cell that represents a 3D point
19 // .SECTION Description
20 // vtkVertex is a concrete implementation of vtkCell to represent a 3D point.
27 class VTK_COMMON_EXPORT vtkVertex : public vtkCell
30 static vtkVertex *New();
31 vtkTypeRevisionMacro(vtkVertex,vtkCell);
34 // Make a new vtkVertex object with the same information as this object.
37 // See the vtkCell API for descriptions of these methods.
38 int GetCellType() {return VTK_VERTEX;};
39 int GetCellDimension() {return 0;};
40 int GetNumberOfEdges() {return 0;};
41 int GetNumberOfFaces() {return 0;};
42 vtkCell *GetEdge(int) {return 0;};
43 vtkCell *GetFace(int) {return 0;};
44 void Clip(float value, vtkDataArray *cellScalars,
45 vtkPointLocator *locator, vtkCellArray *pts,
46 vtkPointData *inPd, vtkPointData *outPd,
47 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
49 int EvaluatePosition(float x[3], float* closestPoint,
50 int& subId, float pcoords[3],
51 float& dist2, float *weights);
52 void EvaluateLocation(int& subId, float pcoords[3], float x[3],
56 // Given parametric coordinates of a point, return the closest cell
57 // boundary, and whether the point is inside or outside of the cell. The
58 // cell boundary is defined by a list of points (pts) that specify a vertex
59 // (1D cell). If the return value of the method is != 0, then the point is
61 int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
64 // Generate contouring primitives. The scalar list cellScalars are
65 // scalar values at each cell point. The point locator is essentially a
66 // points list that merges points as they are inserted (i.e., prevents
68 void Contour(float value, vtkDataArray *cellScalars,
69 vtkPointLocator *locator, vtkCellArray *verts1,
70 vtkCellArray *lines, vtkCellArray *verts2,
71 vtkPointData *inPd, vtkPointData *outPd,
72 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
75 // Intersect with a ray. Return parametric coordinates (both line and cell)
76 // and global intersection coordinates, given ray definition and tolerance.
77 // The method returns non-zero value if intersection occurs.
78 int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
79 float x[3], float pcoords[3], int& subId);
82 // Triangulate the vertex. This method fills pts and ptIds with information
83 // from the only point in the vertex.
84 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
87 // Get the derivative of the vertex. Returns (0.0, 0.0, 0.0) for all
89 void Derivatives(int subId, float pcoords[3], float *values,
90 int dim, float *derivs);
93 // Vertex specific methods.
94 static void InterpolationFunctions(float pcoords[3], float weights[1]);
101 vtkVertex(const vtkVertex&); // Not implemented.
102 void operator=(const vtkVertex&); // Not implemented.