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

Method SetRegionVertices

Common/DataModel/vtkPlanesIntersection.cxx:43–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 this->Planes = nullptr;
42}
43void vtkPlanesIntersection::SetRegionVertices(vtkPoints* v)
44{
45 int i;
46 if (this->RegionPts)
47 {
48 this->RegionPts->Delete();
49 }
50 this->RegionPts = vtkPointsProjectedHull::New();
51
52 if (v->GetDataType() == VTK_DOUBLE)
53 {
54 this->RegionPts->DeepCopy(v);
55 }
56 else
57 {
58 this->RegionPts->SetDataTypeToDouble();
59
60 int npts = v->GetNumberOfPoints();
61 this->RegionPts->SetNumberOfPoints(npts);
62
63 double* pt;
64 for (i = 0; i < npts; i++)
65 {
66 pt = v->GetPoint(i);
67 RegionPts->SetPoint(i, pt[0], pt[1], pt[2]);
68 }
69 }
70}
71void vtkPlanesIntersection::SetRegionVertices(double* v, int nvertices)
72{
73 int i;

Callers 3

PolygonIntersectsBBoxMethod · 0.80
Convert3DCellMethod · 0.80

Calls 8

DeleteMethod · 0.65
NewFunction · 0.50
GetDataTypeMethod · 0.45
DeepCopyMethod · 0.45
GetNumberOfPointsMethod · 0.45
SetNumberOfPointsMethod · 0.45
GetPointMethod · 0.45
SetPointMethod · 0.45

Tested by 1