| 771 | | void TiledQuadTreeTerrainBase::insertIntoHeightTiles( UInt32 uiIndex, |
|---|
| 772 | | const ImagePtr value ) |
|---|
| 773 | | { |
|---|
| 774 | | if(value == NullFC) |
|---|
| 775 | | return; |
|---|
| 776 | | |
|---|
| | 780 | void TiledQuadTreeTerrainBase::removeFromHeightTiles(UInt32 uiIndex) |
|---|
| | 781 | { |
|---|
| | 782 | if(uiIndex < _mfHeightTiles.size()) |
|---|
| | 783 | { |
|---|
| | 784 | editMField(HeightTilesFieldMask, _mfHeightTiles); |
|---|
| | 785 | |
|---|
| | 786 | MFUnrecImagePtr::iterator fieldIt = _mfHeightTiles.begin_nc(); |
|---|
| | 787 | |
|---|
| | 788 | fieldIt += uiIndex; |
|---|
| | 789 | |
|---|
| | 790 | _mfHeightTiles.erase(fieldIt); |
|---|
| | 791 | } |
|---|
| | 792 | } |
|---|
| | 793 | |
|---|
| | 794 | void TiledQuadTreeTerrainBase::removeFromHeightTiles(const ImagePtr value) |
|---|
| | 795 | { |
|---|
| | 796 | Int32 iElemIdx = _mfHeightTiles.findIndex(value); |
|---|
| | 797 | |
|---|
| | 798 | if(iElemIdx != -1) |
|---|
| | 799 | { |
|---|
| | 800 | editMField(HeightTilesFieldMask, _mfHeightTiles); |
|---|
| | 801 | |
|---|
| | 802 | MFUnrecImagePtr::iterator fieldIt = _mfHeightTiles.begin_nc(); |
|---|
| | 803 | |
|---|
| | 804 | fieldIt += iElemIdx; |
|---|
| | 805 | |
|---|
| | 806 | _mfHeightTiles.erase(fieldIt); |
|---|
| | 807 | } |
|---|
| | 808 | } |
|---|
| | 809 | void TiledQuadTreeTerrainBase::clearHeightTiles(void) |
|---|
| | 810 | { |
|---|
| 779 | | MFUnrecImagePtr::iterator fieldIt = _mfHeightTiles.begin_nc(); |
|---|
| 780 | | |
|---|
| 781 | | //addRef(value); |
|---|
| 782 | | |
|---|
| 783 | | fieldIt += uiIndex; |
|---|
| 784 | | |
|---|
| 785 | | _mfHeightTiles.insert(fieldIt, value); |
|---|
| 786 | | } |
|---|
| 787 | | |
|---|
| 788 | | void TiledQuadTreeTerrainBase::replaceInHeightTiles( UInt32 uiIndex, |
|---|
| 789 | | const ImagePtr value ) |
|---|
| 790 | | { |
|---|
| 791 | | if(value == NullFC) |
|---|
| 792 | | return; |
|---|
| 793 | | |
|---|
| 794 | | if(uiIndex >= _mfHeightTiles.size()) |
|---|
| 795 | | return; |
|---|
| 796 | | |
|---|
| 797 | | editMField(HeightTilesFieldMask, _mfHeightTiles); |
|---|
| 798 | | |
|---|
| 799 | | |
|---|
| 800 | | // addRef(value); |
|---|
| 801 | | // subRef(_mfHeightTiles[uiIndex]); |
|---|
| 802 | | |
|---|
| 803 | | // _mfHeightTiles[uiIndex] = value; |
|---|
| 804 | | |
|---|
| 805 | | _mfHeightTiles.replace(uiIndex, value); |
|---|
| 806 | | } |
|---|
| 807 | | |
|---|
| 808 | | void TiledQuadTreeTerrainBase::replaceInHeightTiles(const ImagePtr pOldElem, |
|---|
| 809 | | const ImagePtr pNewElem) |
|---|
| 810 | | { |
|---|
| 811 | | if(pNewElem == NullFC) |
|---|
| 812 | | return; |
|---|
| 813 | | |
|---|
| 814 | | Int32 elemIdx = _mfHeightTiles.findIndex(pOldElem); |
|---|
| 815 | | |
|---|
| 816 | | if(elemIdx != -1) |
|---|
| 817 | | { |
|---|
| 818 | | editMField(HeightTilesFieldMask, _mfHeightTiles); |
|---|
| 819 | | |
|---|
| 820 | | // MFImagePtr::iterator fieldIt = _mfHeightTiles.begin(); |
|---|
| 821 | | |
|---|
| 822 | | // fieldIt += elemIdx; |
|---|
| 823 | | // addRef(pNewElem); |
|---|
| 824 | | // subRef(pOldElem); |
|---|
| 825 | | |
|---|
| 826 | | // (*fieldIt) = pNewElem; |
|---|
| 827 | | _mfHeightTiles.replace(elemIdx, pNewElem); |
|---|
| 828 | | } |
|---|
| 829 | | } |
|---|
| 830 | | |
|---|
| 831 | | void TiledQuadTreeTerrainBase::removeFromHeightTiles(UInt32 uiIndex) |
|---|
| 832 | | { |
|---|
| 833 | | if(uiIndex < _mfHeightTiles.size()) |
|---|
| 834 | | { |
|---|
| 835 | | editMField(HeightTilesFieldMask, _mfHeightTiles); |
|---|
| 836 | | |
|---|
| 837 | | MFUnrecImagePtr::iterator fieldIt = _mfHeightTiles.begin_nc(); |
|---|
| 838 | | |
|---|
| 839 | | fieldIt += uiIndex; |
|---|
| 840 | | |
|---|
| 841 | | //subRef(*fieldIt); |
|---|
| 842 | | |
|---|
| 843 | | _mfHeightTiles.erase(fieldIt); |
|---|
| 844 | | } |
|---|
| 845 | | } |
|---|
| 846 | | |
|---|
| 847 | | void TiledQuadTreeTerrainBase::removeFromHeightTiles(const ImagePtr value) |
|---|
| 848 | | { |
|---|
| 849 | | Int32 iElemIdx = _mfHeightTiles.findIndex(value); |
|---|
| 850 | | |
|---|
| 851 | | if(iElemIdx != -1) |
|---|
| 852 | | { |
|---|
| 853 | | editMField(HeightTilesFieldMask, _mfHeightTiles); |
|---|
| 854 | | |
|---|
| 855 | | MFUnrecImagePtr::iterator fieldIt = _mfHeightTiles.begin_nc(); |
|---|
| 856 | | |
|---|
| 857 | | fieldIt += iElemIdx; |
|---|
| 858 | | |
|---|
| 859 | | //subRef(*fieldIt); |
|---|
| 860 | | |
|---|
| 861 | | _mfHeightTiles.erase(fieldIt); |
|---|
| 862 | | } |
|---|
| 863 | | } |
|---|
| 864 | | void TiledQuadTreeTerrainBase::clearHeightTiles(void) |
|---|
| 865 | | { |
|---|
| 866 | | editMField(HeightTilesFieldMask, _mfHeightTiles); |
|---|
| 867 | | |
|---|
| 901 | | void TiledQuadTreeTerrainBase::insertIntoHeightTextures( UInt32 uiIndex, |
|---|
| 902 | | const MaterialPtr value ) |
|---|
| 903 | | { |
|---|
| 904 | | if(value == NullFC) |
|---|
| 905 | | return; |
|---|
| 906 | | |
|---|
| 907 | | editMField(HeightTexturesFieldMask, _mfHeightTextures); |
|---|
| 908 | | |
|---|
| 909 | | MFUnrecMaterialPtr::iterator fieldIt = _mfHeightTextures.begin_nc(); |
|---|
| 910 | | |
|---|
| 911 | | //addRef(value); |
|---|
| 912 | | |
|---|
| 913 | | fieldIt += uiIndex; |
|---|
| 914 | | |
|---|
| 915 | | _mfHeightTextures.insert(fieldIt, value); |
|---|
| 916 | | } |
|---|
| 917 | | |
|---|
| 918 | | void TiledQuadTreeTerrainBase::replaceInHeightTextures( UInt32 uiIndex, |
|---|
| 919 | | const MaterialPtr value ) |
|---|
| 920 | | { |
|---|
| 921 | | if(value == NullFC) |
|---|
| 922 | | return; |
|---|
| 923 | | |
|---|
| 924 | | if(uiIndex >= _mfHeightTextures.size()) |
|---|
| 925 | | return; |
|---|
| 926 | | |
|---|
| 927 | | editMField(HeightTexturesFieldMask, _mfHeightTextures); |
|---|
| 928 | | |
|---|
| 929 | | |
|---|
| 930 | | // addRef(value); |
|---|
| 931 | | // subRef(_mfHeightTextures[uiIndex]); |
|---|
| 932 | | |
|---|
| 933 | | // _mfHeightTextures[uiIndex] = value; |
|---|
| 934 | | |
|---|
| 935 | | _mfHeightTextures.replace(uiIndex, value); |
|---|
| 936 | | } |
|---|
| 937 | | |
|---|
| 938 | | void TiledQuadTreeTerrainBase::replaceInHeightTextures(const MaterialPtr pOldElem, |
|---|
| 939 | | const MaterialPtr pNewElem) |
|---|
| 940 | | { |
|---|
| 941 | | if(pNewElem == NullFC) |
|---|
| 942 | | return; |
|---|
| 943 | | |
|---|
| 944 | | Int32 elemIdx = _mfHeightTextures.findIndex(pOldElem); |
|---|
| 945 | | |
|---|
| 946 | | if(elemIdx != -1) |
|---|
| | 841 | void TiledQuadTreeTerrainBase::removeFromHeightTextures(UInt32 uiIndex) |
|---|
| | 842 | { |
|---|
| | 843 | if(uiIndex < _mfHeightTextures.size()) |
|---|
| 950 | | // MFMaterialPtr::iterator fieldIt = _mfHeightTextures.begin(); |
|---|
| 951 | | |
|---|
| 952 | | // fieldIt += elemIdx; |
|---|
| 953 | | // addRef(pNewElem); |
|---|
| 954 | | // subRef(pOldElem); |
|---|
| 955 | | |
|---|
| 956 | | // (*fieldIt) = pNewElem; |
|---|
| 957 | | _mfHeightTextures.replace(elemIdx, pNewElem); |
|---|
| 958 | | } |
|---|
| 959 | | } |
|---|
| 960 | | |
|---|
| 961 | | void TiledQuadTreeTerrainBase::removeFromHeightTextures(UInt32 uiIndex) |
|---|
| 962 | | { |
|---|
| 963 | | if(uiIndex < _mfHeightTextures.size()) |
|---|
| | 847 | MFUnrecMaterialPtr::iterator fieldIt = _mfHeightTextures.begin_nc(); |
|---|
| | 848 | |
|---|
| | 849 | fieldIt += uiIndex; |
|---|
| | 850 | |
|---|
| | 851 | _mfHeightTextures.erase(fieldIt); |
|---|
| | 852 | } |
|---|
| | 853 | } |
|---|
| | 854 | |
|---|
| | 855 | void TiledQuadTreeTerrainBase::removeFromHeightTextures(const MaterialPtr value) |
|---|
| | 856 | { |
|---|
| | 857 | Int32 iElemIdx = _mfHeightTextures.findIndex(value); |
|---|
| | 858 | |
|---|
| | 859 | if(iElemIdx != -1) |
|---|