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

Method RandomGeneration

Filters/Modeling/vtkPolyDataPointSampler.cxx:404–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402 vtkNew<vtkMinimalStandardRandomSequence> RandomSeq;
403
404 RandomGeneration(vtkPolyDataPointSampler* self, double d, vtkIdType numPts, vtkPoints* inPts,
405 vtkPoints* newPts, vtkPointData* inPD, vtkPointData* outPD, vtkCellArray* inLines,
406 vtkCellArray* inPolys, vtkCellArray* inStrips)
407 : GeneratePoints(self, d, numPts, inPts, newPts, inPD, outPD, inLines, inPolys, inStrips)
408 {
409 double bounds[6];
410 this->InPts->GetBounds(bounds);
411 this->Length = sqrt((bounds[1] - bounds[0]) * (bounds[1] - bounds[0]) +
412 (bounds[3] - bounds[2]) * (bounds[3] - bounds[2]) +
413 (bounds[5] - bounds[4]) * (bounds[5] - bounds[4]));
414 this->Length = (this->Length <= 0.0 ? 1.0 : this->Length);
415 this->RandomSeq->Initialize(1177);
416 }
417
418 // Internal methods for sampling edges, triangles, and polygons
419 void SamplePoints() override

Callers

nothing calls this directly

Calls 3

sqrtFunction · 0.50
GetBoundsMethod · 0.45
InitializeMethod · 0.45

Tested by

no test coverage detected