MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / makeFeaturePseudoInfinite

Function makeFeaturePseudoInfinite

source/MRMesh/MRFeatureRefine.cpp:211–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void 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

Callers 1

refineFeatureObjectFunction · 0.85

Calls 4

setSizeMethod · 0.80
setHeightMethod · 0.80
diagonalMethod · 0.45
setLengthMethod · 0.45

Tested by

no test coverage detected