| 209 | } |
| 210 | |
| 211 | void makeFeaturePseudoInfinite( std::shared_ptr<FeatureObject>& feature, const Box3f& boundingBox ) |
| 212 | { |
| 213 | constexpr float cMultiplierPseudoInfinite = 5.0f; |
| 214 | const auto newDimension = boundingBox.diagonal() * cMultiplierPseudoInfinite; |
| 215 | |
| 216 | if ( auto plane = std::dynamic_pointer_cast<PlaneObject>( feature ) ) |
| 217 | { |
| 218 | plane->setSize( newDimension ); |
| 219 | } |
| 220 | else if ( auto cylinder = std::dynamic_pointer_cast<CylinderObject>( feature ) ) |
| 221 | { |
| 222 | cylinder->setLength( newDimension ); |
| 223 | } |
| 224 | else if ( auto cone = std::dynamic_pointer_cast<ConeObject>( feature ) ) |
| 225 | { |
| 226 | cone->setHeight( newDimension ); |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | } // namespace |
| 231 |
no test coverage detected