Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion external/ponca
15 changes: 8 additions & 7 deletions src/dataManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,14 @@ DataManager::getDrawingPass(size_t index){
WRITE_NEW_FIT_CASE(2,SphereFitField)
WRITE_NEW_FIT_CASE(3,OrientedSphereFitField)
WRITE_NEW_FIT_CASE(4,UnorientedSphereFitField)
WRITE_NEW_FIT_CASE(5,BestPlaneFitField)
WRITE_NEW_FIT_CASE(6,BestSphereFitField)
WRITE_NEW_FIT_CASE(7,BestOrientedSphereFitField)
WRITE_NEW_FIT_CASE(8,OnePlaneFitField)
WRITE_NEW_FIT_CASE(9,OneSphereFitField)
WRITE_NEW_FIT_CASE(10,OneOrientedSphereFitField)
WRITE_NEW_FIT_CASE(11,DistanceFieldFromOnePoint)
WRITE_NEW_FIT_CASE(5,HRBFFitField)
WRITE_NEW_FIT_CASE(6,BestPlaneFitField)
WRITE_NEW_FIT_CASE(7,BestSphereFitField)
WRITE_NEW_FIT_CASE(8,BestOrientedSphereFitField)
WRITE_NEW_FIT_CASE(9,OnePlaneFitField)
WRITE_NEW_FIT_CASE(10,OneSphereFitField)
WRITE_NEW_FIT_CASE(11,OneOrientedSphereFitField)
WRITE_NEW_FIT_CASE(12,DistanceFieldFromOnePoint)

default: throw std::runtime_error("Unknown Field type!");
}
Expand Down
32 changes: 17 additions & 15 deletions src/dataManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,21 @@ struct DataManager {
void computeNormals(int k = 3);

/// Names of the supported drawing passes
static constexpr size_t nbSupportedDrawingPasses = 12;
static constexpr size_t nbSupportedDrawingPasses = 13;
const std::map<const std::string, size_t> supportedDrawingPasses {
{"Distance Field", 0},
{"MLS - Plane", 1},
{"MLS - Sphere", 2},
{"MLS - Oriented Sphere", 3},
{"MLS - Unoriented Sphere", 4},
{"Best Fit - Plane", 5},
{"Best Fit - Sphere", 6},
{"Best Fit - Oriented Sphere", 7},
{"One Fit - Plane", 8},
{"One Fit - Sphere", 9},
{"One Fit - Oriented Sphere", 10},
{"One Point - Scale", 11}
{"Global - HRBF", 5},
{"Best Fit - Plane", 6},
{"Best Fit - Sphere", 7},
{"Best Fit - Oriented Sphere", 8},
{"One Fit - Plane", 9},
{"One Fit - Sphere", 10},
{"One Fit - Oriented Sphere", 11},
{"One Point - Scale", 12}
};

DrawingPass* getDrawingPass(const std::string& name);
Expand All @@ -106,13 +107,14 @@ struct DataManager {
WRITE_FIT_CASE(2,SphereFitField)
WRITE_FIT_CASE(3,OrientedSphereFitField)
WRITE_FIT_CASE(4,UnorientedSphereFitField)
WRITE_FIT_CASE(5,BestPlaneFitField)
WRITE_FIT_CASE(6,BestSphereFitField)
WRITE_FIT_CASE(7,BestOrientedSphereFitField)
WRITE_FIT_CASE(8,OnePlaneFitField)
WRITE_FIT_CASE(9,OneSphereFitField)
WRITE_FIT_CASE(10,OneOrientedSphereFitField)
WRITE_FIT_CASE(11,DistanceFieldFromOnePoint)
WRITE_FIT_CASE(5,HRBFFitField)
WRITE_FIT_CASE(6,BestPlaneFitField)
WRITE_FIT_CASE(7,BestSphereFitField)
WRITE_FIT_CASE(8,BestOrientedSphereFitField)
WRITE_FIT_CASE(9,OnePlaneFitField)
WRITE_FIT_CASE(10,OneSphereFitField)
WRITE_FIT_CASE(11,OneOrientedSphereFitField)
WRITE_FIT_CASE(12,DistanceFieldFromOnePoint)
default: return false;
}
return true;
Expand Down
2 changes: 2 additions & 0 deletions src/drawingPasses/bestFieldFit.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,5 @@ struct OneSphereFitField : public OnePointFitField<ConstSphereFit>{
struct OneOrientedSphereFitField : public OnePointFitField<ConstOrientedSphereFit>{
void postProcess(typename OnePointFitField<ConstOrientedSphereFit>::FitType& fit) override { fit.applyPrattNorm(); };
};

using HRBFFitField = OnePointFitField<HRBFFit>;
2 changes: 1 addition & 1 deletion src/poncaTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ using ConstSphereFit = Ponca::Basket<DataPoint ,ConstWeightFunc, Ponca::SphereFi
using OrientedSphereFit= Ponca::Basket<DataPoint ,WeightFunc, Ponca::OrientedSphereFit>;
using ConstOrientedSphereFit= Ponca::Basket<DataPoint ,ConstWeightFunc, Ponca::OrientedSphereFit>;
using UnorientedSphereFit = Ponca::Basket<DataPoint ,WeightFunc, Ponca::UnorientedSphereFit>;

using HRBFFit = Ponca::HRBF<DataPoint>;



Expand Down
Loading