Internal methods for sampling edges, triangles, and polygons
| 417 | |
| 418 | // Internal methods for sampling edges, triangles, and polygons |
| 419 | void SamplePoints() override |
| 420 | { |
| 421 | // First the vertex points |
| 422 | double ranVal, frac = (this->Distance / std::pow(this->Length, 0.3333)); |
| 423 | for (auto i = 0; i < this->NumPts; ++i) |
| 424 | { |
| 425 | ranVal = this->RandomSeq->GetValue(); |
| 426 | this->RandomSeq->Next(); |
| 427 | if (ranVal <= frac) |
| 428 | { // insert point |
| 429 | this->OutPts->InsertNextPoint(this->InPts->GetPoint(i)); |
| 430 | if (this->InPD) |
| 431 | { |
| 432 | this->OutPD->CopyData(this->InPD, i, i); |
| 433 | } |
| 434 | } |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | void SampleEdge(vtkIdType p0, vtkIdType p1) override |
| 439 | { |
no test coverage detected