------------------------------------------------------------------------------
| 456 | |
| 457 | //------------------------------------------------------------------------------ |
| 458 | bool vtkPiecewiseFunction::UpdateRange() |
| 459 | { |
| 460 | double oldRange[2]; |
| 461 | oldRange[0] = this->Range[0]; |
| 462 | oldRange[1] = this->Range[1]; |
| 463 | |
| 464 | int size = static_cast<int>(this->Internal->Nodes.size()); |
| 465 | if (size) |
| 466 | { |
| 467 | this->Range[0] = this->Internal->Nodes[0]->X; |
| 468 | this->Range[1] = this->Internal->Nodes[size - 1]->X; |
| 469 | } |
| 470 | else |
| 471 | { |
| 472 | this->Range[0] = 0; |
| 473 | this->Range[1] = 0; |
| 474 | } |
| 475 | // If the rage is the same, then no need to call Modified() |
| 476 | if (oldRange[0] == this->Range[0] && oldRange[1] == this->Range[1]) |
| 477 | { |
| 478 | return false; |
| 479 | } |
| 480 | |
| 481 | this->Modified(); |
| 482 | return true; |
| 483 | } |
| 484 | |
| 485 | //------------------------------------------------------------------------------ |
| 486 | int vtkPiecewiseFunction::RemovePoint(double x) |
no test coverage detected