VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkVertex.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00027 #ifndef __vtkVertex_h 00028 #define __vtkVertex_h 00029 00030 #include "vtkCell.h" 00031 00032 class vtkIncrementalPointLocator; 00033 00034 class VTK_FILTERING_EXPORT vtkVertex : public vtkCell 00035 { 00036 public: 00037 static vtkVertex *New(); 00038 vtkTypeMacro(vtkVertex,vtkCell); 00039 void PrintSelf(ostream& os, vtkIndent indent); 00040 00045 int GetCellType() {return VTK_VERTEX;}; 00046 int GetCellDimension() {return 0;}; 00047 int GetNumberOfEdges() {return 0;}; 00048 int GetNumberOfFaces() {return 0;}; 00049 vtkCell *GetEdge(int) {return 0;}; 00050 vtkCell *GetFace(int) {return 0;}; 00051 void Clip(double value, vtkDataArray *cellScalars, 00052 vtkIncrementalPointLocator *locator, vtkCellArray *pts, 00053 vtkPointData *inPd, vtkPointData *outPd, 00054 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, 00055 int insideOut); 00056 int EvaluatePosition(double x[3], double* closestPoint, 00057 int& subId, double pcoords[3], 00058 double& dist2, double *weights); 00059 void EvaluateLocation(int& subId, double pcoords[3], double x[3], 00060 double *weights); 00061 virtual double *GetParametricCoords(); 00063 00069 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts); 00070 00072 00076 void Contour(double value, vtkDataArray *cellScalars, 00077 vtkIncrementalPointLocator *locator, vtkCellArray *verts1, 00078 vtkCellArray *lines, vtkCellArray *verts2, 00079 vtkPointData *inPd, vtkPointData *outPd, 00080 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd); 00082 00084 int GetParametricCenter(double pcoords[3]); 00085 00087 00090 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t, 00091 double x[3], double pcoords[3], int& subId); 00093 00096 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts); 00097 00099 00101 void Derivatives(int subId, double pcoords[3], double *values, 00102 int dim, double *derivs); 00104 00106 00107 static void InterpolationFunctions(double pcoords[3], double weights[1]); 00108 // Description: 00109 // @deprecated Replaced by vtkVertex::InterpolateDerivs as of VTK 5.2 00110 static void InterpolationDerivs(double pcoords[3], double derivs[3]); 00111 // Description: 00112 // Compute the interpolation functions/derivatives 00113 // (aka shape functions/derivatives) 00114 virtual void InterpolateFunctions(double pcoords[3], double weights[1]) 00115 { 00116 vtkVertex::InterpolationFunctions(pcoords,weights); 00117 } 00118 virtual void InterpolateDerivs(double pcoords[3], double derivs[3]) 00119 { 00120 vtkVertex::InterpolationDerivs(pcoords,derivs); 00121 } 00123 00124 protected: 00125 vtkVertex(); 00126 ~vtkVertex() {}; 00127 00128 private: 00129 vtkVertex(const vtkVertex&); // Not implemented. 00130 void operator=(const vtkVertex&); // Not implemented. 00131 }; 00132 00133 //---------------------------------------------------------------------------- 00134 inline int vtkVertex::GetParametricCenter(double pcoords[3]) 00135 { 00136 pcoords[0] = pcoords[1] = pcoords[2] = 0.0; 00137 return 0; 00138 } 00139 00140 #endif 00141 00142