| 41 | this->Planes = nullptr; |
| 42 | } |
| 43 | void 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 | } |
| 71 | void vtkPlanesIntersection::SetRegionVertices(double* v, int nvertices) |
| 72 | { |
| 73 | int i; |