VTK
vtkCubicLine.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCubicLine.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef vtkCubicLine_h
36 #define vtkCubicLine_h
37 
38 #include "vtkCommonDataModelModule.h" // For export macro
39 #include "vtkNonLinearCell.h"
40 
41 class vtkLine;
42 class vtkDoubleArray;
43 
45 {
46 public:
47  static vtkCubicLine *New();
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
53  int GetCellType() {return VTK_CUBIC_LINE;};
54  int GetCellDimension() {return 1;};
55  int GetNumberOfEdges() {return 0;};
56  int GetNumberOfFaces() {return 0;};
57  vtkCell *GetEdge(int) {return 0;};
58  vtkCell *GetFace(int) {return 0;};
59  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
60  void Contour(double value, vtkDataArray *cellScalars,
62  vtkCellArray *lines, vtkCellArray *polys,
63  vtkPointData *inPd, vtkPointData *outPd,
64  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
65  int EvaluatePosition(double x[3], double* closestPoint,
66  int& subId, double pcoords[3],
67  double& dist2, double *weights);
68  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
69  double *weights);
70  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
71  void Derivatives(int subId, double pcoords[3], double *values,
72  int dim, double *derivs);
73  virtual double *GetParametricCoords();
75 
78  double GetParametricDistance(double pcoords[3]);
79 
81 
83  void Clip(double value, vtkDataArray *cellScalars,
85  vtkPointData *inPd, vtkPointData *outPd,
86  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
87  int insideOut);
89 
91  int GetParametricCenter(double pcoords[3]);
92 
94 
96  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
97  double x[3], double pcoords[3], int& subId);
99 
100 
101 
104  static void InterpolationFunctions(double pcoords[3], double weights[4]);
106  static void InterpolationDerivs(double pcoords[3], double derivs[4]);
108 
110  virtual void InterpolateFunctions(double pcoords[3], double weights[4])
111  {
113  }
114  virtual void InterpolateDerivs(double pcoords[3], double derivs[4])
115  {
116  vtkCubicLine::InterpolationDerivs(pcoords,derivs);
117  }
119 
120 protected:
123 
125  vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
126 
127 private:
128  vtkCubicLine(const vtkCubicLine&); // Not implemented.
129  void operator=(const vtkCubicLine&); // Not implemented.
130 };
131 
132 //----------------------------------------------------------------------------
133 inline int vtkCubicLine::GetParametricCenter(double pcoords[3])
134 {
135 
136  pcoords[0]=pcoords[1] = pcoords[2] = 0.0;
137  return 0;
138 }
139 
140 #endif
141 
142 
143 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkCubicLine::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkCubicLine::GetCellDimension
int GetCellDimension()
Definition: vtkCubicLine.h:54
vtkCubicLine::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkCubicLine::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkCubicLine::New
static vtkCubicLine * New()
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkCubicLine::Line
vtkLine * Line
Definition: vtkCubicLine.h:124
vtkCubicLine::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[4])
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkCubicLine::GetEdge
vtkCell * GetEdge(int)
Definition: vtkCubicLine.h:57
vtkCubicLine::~vtkCubicLine
~vtkCubicLine()
vtkCubicLine::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkCubicLine::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkCubicLine::vtkCubicLine
vtkCubicLine()
vtkCubicLine::GetParametricCoords
virtual double * GetParametricCoords()
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkCubicLine::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkCubicLine::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkCubicLine.h:55
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCubicLine
cell represents a cubic , isoparametric 1D line
Definition: vtkCubicLine.h:45
vtkCubicLine::GetParametricDistance
double GetParametricDistance(double pcoords[3])
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:54
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkCubicLine::Clip
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *lines, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)
vtkCubicLine::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[4])
vtkCubicLine::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[4])
Definition: vtkCubicLine.h:114
vtkCubicLine::GetFace
vtkCell * GetFace(int)
Definition: vtkCubicLine.h:58
vtkCubicLine::Scalars
vtkDoubleArray * Scalars
Definition: vtkCubicLine.h:125
vtkCubicLine::GetParametricCenter
int GetParametricCenter(double pcoords[3])
Definition: vtkCubicLine.h:133
vtkNonLinearCell.h
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
VTK_CUBIC_LINE
@ VTK_CUBIC_LINE
Definition: vtkCellType.h:80
vtkCubicLine::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkCubicLine.h:56
vtkNonLinearCell
abstract superclass for non-linear cells
Definition: vtkNonLinearCell.h:36
vtkCubicLine::Contour
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)
vtkCell::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
vtkCubicLine::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkCubicLine::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[4])
Definition: vtkCubicLine.h:110
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:49
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkCubicLine::GetCellType
int GetCellType()
Definition: vtkCubicLine.h:53