Common/vtkGenericCell.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkGenericCell.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkGenericCell.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00047 #ifndef __vtkGenericCell_h
    00048 #define __vtkGenericCell_h
    00049
    00050 #include "vtkCell.h"
    00051
    00052 class VTK_COMMON_EXPORT vtkGenericCell : public vtkCell
    00053 {
    00054 public:
    00056   static vtkGenericCell *New();
    00057
    00058   vtkTypeRevisionMacro(vtkGenericCell,vtkCell);
    00059
    00061
    00062   void ShallowCopy(vtkCell *c);
    00063   void DeepCopy(vtkCell *c);
    00064   int GetCellType();
    00065   int GetCellDimension();
    00066   int IsLinear();
    00067   int RequiresInitialization();
    00068   void Initialize();
    00069   int GetNumberOfEdges();
    00070   int GetNumberOfFaces();
    00071   vtkCell *GetEdge(int edgeId);
    00072   vtkCell *GetFace(int faceId);
    00073   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
    00074   int EvaluatePosition(float x[3], float* closestPoint,
    00075                        int& subId, float pcoords[3],
    00076                        float& dist2, float *weights);
    00077   void EvaluateLocation(int& subId, float pcoords[3],
    00078                         float x[3], float *weights);
    00079   void Contour(float value, vtkDataArray *cellScalars,
    00080                vtkPointLocator *locator, vtkCellArray *verts,
    00081                vtkCellArray *lines, vtkCellArray *polys,
    00082                vtkPointData *inPd, vtkPointData *outPd,
    00083                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
    00084   void Clip(float value, vtkDataArray *cellScalars,
    00085             vtkPointLocator *locator, vtkCellArray *connectivity,
    00086             vtkPointData *inPd, vtkPointData *outPd,
    00087             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
    00088             int insideOut);
    00089   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
    00090                         float x[3], float pcoords[3], int& subId);
    00091   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
    00092   void Derivatives(int subId, float pcoords[3], float *values,
    00093                    int dim, float *derivs);
    00094   int GetParametricCenter(float pcoords[3]);
    00096
    00098
    00103   void SetCellType(int cellType);
    00104   void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
    00105   void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
    00106   void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
    00107   void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
    00108   void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
    00109   void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
    00110   void SetCellTypeToTriangleStrip() {this->SetCellType(VTK_TRIANGLE_STRIP);}
    00111   void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
    00112   void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
    00113   void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
    00114   void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
    00115   void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
    00116   void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
    00117   void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
    00118   void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
    00119   void SetCellTypeToConvexPointSet() {this->SetCellType(VTK_CONVEX_POINT_SET);}
    00120   void SetCellTypeToQuadraticEdge() {this->SetCellType(VTK_QUADRATIC_EDGE);}
    00121   void SetCellTypeToQuadraticTriangle() {this->SetCellType(VTK_QUADRATIC_TRIANGLE);}
    00122   void SetCellTypeToQuadraticQuad() {this->SetCellType(VTK_QUADRATIC_QUAD);}
    00123   void SetCellTypeToQuadraticTetra() {this->SetCellType(VTK_QUADRATIC_TETRA);}
    00124   void SetCellTypeToQuadraticHexahedron() {this->SetCellType(VTK_QUADRATIC_HEXAHEDRON);}
    00126
    00127 protected:
    00128   vtkGenericCell();
    00129   ~vtkGenericCell();
    00130
    00131   vtkCell *Cell;
    00132
    00133 private:
    00134   vtkGenericCell(const vtkGenericCell&);  // Not implemented.
    00135   void operator=(const vtkGenericCell&);  // Not implemented.
    00136 };
    00137
    00138 #endif
    00139
    00140