Пример #1
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;
    }
  }