use of org.twak.viewTrace.facades.WallTag in project chordatlas by twak.
the class SkelGen method tagWalls.
public static Profile tagWalls(Profile profile, float[] roofColor, SuperEdge se, Point2d s, Point2d e) {
MiniFacade mini;
if (se.toEdit == null) {
if (se.mini == null || (se.mini.isEmpty() && se.proceduralFacade == null))
mini = null;
else {
double[] range = findRange(se, s, e, se.proceduralFacade == null ? null : se.proceduralFacade.megafacade);
if (range == null)
mini = null;
else
mini = new Regularizer().go(se.mini, range[0], range[1], se.proceduralFacade);
}
} else
// second time through, use the edited results
mini = se.toEdit;
Tag wall = new WallTag(se.profLine, se.occlusions, mini), roof = new RoofTag(roofColor);
boolean first = true;
for (Loop<Bar> lb : profile.points) {
for (Loopable<Bar> ll : lb.loopableIterator()) {
Bar b = ll.get();
if (// || ll != lb.start && isRoof ( ll.getPrev().get() ) && b.start.distanceSquared( b.end ) < 16 )
isRoof(b))
b.tags.add(roof);
else {
if (first)
b.tags.add(new WallTag(se.profLine, se.occlusions, mini, true));
else
b.tags.add(wall);
}
}
first = false;
}
return profile;
}
Aggregations