Package ca.grimoire.jnoise.config

Examples of ca.grimoire.jnoise.config.BuilderException


   * @throws BuilderException
   *           if the source module has not been provided.
   */
  public Sawtooth createModule () throws BuilderException {
    if (!hasFrequency)
      throw new BuilderException ("Sawtooth requires frequency.");
    if (!hasAmplitude)
      throw new BuilderException ("Sawtooth requires amplitude.");
    if (frequency < 0.0)
      throw new BuilderException ("Sawtooth requires non-negative frequency.");

    return new Sawtooth (getSource ().createModule (), frequency, amplitude);
  }
View Full Code Here


    this.hasSeed = true;
  }

  private void checkLacunarity () throws BuilderException {
    if (!hasLacunarity)
      throw new BuilderException (
          "Perlin module requires lacunarity coefficient.");
  }
View Full Code Here

          "Perlin module requires lacunarity coefficient.");
  }

  private void checkOctaves () throws BuilderException {
    if (!hasOctaves || octaves <= 0)
      throw new BuilderException (
          "Perlin module requires a positive octaves count.");
  }
View Full Code Here

          "Perlin module requires a positive octaves count.");
  }

  private void checkPersistance () throws BuilderException {
    if (!hasPersistence)
      throw new BuilderException (
          "Perlin module requires persistence coefficient.");
  }
View Full Code Here

          "Perlin module requires persistence coefficient.");
  }

  private void checkQuality () throws BuilderException {
    if (quality == null)
      throw new BuilderException ("Perlin module requires quality.");
  }
View Full Code Here

      throw new BuilderException ("Perlin module requires quality.");
  }

  private void checkSeed () throws BuilderException {
    if (!hasSeed)
      throw new BuilderException ("Perlin module requires a seed number.");
  }
View Full Code Here

   * @throws BuilderException
   *           if the source module has not been provided.
   */
  public Cylinder createModule () throws BuilderException {
    if (!hasFrequency)
      throw new BuilderException ("Cylinder requires frequency.");
    if (!hasAmplitude)
      throw new BuilderException ("Cylinder requires amplitude.");
    if (frequency < 0.0)
      throw new BuilderException ("Cylinder requires non-negative frequency.");

    return new Cylinder (frequency, amplitude);
  }
View Full Code Here

   * @throws BuilderException
   *           if the source module has not been provided.
   */
  public Gradient createModule () throws BuilderException {
    if (!hasFrequency)
      throw new BuilderException ("Gradient requires frequency.");
    if (!hasAmplitude)
      throw new BuilderException ("Gradient requires amplitude.");
    if (frequency < 0.0)
      throw new BuilderException ("Gradient requires non-negative frequency.");

    return new Gradient (frequency, amplitude);
  }
View Full Code Here

   * @throws BuilderException
   *           if the source module has not been provided.
   */
  public Sphere createModule () throws BuilderException {
    if (!hasFrequency)
      throw new BuilderException ("Sphere requires frequency.");
    if (!hasAmplitude)
      throw new BuilderException ("Sphere requires amplitude.");
    if (frequency < 0.0)
      throw new BuilderException ("Sphere requires non-negative frequency.");

    return new Sphere (frequency, amplitude);
  }
View Full Code Here

    hasWeight = true;
  }

  private void checkFrequency () throws BuilderException {
    if (!hasFrequency)
      throw new BuilderException (
          "RidgedMultifractal module requires a frequency.");
  }
View Full Code Here

TOP

Related Classes of ca.grimoire.jnoise.config.BuilderException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.