| 172 | } |
| 173 | |
| 174 | std::shared_ptr<MR::ObjectPoints> cloneRegion( const std::shared_ptr<ObjectPoints>& objPoints, const VertBitSet& region ) |
| 175 | { |
| 176 | VertMap vertMap; |
| 177 | CloudPartMapping partMapping; |
| 178 | if ( !objPoints->getVertsColorMap().empty() ) |
| 179 | partMapping.tgt2srcVerts = &vertMap; |
| 180 | std::shared_ptr<PointCloud> newCloud = std::make_shared<PointCloud>(); |
| 181 | newCloud->addPartByMask( *objPoints->pointCloud(), region, partMapping ); |
| 182 | |
| 183 | std::shared_ptr<ObjectPoints> newObj = std::make_shared<ObjectPoints>(); |
| 184 | newObj->setFrontColor( objPoints->getFrontColor( true ), true ); |
| 185 | newObj->setFrontColor( objPoints->getFrontColor( false ), false ); |
| 186 | newObj->setBackColor( objPoints->getBackColor() ); |
| 187 | newObj->setPointCloud( newCloud ); |
| 188 | newObj->setAllVisualizeProperties( objPoints->getAllVisualizeProperties() ); |
| 189 | newObj->copyColors( *objPoints, vertMap ); |
| 190 | newObj->setName( objPoints->name() + "_part" ); |
| 191 | return newObj; |
| 192 | } |
| 193 | |
| 194 | std::shared_ptr<ObjectPoints> pack( const ObjectPoints& pts, Reorder reorder, VertBitSet* newValidVerts, const ProgressCallback & cb ) |
| 195 | { |
nothing calls this directly
no test coverage detected