Commit df6af6fe authored by Daniel Schramm's avatar Daniel Schramm
Browse files

Method for radius computation extracted

parent 7695a587
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ public class HausdorffDistancePrioritized extends HumanFaceVisitor {
        humanFace.getMeshModel().compute(distanceVisitor, inParallel());
        
        final FeaturePoint featurePoint = humanFace.getFeaturePoints().get(featurePointType.getType());
        final PrioritySphere priorityVisitor = new PrioritySphere(featurePoint.getPosition(), 1 /*TODO TEMPORARY - sphere radius needs to be computed dynamically*/);
        final PrioritySphere priorityVisitor = new PrioritySphere(featurePoint.getPosition(), computeSphereRadius(humanFace));
        humanFace.getMeshModel().compute(priorityVisitor, inParallel());
        
        synchronized(this) {
@@ -231,4 +231,12 @@ public class HausdorffDistancePrioritized extends HumanFaceVisitor {
            priorities.putAll(priorityVisitor.getPriorities());
        }
    }
    
    private double computeSphereRadius(HumanFace humanFace) {
        // TODO TEMPORARY
        // Sphere radius needs to be computed dynamically.
        // The best way to compute the right radius should be thought out in more depth.
        return 1;
        // TODO TEMPORARY
    }
}