OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkVertex.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkVertex.h,v $
5   Language:  C++
6   Date:      $Date: 2002/11/12 18:55:41 $
7   Version:   $Revision: 1.60 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
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.
21
22 #ifndef __vtkVertex_h
23 #define __vtkVertex_h
24
25 #include "vtkCell.h"
26
27 class VTK_COMMON_EXPORT vtkVertex : public vtkCell
28 {
29 public:
30   static vtkVertex *New();
31   vtkTypeRevisionMacro(vtkVertex,vtkCell);
32   
33   // Description:
34   // Make a new vtkVertex object with the same information as this object.
35
36   // Description:
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,
48             int insideOut);
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],
53                         float *weights);
54
55   // Description:
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
60   // inside the cell.
61   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
62
63   // Description:
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 
67   // duplicates). 
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);
73
74   // Description:
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);
80   
81   // Description:
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);
85
86   // Description:
87   // Get the derivative of the vertex. Returns (0.0, 0.0, 0.0) for all 
88   // dimensions.
89   void Derivatives(int subId, float pcoords[3], float *values, 
90                    int dim, float *derivs);
91
92   // Description:
93   // Vertex specific methods.
94   static void InterpolationFunctions(float pcoords[3], float weights[1]);
95
96 protected:
97   vtkVertex();
98   ~vtkVertex() {};
99   
100 private:
101   vtkVertex(const vtkVertex&);  // Not implemented.
102   void operator=(const vtkVertex&);  // Not implemented.
103 };
104
105 #endif
106
107