Package ca.grimoire.jnoise.config

Examples of ca.grimoire.jnoise.config.BuilderException


          "RidgedMultifractal module requires a frequency.");
  }

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


          "RidgedMultifractal module requires lacunarity coefficient.");
  }

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

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

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

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

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

          "RidgedMultifractal module requires a seed number.");
  }

  private void checkWeight () throws BuilderException {
    if (!hasWeight)
      throw new BuilderException (
          "RidgedMultifractal module requires a weight.");
  }
View Full Code Here

   */
  public final void addChild (Element child) throws BuilderException {
    assert (child != null);

    if (!(child instanceof ModuleBuilder))
      throw new BuilderException ("Element only accepts modules as children.");

    sources.add ((ModuleBuilder) child);
  }
View Full Code Here

   */
  public void addChild (Element child) throws BuilderException {
    assert (child != null);

    if (source != null)
      throw new BuilderException ("Element can only have one source module.");
    if (!(child instanceof ModuleBuilder))
      throw new BuilderException (
          "Element can only have a module as a sources.");

    setSource ((ModuleBuilder) child);
  }
View Full Code Here

   * @throws BuilderException
   *           if no source has been configured.
   */
  public final ModuleBuilder getSource () throws BuilderException {
    if (source == null)
      throw new BuilderException ("Transformation missing source module.");
    return source;
  }
View Full Code Here

   * @see #setValue(double)
   * @see ModuleBuilder#createModule()
   */
  public Constant createModule () throws BuilderException {
    if (!valueSet)
      throw new BuilderException ("No noise value for constant module.");

    return new Constant (value);
  }
View Full Code Here

    return new Cache (createSource ());
  }

  private Module createSource () throws BuilderException {
    if (source == null)
      throw new BuilderException ("No source module for cache.");
    return source.createModule ();
  }
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.