- Timestamp:
- 12/12/07 18:00:42 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Source/Contrib/VTK/OSGVTKMapperBase.cpp
r1020 r1032 132 132 */ 133 133 134 134 135 135 void VTKMapperBase::classDescInserter(TypeObject &oType) 136 136 { 137 137 FieldDescriptionBase *pDesc = NULL; 138 139 138 140 139 pDesc = new SFNodeInternalPtr::Description( … … 142 141 "root", 143 142 "", 144 RootFieldId, RootFieldMask, 143 RootFieldId, 144 RootFieldMask, 145 145 false, 146 146 Field::SFDefaultFlags, 147 147 static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleRoot), 148 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleRoot)); 149 150 oType.addInitialDesc(pDesc); 151 148 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleRoot ) ); 149 150 oType.addInitialDesc(pDesc); 151 152 152 153 pDesc = new MFNodeInternalPtr::Description( 153 154 MFNodeInternalPtr::getClassType(), 154 155 "geoRoots", 155 156 "", 156 GeoRootsFieldId, GeoRootsFieldMask, 157 GeoRootsFieldId, 158 GeoRootsFieldMask, 157 159 false, 158 160 (Field::FClusterLocal), 159 161 static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleGeoRoots), 160 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleGeoRoots)); 161 162 oType.addInitialDesc(pDesc); 163 162 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleGeoRoots ) ); 163 164 oType.addInitialDesc(pDesc); 165 166 164 167 pDesc = new MFGeometryInternalPtr::Description( 165 168 MFGeometryInternalPtr::getClassType(), 166 169 "geometries", 167 170 "", 168 GeometriesFieldId, GeometriesFieldMask, 171 GeometriesFieldId, 172 GeometriesFieldMask, 169 173 false, 170 174 (Field::FClusterLocal), 171 175 static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleGeometries), 172 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleGeometries)); 173 174 oType.addInitialDesc(pDesc); 175 176 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleGeometries ) ); 177 178 oType.addInitialDesc(pDesc); 179 180 176 181 pDesc = new MFChunkMaterialInternalPtr::Description( 177 182 MFChunkMaterialInternalPtr::getClassType(), 178 183 "materials", 179 184 "", 180 MaterialsFieldId, MaterialsFieldMask, 185 MaterialsFieldId, 186 MaterialsFieldMask, 181 187 false, 182 188 (Field::FClusterLocal), 183 189 static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleMaterials), 184 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleMaterials)); 185 186 oType.addInitialDesc(pDesc); 187 190 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleMaterials ) ); 191 192 oType.addInitialDesc(pDesc); 193 194 188 195 pDesc = new MFMaterialChunkInternalPtr::Description( 189 196 MFMaterialChunkInternalPtr::getClassType(), 190 197 "materialChunks", 191 198 "", 192 MaterialChunksFieldId, MaterialChunksFieldMask, 199 MaterialChunksFieldId, 200 MaterialChunksFieldMask, 193 201 false, 194 202 (Field::FClusterLocal), 195 203 static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleMaterialChunks), 196 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleMaterialChunks)); 197 198 oType.addInitialDesc(pDesc); 199 204 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleMaterialChunks ) ); 205 206 oType.addInitialDesc(pDesc); 207 208 200 209 pDesc = new MFGeoPnt3fPropertyInternalPtr::Description( 201 210 MFGeoPnt3fPropertyInternalPtr::getClassType(), 202 211 "positions", 203 212 "", 204 PositionsFieldId, PositionsFieldMask, 213 PositionsFieldId, 214 PositionsFieldMask, 205 215 false, 206 216 (Field::FClusterLocal), 207 217 static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandlePositions), 208 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandlePositions)); 209 210 oType.addInitialDesc(pDesc); 211 218 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandlePositions ) ); 219 220 oType.addInitialDesc(pDesc); 221 222 212 223 pDesc = new MFGeoUInt32PropertyInternalPtr::Description( 213 224 MFGeoUInt32PropertyInternalPtr::getClassType(), 214 225 "length", 215 226 "", 216 LengthFieldId, LengthFieldMask, 227 LengthFieldId, 228 LengthFieldMask, 217 229 false, 218 230 (Field::FClusterLocal), 219 231 static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleLength), 220 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleLength)); 221 222 oType.addInitialDesc(pDesc); 223 232 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleLength ) ); 233 234 oType.addInitialDesc(pDesc); 235 236 224 237 pDesc = new MFGeoUInt8PropertyInternalPtr::Description( 225 238 MFGeoUInt8PropertyInternalPtr::getClassType(), 226 239 "types", 227 240 "", 228 TypesFieldId, TypesFieldMask, 241 TypesFieldId, 242 TypesFieldMask, 229 243 false, 230 244 (Field::FClusterLocal), 231 245 static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleTypes), 232 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleTypes)); 233 234 oType.addInitialDesc(pDesc); 235 246 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleTypes ) ); 247 248 oType.addInitialDesc(pDesc); 249 250 236 251 pDesc = new MFGeoColor4fPropertyInternalPtr::Description( 237 252 MFGeoColor4fPropertyInternalPtr::getClassType(), 238 253 "Colors", 239 254 "", 240 ColorsFieldId, ColorsFieldMask, 255 ColorsFieldId, 256 ColorsFieldMask, 241 257 false, 242 258 (Field::FClusterLocal), 243 259 static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleColors), 244 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleColors)); 245 246 oType.addInitialDesc(pDesc); 247 260 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleColors ) ); 261 262 oType.addInitialDesc(pDesc); 263 264 248 265 pDesc = new MFGeoVec3fPropertyInternalPtr::Description( 249 266 MFGeoVec3fPropertyInternalPtr::getClassType(), 250 267 "normals", 251 268 "", 252 NormalsFieldId, NormalsFieldMask, 269 NormalsFieldId, 270 NormalsFieldMask, 253 271 false, 254 272 (Field::FClusterLocal), 255 273 static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleNormals), 256 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleNormals)); 257 258 oType.addInitialDesc(pDesc); 259 } 260 274 static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleNormals ) ); 275 276 oType.addInitialDesc(pDesc); 277 278 279 } 261 280 262 281 VTKMapperBase::TypeObject VTKMapperBase::_type( … … 384 403 "" 385 404 ); 386 405 387 406 /*------------------------------ get -----------------------------------*/ 388 407 … … 459 478 } 460 479 461 void 480 bool 462 481 VTKMapperBase::replaceGeoRoots( 463 482 MFNodeInternalPtr::ArgumentType pOldElem, 464 483 MFNodeInternalPtr::ArgumentType pNewElem ) 465 484 { 466 if(pNewElem == NullFC) 467 return; 485 bool retVal = false; 486 487 if(pNewElem != NullFC) 488 return retVal; 468 489 469 490 GeoRootsFieldType::iterator fieldIt = … … 472 493 if(fieldIt != _mfGeoRoots.end()) 473 494 { 495 retVal = true; 496 474 497 editMField(GeoRootsFieldMask, _mfGeoRoots); 475 498 476 499 (*fieldIt) = NodePtr(pNewElem); 477 500 } 501 502 return retVal; 478 503 } 479 504 … … 493 518 } 494 519 495 void 520 bool 496 521 VTKMapperBase::subGeoRoots( 497 522 MFNodeInternalPtr::ArgumentType value) 498 523 { 524 bool retVal = false; 499 525 GeoRootsFieldType::iterator fieldIt = 500 526 _mfGeoRoots.find(value); … … 502 528 if(fieldIt != _mfGeoRoots.end()) 503 529 { 530 retVal = true; 531 504 532 editMField(GeoRootsFieldMask, _mfGeoRoots); 505 533 506 534 _mfGeoRoots.erase(fieldIt); 507 535 } 536 537 return retVal; 508 538 } 509 539 … … 571 601 } 572 602 573 void 603 bool 574 604 VTKMapperBase::replaceGeometries( 575 605 MFGeometryInternalPtr::ArgumentType pOldElem, 576 606 MFGeometryInternalPtr::ArgumentType pNewElem ) 577 607 { 578 if(pNewElem == NullFC) 579 return; 608 bool retVal = false; 609 610 if(pNewElem != NullFC) 611 return retVal; 580 612 581 613 GeometriesFieldType::iterator fieldIt = … … 584 616 if(fieldIt != _mfGeometries.end()) 585 617 { 618 retVal = true; 619 586 620 editMField(GeometriesFieldMask, _mfGeometries); 587 621 588 622 (*fieldIt) = GeometryPtr(pNewElem); 589 623 } 624 625 return retVal; 590 626 } 591 627 … … 605 641 } 606 642 607 void 643 bool 608 644 VTKMapperBase::subGeometries( 609 645 MFGeometryInternalPtr::ArgumentType value) 610 646 { 647 bool retVal = false; 611 648 GeometriesFieldType::iterator fieldIt = 612 649 _mfGeometries.find(value); … … 614 651 if(fieldIt != _mfGeometries.end()) 615 652 { 653 retVal = true; 654 616 655 editMField(GeometriesFieldMask, _mfGeometries); 617 656 618 657 _mfGeometries.erase(fieldIt); 619 658 } 659 660 return retVal; 620 661 } 621 662 … … 683 724 } 684 725 685 void 726 bool 686 727 VTKMapperBase::replaceMaterials( 687 728 MFChunkMaterialInternalPtr::ArgumentType pOldElem, 688 729 MFChunkMaterialInternalPtr::ArgumentType pNewElem ) 689 730 { 690 if(pNewElem == NullFC) 691 return; 731 bool retVal = false; 732 733 if(pNewElem != NullFC) 734 return retVal; 692 735 693 736 MaterialsFieldType::iterator fieldIt = … … 696 739 if(fieldIt != _mfMaterials.end()) 697 740 { 741 retVal = true; 742 698 743 editMField(MaterialsFieldMask, _mfMaterials); 699 744 700 745 (*fieldIt) = ChunkMaterialPtr(pNewElem); 701 746 } 747 748 return retVal; 702 749 } 703 750 … … 717 764 } 718 765 719 void 766 bool 720 767 VTKMapperBase::subMaterials( 721 768 MFChunkMaterialInternalPtr::ArgumentType value) 722 769 { 770 bool retVal = false; 723 771 MaterialsFieldType::iterator fieldIt = 724 772 _mfMaterials.find(value); … … 726 774 if(fieldIt != _mfMaterials.end()) 727 775 { 776 retVal = true; 777 728 778 editMField(MaterialsFieldMask, _mfMaterials); 729 779 730 780 _mfMaterials.erase(fieldIt); 731 781 } 782 783 return retVal; 732 784 } 733 785 … … 795 847 } 796 848 797 void 849 bool 798 850 VTKMapperBase::replaceMaterialChunks( 799 851 MFMaterialChunkInternalPtr::ArgumentType pOldElem, 800 852 MFMaterialChunkInternalPtr::ArgumentType pNewElem ) 801 853 { 802 if(pNewElem == NullFC) 803 return; 854 bool retVal = false; 855 856 if(pNewElem != NullFC) 857 return retVal; 804 858 805 859 MaterialChunksFieldType::iterator fieldIt = … … 808 862 if(fieldIt != _mfMaterialChunks.end()) 809 863 { 864 retVal = true; 865 810 866 editMField(MaterialChunksFieldMask, _mfMaterialChunks); 811 867 812 868 (*fieldIt) = MaterialChunkPtr(pNewElem); 813 869 } 870 871 return retVal; 814 872 } 815 873 … … 829 887 } 830 888 831 void 889 bool 832 890 VTKMapperBase::subMaterialChunks( 833 891 MFMaterialChunkInternalPtr::ArgumentType value) 834 892 { 893 bool retVal = false; 835 894 MaterialChunksFieldType::iterator fieldIt = 836 895 _mfMaterialChunks.find(value); … … 838 897 if(fieldIt != _mfMaterialChunks.end()) 839 898 { 899 retVal = true; 900 840 901 editMField(MaterialChunksFieldMask, _mfMaterialChunks); 841 902 842 903 _mfMaterialChunks.erase(fieldIt); 843 904 } 905 906 return retVal; 844 907 } 845 908 … … 907 970 } 908 971 909 void 972 bool 910 973 VTKMapperBase::replacePositions( 911 974 MFGeoPnt3fPropertyInternalPtr::ArgumentType pOldElem, 912 975 MFGeoPnt3fPropertyInternalPtr::ArgumentType pNewElem ) 913 976 { 914 if(pNewElem == NullFC) 915 return; 977 bool retVal = false; 978 979 if(pNewElem != NullFC) 980 return retVal; 916 981 917 982 PositionsFieldType::iterator fieldIt = … … 920 985 if(fieldIt != _mfPositions.end()) 921 986 { 987 retVal = true; 988 922 989 editMField(PositionsFieldMask, _mfPositions); 923 990 924 991 (*fieldIt) = GeoPnt3fPropertyPtr(pNewElem); 925 992 } 993 994 return retVal; 926 995 } 927 996 … … 941 1010 } 942 1011 943 void 1012 bool 944 1013 VTKMapperBase::subPositions( 945 1014 MFGeoPnt3fPropertyInternalPtr::ArgumentType value) 946 1015 { 1016 bool retVal = false; 947 1017 PositionsFieldType::iterator fieldIt = 948 1018 _mfPositions.find(value); … … 950 1020 if(fieldIt != _mfPositions.end()) 951 1021 { 1022 retVal = true; 1023 952 1024 editMField(PositionsFieldMask, _mfPositions); 953 1025 954 1026 _mfPositions.erase(fieldIt); 955 1027 } 1028 1029 return retVal; 956 1030 } 957 1031 … … 1019 1093 } 1020 1094 1021 void 1095 bool 1022 1096 VTKMapperBase::replaceLength( 1023 1097 MFGeoUInt32PropertyInternalPtr::ArgumentType pOldElem, 1024 1098 MFGeoUInt32PropertyInternalPtr::ArgumentType pNewElem ) 1025 1099 { 1026 if(pNewElem == NullFC) 1027 return; 1100 bool retVal = false; 1101 1102 if(pNewElem != NullFC) 1103 return retVal; 1028 1104 1029 1105 LengthFieldType::iterator fieldIt = … … 1032 1108 if(fieldIt != _mfLength.end()) 1033 1109 { 1110 retVal = true; 1111 1034 1112 editMField(LengthFieldMask, _mfLength); 1035 1113 1036 1114 (*fieldIt) = GeoUInt32PropertyPtr(pNewElem); 1037 1115 } 1116 1117 return retVal; 1038 1118 } 1039 1119 … … 1053 1133 } 1054 1134 1055 void 1135 bool 1056 1136 VTKMapperBase::subLength( 1057 1137 MFGeoUInt32PropertyInternalPtr::ArgumentType value) 1058 1138 { 1139 bool retVal = false; 1059 1140 LengthFieldType::iterator fieldIt = 1060 1141 _mfLength.find(value); … … 1062 1143 if(fieldIt != _mfLength.end()) 1063 1144 { 1145 retVal = true; 1146 1064 1147 editMField(LengthFieldMask, _mfLength); 1065 1148 1066 1149 _mfLength.erase(fieldIt); 1067 1150 } 1151 1152 return retVal; 1068 1153 } 1069 1154 … … 1131 1216 } 1132 1217 1133 void 1218 bool 1134 1219 VTKMapperBase::replaceTypes( 1135 1220 MFGeoUInt8PropertyInternalPtr::ArgumentType pOldElem, 1136 1221 MFGeoUInt8PropertyInternalPtr::ArgumentType pNewElem ) 1137 1222 { 1138 if(pNewElem == NullFC) 1139 return; 1223 bool retVal = false; 1224 1225 if(pNewElem != NullFC) 1226 return retVal; 1140 1227 1141 1228 TypesFieldType::iterator fieldIt = … … 1144 1231 if(fieldIt != _mfTypes.end()) 1145 1232 { 1233 retVal = true; 1234 1146 1235 editMField(TypesFieldMask, _mfTypes); 1147 1236 1148 1237 (*fieldIt) = GeoUInt8PropertyPtr(pNewElem); 1149 1238 } 1239 1240 return retVal; 1150 1241 } 1151 1242 … … 1165 1256 } 1166 1257 1167 void 1258 bool 1168 1259 VTKMapperBase::subTypes( 1169 1260 MFGeoUInt8PropertyInternalPtr::ArgumentType value) 1170 1261 { 1262 bool retVal = false; 1171 1263 TypesFieldType::iterator fieldIt = 1172 1264 _mfTypes.find(value); … … 1174 1266 if(fieldIt != _mfTypes.end()) 1175 1267 { 1268 retVal = true; 1269 1176 1270 editMField(TypesFieldMask, _mfTypes); 1177 1271 1178 1272 _mfTypes.erase(fieldIt); 1179 1273 } 1274 1275 return retVal; 1180 1276 } 1181 1277 … … 1243 1339 } 1244 1340 1245 void 1341 bool 1246 1342 VTKMapperBase::replaceColors( 1247 1343 MFGeoColor4fPropertyInternalPtr::ArgumentType pOldElem, 1248 1344 MFGeoColor4fPropertyInternalPtr::ArgumentType pNewElem ) 1249 1345 { 1250 if(pNewElem == NullFC) 1251 return; 1346 bool retVal = false; 1347 1348 if(pNewElem != NullFC) 1349 return retVal; 1252 1350 1253 1351 ColorsFieldType::iterator fieldIt = … … 1256 1354 if(fieldIt != _mfColors.end()) 1257 1355 { 1356 retVal = true; 1357 1258 1358 editMField(ColorsFieldMask, _mfColors); 1259 1359 1260 1360 (*fieldIt) = GeoColor4fPropertyPtr(pNewElem); 1261 1361 } 1362 1363 return retVal; 1262 1364 } 1263 1365 … … 1277 1379 } 1278 1380 1279 void 1381 bool 1280 1382 VTKMapperBase::subColors( 1281 1383 MFGeoColor4fPropertyInternalPtr::ArgumentType value) 1282 1384 { 1385 bool retVal = false; 1283 1386 ColorsFieldType::iterator fieldIt = 1284 1387 _mfColors.find(value); … … 1286 1389 if(fieldIt != _mfColors.end()) 1287 1390 { 1391 retVal = true; 1392 1288 1393 editMField(ColorsFieldMask, _mfColors); 1289 1394 1290 1395 _mfColors.erase(fieldIt); 1291 1396 } 1397 1398 return retVal; 1292 1399 } 1293 1400 … … 1355 1462 } 1356 1463 1357 void 1464 bool 1358 1465 VTKMapperBase::replaceNormals( 1359 1466 MFGeoVec3fPropertyInternalPtr::ArgumentType pOldElem, 1360 1467 MFGeoVec3fPropertyInternalPtr::ArgumentType pNewElem ) 1361 1468 { 1362 if(pNewElem == NullFC) 1363 return; 1469 bool retVal = false; 1470 1471 if(pNewElem != NullFC) 1472 return retVal; 1364 1473 1365 1474 NormalsFieldType::iterator fieldIt = … … 1368 1477 if(fieldIt != _mfNormals.end()) 1369 1478 { 1479 retVal = true; 1480 1370 1481 editMField(NormalsFieldMask, _mfNormals); 1371 1482 1372 1483 (*fieldIt) = GeoVec3fPropertyPtr(pNewElem); 1373 1484 } 1485 1486 return retVal; 1374 1487 } 1375 1488 … … 1389 1502 } 1390 1503 1391 void 1504 bool 1392 1505 VTKMapperBase::subNormals( 1393 1506 MFGeoVec3fPropertyInternalPtr::ArgumentType value) 1394 1507 { 1508 bool retVal = false; 1395 1509 NormalsFieldType::iterator fieldIt = 1396 1510 _mfNormals.find(value); … … 1398 1512 if(fieldIt != _mfNormals.end()) 1399 1513 { 1514 retVal = true; 1515 1400 1516 editMField(NormalsFieldMask, _mfNormals); 1401 1517 1402 1518 _mfNormals.erase(fieldIt); 1403 1519 } 1520 1521 return retVal; 1404 1522 } 1405 1523 … … 1560 1678 1561 1679 //! create a new instance of the class 1562 VTKMapperPtr VTKMapperBase::create(void) 1563 { 1564 VTKMapperPtr fc; 1680 VTKMapperBase::ObjRefPtr 1681 VTKMapperBase::create(void) 1682 { 1683 ObjRefPtr pFC; 1565 1684 1566 1685 if(getClassType().getPrototype() != NullFC) 1567 1686 { 1568 fc = dynamic_cast<VTKMapper::ObjPtr>(1569 getClassType().getPrototype()-> shallowCopy());1570 } 1571 1572 return fc;1687 pFC = boost::dynamic_pointer_cast<VTKMapper>( 1688 getClassType().getPrototype()->shallowCopy()); 1689 } 1690 1691 return pFC; 1573 1692 } 1574 1693 … … 1583 1702 } 1584 1703 1585 FieldContainerPtr VTKMapperBase::shallowCopy(void) const 1586 { 1587 VTKMapperPtr returnValue; 1704 FieldContainerRefPtr 1705 VTKMapperBase::shallowCopy(void) const 1706 { 1707 ObjPtr returnValue; 1588 1708 1589 1709 newPtr(returnValue, dynamic_cast<const VTKMapper *>(this)); 1590 1710 1591 return returnValue;1711 return FieldContainerRefPtr(returnValue); 1592 1712 } 1593 1713 … … 1640 1760 { 1641 1761 this->setRoot(source->getRoot()); 1762 1642 1763 GeoRootsFieldType::const_iterator GeoRootsIt = 1643 1764 source->_mfGeoRoots.begin(); … … 1651 1772 ++GeoRootsIt; 1652 1773 } 1774 1653 1775 GeometriesFieldType::const_iterator GeometriesIt = 1654 1776 source->_mfGeometries.begin(); … … 1662 1784 ++GeometriesIt; 1663 1785 } 1786 1664 1787 MaterialsFieldType::const_iterator MaterialsIt = 1665 1788 source->_mfMaterials.begin(); … … 1673 1796 ++MaterialsIt; 1674 1797 } 1798 1675 1799 MaterialChunksFieldType::const_iterator MaterialChunksIt = 1676 1800 source->_mfMaterialChunks.begin(); … … 1684 1808 ++MaterialChunksIt; 1685 1809 } 1810 1686 1811 PositionsFieldType::const_iterator PositionsIt = 1687 1812 source->_mfPositions.begin(); … … 1695 1820 ++PositionsIt; 1696 1821 } 1822 1697 1823 LengthFieldType::const_iterator LengthIt = 1698 1824 source->_mfLength.begin(); … … 1706 1832 ++LengthIt; 1707 1833 } 1834 1708 1835 TypesFieldType::const_iterator TypesIt = 1709 1836 source->_mfTypes.begin(); … … 1717 1844 ++TypesIt; 1718 1845 } 1846 1719 1847 ColorsFieldType::const_iterator ColorsIt = 1720 1848 source->_mfColors.begin(); … … 1728 1856 ++ColorsIt; 1729 1857 } 1858 1730 1859 NormalsFieldType::const_iterator NormalsIt = 1731 1860 source->_mfNormals.begin(); … … 1739 1868 ++NormalsIt; 1740 1869 } 1870 1741 1871 } 1742 1872 } … … 1759 1889 this->getType().getFieldDesc(RootFieldId))); 1760 1890 1761 // returnValue->setSetMethod(boost::bind(&VTKMapper::setRoot, 1762 // static_cast<VTKMapper *>(this), _1)); 1891 returnValue->setSetFunc( 1892 boost::bind( 1893 &VTKMapper::setRoot, 1894 static_cast<VTKMapper *>(this), _1)); 1763 1895 1764 1896 editSField(RootFieldMask); … … 1783 1915 &_mfGeoRoots, 1784 1916 this->getType().getFieldDesc(GeoRootsFieldId))); 1785 1786 // returnValue->setAddMethod(boost::bind(&VTKMapper::addGeoRoots, 1787 // static_cast<VTKMapper *>(this), _1)); 1917 returnValue->setAddFunc( 1918 boost::bind( 1919 &VTKMapper::addGeoRoots, 1920 static_cast<VTKMapper *>(this), _1)); 1921 returnValue->setInsertFunc( 1922 boost::bind( 1923 &VTKMapper::insertGeoRoots, 1924 static_cast<VTKMapper *>(this), _1, _2)); 1925 1926 void (VTKMapper::*replaceGeoRootsIndexFunc)( 1927 UInt32 const, 1928 MFNodeInternalPtr::ArgumentType) = 1929 &VTKMapper::replaceGeoRoots; 1930 returnValue->setReplaceIndexFunc( 1931 boost::bind( 1932 replaceGeoRootsIndexFunc, 1933 static_cast<VTKMapper *>(this), _1, _2)); 1934 1935 bool (VTKMapper::*replaceGeoRootsObjectFunc)( 1936 MFNodeInternalPtr::ArgumentType, 1937 MFNodeInternalPtr::ArgumentType ) = 1938 &VTKMapper::replaceGeoRoots; 1939 returnValue->setReplaceObjectFunc( 1940 boost::bind( 1941 replaceGeoRootsObjectFunc, 1942 static_cast<VTKMapper *>(this), _1, _2)); 1943 1944 void (VTKMapper::*subGeoRootsIndexFunc)(UInt32 const) = 1945 &VTKMapper::subGeoRoots; 1946 returnValue->setSubIndexFunc( 1947 boost::bind( 1948 subGeoRootsIndexFunc, 1949 static_cast<VTKMapper *>(this), _1)); 1950 1951 bool (VTKMapper::*subGeoRootsObjectFunc)( 1952 MFNodeInternalPtr::ArgumentType) = 1953 &VTKMapper::subGeoRoots; 1954 returnValue->setSubObjectFunc( 1955 boost::bind( 1956 subGeoRootsObjectFunc, 1957 static_cast<VTKMapper *>(this), _1)); 1958 returnValue->setClearFunc( 1959 boost::bind( 1960 &VTKMapper::clearGeoRoots, 1961 static_cast<VTKMapper *>(this))); 1788 1962 1789 1963 editMField(GeoRootsFieldMask, _mfGeoRoots); … … 1808 1982 &_mfGeometries, 1809 1983 this->getType().getFieldDesc(GeometriesFieldId))); 1810 1811 // returnValue->setAddMethod(boost::bind(&VTKMapper::addGeometries, 1812 // static_cast<VTKMapper *>(this), _1)); 1984 returnValue->setAddFunc( 1985 boost::bind( 1986 &VTKMapper::addGeometries, 1987 static_cast<VTKMapper *>(this), _1)); 1988 returnValue->setInsertFunc( 1989 boost::bind( 1990 &VTKMapper::insertGeometries, 1991 static_cast<VTKMapper *>(this), _1, _2)); 1992 1993 void (VTKMapper::*replaceGeometriesIndexFunc)( 1994 UInt32 const, 1995 MFGeometryInternalPtr::ArgumentType) = 1996 &VTKMapper::replaceGeometries; 1997 returnValue->setReplaceIndexFunc( 1998 boost::bind( 1999 replaceGeometriesIndexFunc, 2000 static_cast<VTKMapper *>(this), _1, _2)); 2001 2002 bool (VTKMapper::*replaceGeometriesObjectFunc)( 2003 MFGeometryInternalPtr::ArgumentType, 2004 MFGeometryInternalPtr::ArgumentType ) = 2005 &VTKMapper::replaceGeometries; 2006 returnValue->setReplaceObjectFunc( 2007 boost::bind( 2008 replaceGeometriesObjectFunc, 2009 static_cast<VTKMapper *>(this), _1, _2)); 2010 2011 void (VTKMapper::*subGeometriesIndexFunc)(UInt32 const) = 2012 &VTKMapper::subGeometries; 2013 returnValue->setSubIndexFunc( 2014 boost::bind( 2015 subGeometriesIndexFunc, 2016 static_cast<VTKMapper *>(this), _1)); 2017 2018 bool (VTKMapper::*subGeometriesObjectFunc)( 2019 MFGeometryInternalPtr::ArgumentType) = 2020 &VTKMapper::subGeometries; 2021 returnValue->setSubObjectFunc( 2022 boost::bind( 2023 subGeometriesObjectFunc, 2024 static_cast<VTKMapper *>(this), _1)); 2025 returnValue->setClearFunc( 2026 boost::bind( 2027 &VTKMapper::clearGeometries, 2028 static_cast<VTKMapper *>(this))); 1813 2029 1814 2030 editMField(GeometriesFieldMask, _mfGeometries); … … 1833 2049 &_mfMaterials, 1834 2050 this->getType().getFieldDesc(MaterialsFieldId))); 1835 1836 // returnValue->setAddMethod(boost::bind(&VTKMapper::addMaterials, 1837 // static_cast<VTKMapper *>(this), _1)); 2051 returnValue->setAddFunc( 2052 boost::bind( 2053 &VTKMapper::addMaterials, 2054 static_cast<VTKMapper *>(this), _1)); 2055 returnValue->setInsertFunc( 2056 boost::bind( 2057 &VTKMapper::insertMaterials, 2058 static_cast<VTKMapper *>(this), _1, _2)); 2059 2060 void (VTKMapper::*replaceMaterialsIndexFunc)( 2061 UInt32 const, 2062 MFChunkMaterialInternalPtr::ArgumentType) = 2063 &VTKMapper::replaceMaterials; 2064 returnValue->setReplaceIndexFunc( 2065 boost::bind( 2066 replaceMaterialsIndexFunc, 2067 static_cast<VTKMapper *>(this), _1, _2)); 2068 2069 bool (VTKMapper::*replaceMaterialsObjectFunc)( 2070 MFChunkMaterialInternalPtr::ArgumentType, 2071 MFChunkMaterialInternalPtr::ArgumentType ) = 2072 &VTKMapper::replaceMaterials; 2073 returnValue->setReplaceObjectFunc( 2074 boost::bind( 2075 replaceMaterialsObjectFunc, 2076 static_cast<VTKMapper *>(this), _1, _2)); 2077 2078 void (VTKMapper::*subMaterialsIndexFunc)(UInt32 const) = 2079 &VTKMapper::subMaterials; 2080 returnValue->setSubIndexFunc( 2081 boost::bind( 2082 subMaterialsIndexFunc, 2083 static_cast<VTKMapper *>(this), _1)); 2084 2085 bool (VTKMapper::*subMaterialsObjectFunc)( 2086 MFChunkMaterialInternalPtr::ArgumentType) = 2087 &VTKMapper::subMaterials; 2088 returnValue->setSubObjectFunc( 2089 boost::bind( 2090 subMaterialsObjectFunc, 2091 static_cast<VTKMapper *>(this), _1)); 2092 returnValue->setClearFunc( 2093 boost::bind( 2094 &VTKMapper::clearMaterials, 2095 static_cast<VTKMapper *>(this))); 1838 2096 1839 2097 editMField(MaterialsFieldMask, _mfMaterials); … … 1858 2116 &_mfMaterialChunks, 1859 2117 this->getType().getFieldDesc(MaterialChunksFieldId))); 1860 1861 // returnValue->setAddMethod(boost::bind(&VTKMapper::addMaterialChunks, 1862 // static_cast<VTKMapper *>(this), _1)); 2118 returnValue->setAddFunc( 2119 boost::bind( 2120 &VTKMapper::addMaterialChunks, 2121 static_cast<VTKMapper *>(this), _1)); 2122 returnValue->setInsertFunc( 2123 boost::bind( 2124 &VTKMapper::insertMaterialChunks, 2125 static_cast<VTKMapper *>(this), _1, _2)); 2126 2127 void (VTKMapper::*replaceMaterialChunksIndexFunc)( 2128 UInt32 const, 2129 MFMaterialChunkInternalPtr::ArgumentType) = 2130 &VTKMapper::replaceMaterialChunks; 2131 returnValue->setReplaceIndexFunc( 2132 boost::bind( 2133 replaceMaterialChunksIndexFunc, 2134 static_cast<VTKMapper *>(this), _1, _2)); 2135 2136 bool (VTKMapper::*replaceMaterialChunksObjectFunc)( 2137 MFMaterialChunkInternalPtr::ArgumentType, 2138 MFMaterialChunkInternalPtr::ArgumentType ) = 2139 &VTKMapper::replaceMaterialChunks; 2140 returnValue->setReplaceObjectFunc( 2141 boost::bind( 2142 replaceMaterialChunksObjectFunc, 2143 static_cast<VTKMapper *>(this), _1, _2)); 2144 2145 void (VTKMapper::*subMaterialChunksIndexFunc)(UInt32 const) = 2146 &VTKMapper::subMaterialChunks; 2147 returnValue->setSubIndexFunc( 2148 boost::bind( 2149 subMaterialChunksIndexFunc, 2150 static_cast<VTKMapper *>(this), _1)); 2151 2152 bool (VTKMapper::*subMaterialChunksObjectFunc)( 2153 MFMaterialChunkInternalPtr::ArgumentType) = 2154 &VTKMapper::subMaterialChunks; 2155 returnValue->setSubObjectFunc( 2156 boost::bind( 2157 subMaterialChunksObjectFunc, 2158 static_cast<VTKMapper *>(this), _1)); 2159 returnValue->setClearFunc( 2160 boost::bind( 2161 &VTKMapper::clearMaterialChunks, 2162 static_cast<VTKMapper *>(this))); 1863 2163 1864 2164 editMField(MaterialChunksFieldMask, _mfMaterialChunks); … … 1883 2183 &_mfPositions, 1884 2184 this->getType().getFieldDesc(PositionsFieldId))); 1885 1886 // returnValue->setAddMethod(boost::bind(&VTKMapper::addPositions, 1887 // static_cast<VTKMapper *>(this), _1)); 2185 returnValue->setAddFunc( 2186 boost::bind( 2187 &VTKMapper::addPositions, 2188 static_cast<VTKMapper *>(this), _1)); 2189 returnValue->setInsertFunc( 2190 boost::bind( 2191 &VTKMapper::insertPositions, 2192 static_cast<VTKMapper *>(this), _1, _2)); 2193 2194 void (VTKMapper::*replacePositionsIndexFunc)( 2195 UInt32 const, 2196 MFGeoPnt3fPropertyInternalPtr::ArgumentType) = 2197 &VTKMapper::replacePositions; 2198 returnValue->setReplaceIndexFunc( 2199 boost::bind( 2200 replacePositionsIndexFunc, 2201 static_cast<VTKMapper *>(this), _1, _2)); 2202
