コード例 #1
0
  public GeoElement[] getTransformedOutput(Transform t) {

    GeoPointND p1 =
        (GeoPointND)
            t.transform((GeoElement) origin, Transform.transformedGeoLabel((GeoElement) origin))[0];
    GeoPointND p2 =
        (GeoPointND)
            t.transform(
                    (GeoElement) secondPoint,
                    Transform.transformedGeoLabel((GeoElement) secondPoint))[0];
    Transform.setVisualStyleForTransformations((GeoElement) origin, (GeoElement) p1);
    Transform.setVisualStyleForTransformations((GeoElement) secondPoint, (GeoElement) p2);

    GeoNumeric r = (new AlgoRadius(this.cons, null, getQuadric().getBottom())).getRadius();
    r.setAuxiliaryObject(true);

    GeoElement[] output = getOutput();
    String[] labels = new String[output.length];
    for (int i = 0; i < output.length; i++) {
      labels[i] = Transform.transformedGeoLabel(output[i]);
    }

    AlgoElement algo = getTransformedAlgo(labels, p1, p2, r);

    GeoElement[] ret = algo.getOutput();
    for (int i = 0; i < ret.length; i++) {
      Transform.setVisualStyleForTransformations(output[i], ret[i]);
    }

    algo.update();

    return ret;
  }
コード例 #2
0
  // for AlgoElement
  @Override
  protected void setInputOutput() {
    input = new GeoElement[1];
    input[0] = root;

    super.setOutputLength(1);
    super.setOutput(0, list);
    setDependencies(); // done by AlgoElement
    inputFingerprint = fingerprint(root);
  }
コード例 #3
0
  @Override
  protected void setInputOutput() {
    input = new GeoElement[3];
    input[0] = inputPoint1.toGeoElement();
    input[1] = inputPoint2.toGeoElement();
    input[2] = inputPoint3.toGeoElement();

    super.setOutputLength(1);
    super.setOutput(0, outputBoolean);
    setDependencies(); // done by AlgoElement
  }