------------------------------------------------------------------------------
| 585 | |
| 586 | //------------------------------------------------------------------------------ |
| 587 | void vtkMultiBlockVolumeMapper::SetTransfer2DYAxisArray(const char* a) |
| 588 | { |
| 589 | if (this->Transfer2DYAxisArray == nullptr && a == nullptr) |
| 590 | { |
| 591 | return; |
| 592 | } |
| 593 | if (this->Transfer2DYAxisArray && a && (!strcmp(this->Transfer2DYAxisArray, a))) |
| 594 | { |
| 595 | return; |
| 596 | } |
| 597 | delete[] this->Transfer2DYAxisArray; |
| 598 | if (a) |
| 599 | { |
| 600 | size_t n = strlen(a) + 1; |
| 601 | char* cp1 = new char[n]; |
| 602 | const char* cp2 = (a); |
| 603 | this->Transfer2DYAxisArray = cp1; |
| 604 | do |
| 605 | { |
| 606 | *cp1++ = *cp2++; |
| 607 | } while (--n); |
| 608 | } |
| 609 | else |
| 610 | { |
| 611 | this->Transfer2DYAxisArray = nullptr; |
| 612 | } |
| 613 | MapperVec::const_iterator end = this->Mappers.end(); |
| 614 | for (MapperVec::const_iterator it = this->Mappers.begin(); it != end; ++it) |
| 615 | { |
| 616 | (*it)->SetTransfer2DYAxisArray(a); |
| 617 | } |
| 618 | this->Modified(); |
| 619 | } |
| 620 | VTK_ABI_NAMESPACE_END |