Package net.royawesome.jlibnoise.exception

Examples of net.royawesome.jlibnoise.exception.NoModuleException


  }

  public Module getSourceModule(int index) {
    if (index >= GetSourceModuleCount() || index < 0 || SourceModule[index] == null) {
      throw new NoModuleException();
    }
    return (SourceModule[index]);

  }
View Full Code Here


  }

  @Override
  public double GetValue(double x, double y, double z) {
    if (SourceModule[0] == null)
      throw new NoModuleException();

    if (!(isCached && x == xCache && y == yCache && z == zCache)) {
      cachedValue = SourceModule[0].GetValue(x, y, z);
      xCache = x;
      yCache = y;
View Full Code Here

  }

  @Override
  public double GetValue(double x, double y, double z) {
    if (SourceModule[0] == null)
      throw new NoModuleException();
    if (SourceModule[1] == null)
      throw new NoModuleException();

    double v0 = SourceModule[0].GetValue(x, y, z);
    double v1 = SourceModule[1].GetValue(x, y, z);
    return Utils.GetMax(v0, v1);
  }
View Full Code Here

  }

  @Override
  public double GetValue(double x, double y, double z) {
    if (SourceModule[0] == null)
      throw new NoModuleException();
    if (SourceModule[1] == null)
      throw new NoModuleException();

    return SourceModule[0].GetValue(x, y, z) * SourceModule[1].GetValue(x, y, z);
  }
View Full Code Here

  }

  @Override
  public double GetValue(double x, double y, double z) {
    if (SourceModule[0] == null)
      throw new NoModuleException();
    if (SourceModule[1] == null)
      throw new NoModuleException();

    return Math.pow(SourceModule[0].GetValue(x, y, z), SourceModule[1].GetValue(x, y, z));

  }
View Full Code Here

  }

  @Override
  public double GetValue(double x, double y, double z) {
    if (SourceModule[0] == null)
      throw new NoModuleException();
    if (SourceModule[1] == null)
      throw new NoModuleException();
    return SourceModule[0].GetValue(x, y, z) + SourceModule[1].GetValue(x, y, z);
  }
View Full Code Here

    super(3);
  }

  public Module getControlModule() {
    if (SourceModule[2] == null)
      throw new NoModuleException();
    return SourceModule[2];
  }
View Full Code Here

  }

  @Override
  public double GetValue(double x, double y, double z) {
    if (SourceModule[0] == null)
      throw new NoModuleException();
    if (SourceModule[1] == null)
      throw new NoModuleException();
    if (SourceModule[2] == null)
      throw new NoModuleException();

    double v0 = SourceModule[0].GetValue(x, y, z);
    double v1 = SourceModule[1].GetValue(x, y, z);
    double alpha = (SourceModule[2].GetValue(x, y, z) + 1.0) / 2.0;
    return Utils.LinearInterp(v0, v1, alpha);
View Full Code Here

   *      the 0.0 to 1.0 range; the output value will be extrapolated along
   *      the line that this segment is part of.
   */
  public double getValue(double p) {
    if (module == null)
      throw new NoModuleException();

    double x = (x1 - x0) * p + x0;
    double y = (y1 - y0) * p + y0;
    double z = (z1 - z0) * p + z0;
    double value = module.GetValue(x, y, z);
View Full Code Here

    super(3);
  }

  public Module getControlModule() {
    if (SourceModule == null || SourceModule[2] == null) {
      throw new NoModuleException();
    }
    return SourceModule[2];
  }
View Full Code Here

TOP

Related Classes of net.royawesome.jlibnoise.exception.NoModuleException

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.