OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkQuad.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkQuad.h,v $
5   Language:  C++
6   Date:      $Date: 2002/12/26 18:24:22 $
7   Version:   $Revision: 1.63 $
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 vtkQuad - a cell that represents a 2D quadrilateral
19 // .SECTION Description
20 // vtkQuad is a concrete implementation of vtkCell to represent a 2D 
21 // quadrilateral. vtkQuad is defined by the four points (0,1,2,3) in
22 // counterclockwise order. vtkQuad uses the standard isoparametric
23 // interpolation functions for a linear quadrilateral.
24
25 #ifndef __vtkQuad_h
26 #define __vtkQuad_h
27
28 #include "vtkCell.h"
29
30 class vtkLine;
31
32 class VTK_COMMON_EXPORT vtkQuad : public vtkCell
33 {
34 public:
35   static vtkQuad *New();
36   vtkTypeRevisionMacro(vtkQuad,vtkCell);
37
38   // Description:
39   // See the vtkCell API for descriptions of these methods.
40   int GetCellType() {return VTK_QUAD;};
41   int GetCellDimension() {return 2;};
42   int GetNumberOfEdges() {return 4;};
43   int GetNumberOfFaces() {return 0;};
44   vtkCell *GetEdge(int edgeId);
45   vtkCell *GetFace(int) {return 0;};
46   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
47   void Contour(float value, vtkDataArray *cellScalars, 
48                vtkPointLocator *locator, vtkCellArray *verts, 
49                vtkCellArray *lines, vtkCellArray *polys,
50                vtkPointData *inPd, vtkPointData *outPd,
51                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
52   int EvaluatePosition(float x[3], float* closestPoint,
53                        int& subId, float pcoords[3],
54                        float& dist2, float *weights);
55   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
56                         float *weights);
57   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
58                         float x[3], float pcoords[3], int& subId);
59   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
60   void Derivatives(int subId, float pcoords[3], float *values, 
61                    int dim, float *derivs);
62
63   // Description:
64   // Clip this quad using scalar value provided. Like contouring, except
65   // that it cuts the quad to produce other quads and/or triangles.
66   void Clip(float value, vtkDataArray *cellScalars, 
67             vtkPointLocator *locator, vtkCellArray *polys,
68             vtkPointData *inPd, vtkPointData *outPd,
69             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
70             int insideOut);
71
72   // Description:
73   // vtkQuad specific methods.
74   static void InterpolationFunctions(float pcoords[3], float sf[4]);
75   static void InterpolationDerivs(float pcoords[3], float derivs[8]);
76
77
78 protected:
79   vtkQuad();
80   ~vtkQuad();
81
82   vtkLine *Line;
83
84 private:
85   vtkQuad(const vtkQuad&);  // Not implemented.
86   void operator=(const vtkQuad&);  // Not implemented.
87 };
88
89 #endif
90
91