Exemple #1
0
  public void pathChanged(GeoPoint P) {
    PathParameter pp = P.getPathParameter();
    if (pp.t < 0.0) {
      pp.t = 0;
    }

    // calc point for given parameter
    P.x = startPoint.inhomX + pp.t * y;
    P.y = startPoint.inhomY - pp.t * x;
    P.z = 1.0;
  }
Exemple #2
0
  /*
   * Path interface
   */
  public void pointChanged(GeoPoint P) {
    super.pointChanged(P);

    // ensure that the point doesn't get outside the ray
    // i.e. ensure 0 <= t <= 1
    PathParameter pp = P.getPathParameter();
    if (pp.t < 0.0) {
      P.x = startPoint.x;
      P.y = startPoint.y;
      P.z = startPoint.z;
      pp.t = 0.0;
    }
  }