Search in sources :

Example 1 with ModeCollector

use of org.twak.viewTrace.ModeCollector in project chordatlas by twak.

the class SkelFootprint method updateHeights.

private static void updateHeights(HalfMesh2 mesh) {
    for (HalfFace hf : mesh) {
        SuperFace sf = (SuperFace) hf;
        sf.height = sf.heights.stream().sorted().collect(new ModeCollector(0.5));
        if (Double.isNaN(sf.height))
            sf.height = 0;
    }
}
Also used : HalfFace(org.twak.utils.geom.HalfMesh2.HalfFace) ModeCollector(org.twak.viewTrace.ModeCollector)

Aggregations

HalfFace (org.twak.utils.geom.HalfMesh2.HalfFace)1 ModeCollector (org.twak.viewTrace.ModeCollector)1