MCPcopy Create free account
hub / github.com/Kitware/VTK / Contour

Method Contour

Common/DataModel/vtkTriangleStrip.cxx:129–160  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

127
128//------------------------------------------------------------------------------
129void vtkTriangleStrip::Contour(double value, vtkDataArray* cellScalars,
130 vtkIncrementalPointLocator* locator, vtkCellArray* verts, vtkCellArray* lines,
131 vtkCellArray* polys, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId,
132 vtkCellData* outCd)
133{
134 int i, numTris = this->Points->GetNumberOfPoints() - 2;
135 vtkDataArray* triScalars = cellScalars->NewInstance();
136 triScalars->SetNumberOfComponents(cellScalars->GetNumberOfComponents());
137 triScalars->SetNumberOfTuples(3);
138
139 for (i = 0; i < numTris; i++)
140 {
141 this->Triangle->Points->SetPoint(0, this->Points->GetPoint(i));
142 this->Triangle->Points->SetPoint(1, this->Points->GetPoint(i + 1));
143 this->Triangle->Points->SetPoint(2, this->Points->GetPoint(i + 2));
144
145 if (outPd)
146 {
147 this->Triangle->PointIds->SetId(0, this->PointIds->GetId(i));
148 this->Triangle->PointIds->SetId(1, this->PointIds->GetId(i + 1));
149 this->Triangle->PointIds->SetId(2, this->PointIds->GetId(i + 2));
150 }
151
152 triScalars->SetTuple(0, cellScalars->GetTuple(i));
153 triScalars->SetTuple(1, cellScalars->GetTuple(i + 1));
154 triScalars->SetTuple(2, cellScalars->GetTuple(i + 2));
155
156 this->Triangle->Contour(
157 value, triScalars, locator, verts, lines, polys, inPd, outPd, inCd, cellId, outCd);
158 }
159 triScalars->Delete();
160}
161
162//------------------------------------------------------------------------------
163vtkCell* vtkTriangleStrip::GetEdge(int edgeId)

Callers

nothing calls this directly

Calls 12

DeleteMethod · 0.65
GetNumberOfPointsMethod · 0.45
NewInstanceMethod · 0.45
SetNumberOfComponentsMethod · 0.45
GetNumberOfComponentsMethod · 0.45
SetNumberOfTuplesMethod · 0.45
SetPointMethod · 0.45
GetPointMethod · 0.45
SetIdMethod · 0.45
GetIdMethod · 0.45
SetTupleMethod · 0.45
GetTupleMethod · 0.45

Tested by

no test coverage detected