| 600 | } |
| 601 | |
| 602 | void vtkVolumeProperty::SetComponentWeight(int index, double value) |
| 603 | { |
| 604 | if (index < 0 || index >= VTK_MAX_VRCOMP) |
| 605 | { |
| 606 | vtkErrorMacro("Invalid index"); |
| 607 | return; |
| 608 | } |
| 609 | |
| 610 | double val = std::min(std::max(value, 0.0), 1.0); |
| 611 | if (this->ComponentWeight[index] != val) |
| 612 | { |
| 613 | this->ComponentWeight[index] = val; |
| 614 | this->Modified(); |
| 615 | } |
| 616 | } |
| 617 | |
| 618 | //------------------------------------------------------------------------------ |
| 619 | double vtkVolumeProperty::GetComponentWeight(int index) |