use of org.poly2tri.triangulation.point.ardor3d.ArdorVector3PolygonPoint in project energy3d by concord-consortium.
the class CustomRoof method applySteinerPoint.
@Override
protected Polygon applySteinerPoint(final Polygon polygon) {
final ArrayList<Vector3> steinerPoints = new ArrayList<Vector3>(points.size());
for (int i = 1; i < points.size(); i++) {
final Vector3 p = getAbsPoint(i);
boolean found = false;
for (final Vector3 existingP : steinerPoints) {
if (Util.isEqual(p, existingP)) {
found = true;
break;
}
}
if (!found) {
steinerPoints.add(p);
polygon.addSteinerPoint(new ArdorVector3PolygonPoint(p));
}
}
return polygon;
}
use of org.poly2tri.triangulation.point.ardor3d.ArdorVector3PolygonPoint in project energy3d by concord-consortium.
the class HipRoof method applySteinerPoint.
@Override
protected Polygon applySteinerPoint(final Polygon polygon) {
final TriangulationPoint roofUpperPoint1 = new ArdorVector3PolygonPoint(getAbsPoint(1));
final TriangulationPoint roofUpperPoint2 = new ArdorVector3PolygonPoint(getAbsPoint(2));
polygon.addSteinerPoint(roofUpperPoint1);
if (!roofUpperPoint2.equals(roofUpperPoint1)) {
polygon.addSteinerPoint(roofUpperPoint2);
}
return polygon;
}
Aggregations