------------------------------------------------------------------------------
| 1739 | |
| 1740 | //------------------------------------------------------------------------------ |
| 1741 | void vtkDataSetAttributes::SetCopyAttribute(int index, int value, int ctype) |
| 1742 | { |
| 1743 | if (index < 0 || ctype < 0 || index >= vtkDataSetAttributes::NUM_ATTRIBUTES || |
| 1744 | ctype > vtkDataSetAttributes::ALLCOPY) |
| 1745 | { |
| 1746 | vtkErrorMacro("Cannot set copy attribute for attribute type " |
| 1747 | << index << " and copy operation " << ctype << ". These values are out of range."); |
| 1748 | return; |
| 1749 | } |
| 1750 | |
| 1751 | if (ctype == vtkDataSetAttributes::ALLCOPY) |
| 1752 | { |
| 1753 | for (int t = COPYTUPLE; t < vtkDataSetAttributes::ALLCOPY; ++t) |
| 1754 | { |
| 1755 | if (this->CopyAttributeFlags[t][index] != value) |
| 1756 | { |
| 1757 | this->CopyAttributeFlags[t][index] = value; |
| 1758 | this->Modified(); |
| 1759 | } |
| 1760 | } |
| 1761 | } |
| 1762 | else |
| 1763 | { |
| 1764 | if (this->CopyAttributeFlags[ctype][index] != value) |
| 1765 | { |
| 1766 | this->CopyAttributeFlags[ctype][index] = value; |
| 1767 | this->Modified(); |
| 1768 | } |
| 1769 | } |
| 1770 | } |
| 1771 | |
| 1772 | //------------------------------------------------------------------------------ |
| 1773 | int vtkDataSetAttributes::GetCopyAttribute(int index, int ctype) |
no test coverage detected