diff --git a/Src_CC_wrap/PoissonReconLib.cpp b/Src_CC_wrap/PoissonReconLib.cpp index 50ae8d3..875c376 100644 --- a/Src_CC_wrap/PoissonReconLib.cpp +++ b/Src_CC_wrap/PoissonReconLib.cpp @@ -440,29 +440,15 @@ static bool Execute(PointStream& pointStream, const PoissonReconLib::Parameters& params, UIntPack ) { - if (params.depth < 2) - { - //depth should be greater than 2 - assert(false); - return false; - } - static const int Dim = sizeof...(FEMSigs); - typedef UIntPack Sigs; typedef UIntPack::Degree...> Degrees; typedef UIntPack::BType, 1>::BType>::Signature...> NormalSigs; typedef typename FEMTree::template DensityEstimator DensityEstimator; typedef typename FEMTree::template InterpolationInfo InterpolationInfo; - //default parameters + // Compute scaling transformation (and optionally the depth) int depth = params.depth; - const int full_depth = 5; - const int solve_depth = depth; - const bool exact_interpolation = false; - const Real target_value = static_cast(0.5); - - // Compute scaling transformation XForm xForm = XForm::Identity(); { if (params.finestCellWidth > 0) @@ -477,6 +463,19 @@ static bool Execute(PointStream& pointStream, pointStream.xform = &xForm; } + if (depth < 2) + { + //depth should be greater than 2 + assert(false); + return false; + } + + //default parameters + const int solve_depth = depth; + const int full_depth = 5; + const bool exact_interpolation = false; + const Real target_value = static_cast(0.5); + // Read in the samples (and color data) FEMTree tree(MEMORY_ALLOCATOR_BLOCK_SIZE); typedef std::vector::PointSample> SampleSet; @@ -597,7 +596,7 @@ static bool Execute(PointStream& pointStream, // Trim the tree and prepare for multigrid { - constexpr int MAX_DEGREE = std::max(NORMAL_DEGREE, Degrees::Max()); + constexpr int MAX_DEGREE = NORMAL_DEGREE > Degrees::Max() ? NORMAL_DEGREE : Degrees::Max(); tree.template finalizeForMultigrid( full_depth, typename FEMTree::template HasNormalDataFunctor(*normalInfo), diff --git a/Src_CC_wrap/PoissonReconLib.h b/Src_CC_wrap/PoissonReconLib.h index 84d8214..40245c1 100644 --- a/Src_CC_wrap/PoissonReconLib.h +++ b/Src_CC_wrap/PoissonReconLib.h @@ -18,6 +18,8 @@ #ifndef CC_POISSON_RECON_LIB_WRAPPER #define CC_POISSON_RECON_LIB_WRAPPER +#include + //! Wrapper to use PoissonRecon (Kazhdan et. al) as a library class PoissonReconLib {