Esempio n. 1
0
  protected static ColorGradient buildFireGradient() {
    ColorGradient gradient = ColorGradient.buildFire();

    gradient.add(RGBAColor.black());
    gradient.add(RGBAColor.black());
    gradient.add(RGBAColor.black());
    gradient.add(RGBAColor.black());

    return gradient;
  }
Esempio n. 2
0
 public void getColor(double u, double v, RGBAColor value) {
   u = u * 10;
   v = v * 10;
   int iu = (int) u;
   int iv = (int) v;
   double c1 = noise.fbmNoise2(iu, iv, 10);
   double c2 = noise.fbmNoise2(iu + 839, iv + 743, 10);
   value.setColor(c1, c2, 0.0, 1);
 }
Esempio n. 3
0
  /**
   * Evaluates this node.
   *
   * @param state Evolution state (current)
   * @param thread Thread number
   * @param input GPData storage object
   * @param stack ADF stack
   * @param individual Current individual
   * @param problem GP problem object
   */
  public void eval(
      final EvolutionState state,
      final int thread,
      final GPData input,
      final ADFStack stack,
      final GPIndividual individual,
      final Problem problem) {

    double x = param.Parameters.PROBLEM.currentX;
    double y = param.Parameters.PROBLEM.currentY;

    AbstractTexture t;
    RGBAColor c = new RGBAColor();

    Data rd = ((Data) (input));

    children[0].eval(state, thread, input, stack, individual, problem);
    t = rd.texture;

    t.getColor(x, y, c);

    rd.color = new Color(c.getRed(), c.getGreen(), c.getBlue());
  };
Esempio n. 4
0
  /**
   * Returns the color at supplied U and V values.
   *
   * @param u U value
   * @param v V value
   * @param value Color object
   */
  @Override
  public void getColor(double u, double v, RGBAColor value) {

    fur.getColor(u, v, value);
    value.setAlpha(r);
  };