Example #1
0
  public BoundingBox calcBoundingBox() {
    BoundingBox bbox = new BoundingBox();

    if (isSetCurveMember()) {
      for (CurveProperty curveProperty : getCurveMember())
        if (curveProperty.isSetCurve()) bbox.update(curveProperty.getCurve().calcBoundingBox());
    }

    if (isSetCurveMembers()) {
      CurveArrayProperty curveArrayProperty = getCurveMembers();

      if (curveArrayProperty.isSetCurve())
        for (AbstractCurve abstractCurve : curveArrayProperty.getCurve())
          bbox.update(abstractCurve.calcBoundingBox());
    }

    if (bbox.getLowerCorner().isEqual(Double.MAX_VALUE)
        && bbox.getUpperCorner().isEqual(-Double.MAX_VALUE)) return null;
    else return bbox;
  }