Package libnoiseforjava.exception

Examples of libnoiseforjava.exception.ExceptionInvalidParam


   public void setBounds (double southLatBound, double northLatBound,
         double westLonBound, double eastLonBound) throws ExceptionInvalidParam
   {
      if (southLatBound >= northLatBound
            || westLonBound >= eastLonBound)
         throw new ExceptionInvalidParam ("Invalid Parameter in NoiseMapBuilderSphere");

      this.southLatBound = southLatBound;
      this.northLatBound = northLatBound;
      this.westLonBound  = westLonBound ;
      this.eastLonBound  = eastLonBound ;
View Full Code Here


            // Exit now.
            break;
         } else if (gradientPos == gradientPoints[insertionPos].position) {
            // Each gradient point is required to contain a unique gradient
            // position, so throw an exception.
            throw new ExceptionInvalidParam ("Invalid Parameter in Gradient Color");
         }
      }
      return insertionPos;
   }
View Full Code Here

      if ( sourceNoiseMap == null
            || destImageCafe == null
            || sourceNoiseMap.getWidth  () <= 0
            || sourceNoiseMap.getHeight () <= 0
            || gradient.getGradientPointCount () < 2)
         throw new ExceptionInvalidParam ("Invalid Parameter in RendererImage");


      int width  = sourceNoiseMap.getWidth  ();
      int height = sourceNoiseMap.getHeight ();

      // If a background image was provided, make sure it is the same size the
      // source noise map.
      if (backgroundImage != null)
         if ( backgroundImage.getWidth  () != width || backgroundImage.getHeight () != height)
            throw new ExceptionInvalidParam ("Invalid Parameter in RendererImage");


      // Create the destination image.  It is safe to reuse it if this is also the
      // background image.
      if (destImageCafe != backgroundImage)
View Full Code Here

   /// Make sure the light source is enabled via a call to the
   /// EnableLight() method before calling the Render() method.
   public void setLightContrast (double lightContrast) throws ExceptionInvalidParam
   {
      if (lightContrast <= 0.0
         throw new ExceptionInvalidParam ("Invalid Parameter in RendererImage");


      this.lightContrast = lightContrast;
      this.recalcLightValues = true;
   }
View Full Code Here

   /// Make sure the light source is enabled via a call to the
   /// enableLight() method before calling the render() method.
   public void setLightIntensity (double lightIntensity) throws ExceptionInvalidParam
   {
      if (lightIntensity < 0.0)
         throw new ExceptionInvalidParam ("Invalid Parameter in RendererImage");

      this.lightIntensity = lightIntensity;
      this.recalcLightValues = true;
   }
View Full Code Here

   /// calculate the ridged-multifractal-noise value.
   public void setOctaveCount (int octaveCount) throws ExceptionInvalidParam
   {
      if (octaveCount > RIDGED_MAX_OCTAVE)
      {
         throw new ExceptionInvalidParam ("An invalid parameter was passed" +
         " to a libnoise function or method.");
      }

      this.octaveCount = octaveCount;
   }
View Full Code Here

   /// calculate the Perlin-noise value.
   public void setOctaveCount (int octaveCount) throws ExceptionInvalidParam
   {
      if (octaveCount < 1 || octaveCount > PERLIN_MAX_OCTAVE)
      {
         throw new ExceptionInvalidParam ("Invalid parameter In Perlin Noise Module");
      }

      this.octaveCount = octaveCount;
   }
View Full Code Here

            // Exit now.
            break;
         else if (value == controlPoints[insertionPos])
            // Each control point is required to contain a unique value, so throw
            // an exception.
            throw new ExceptionInvalidParam ("Invalid Parameter in Terrace Noise Moduled");       
      }
      return insertionPos;
   }
View Full Code Here

   /// start of this curve has a slope of zero; its slope then smoothly
   /// increases.  At the control points, its slope resets to zero.
   void makeControlPoints (int controlPointCount) throws ExceptionInvalidParam
   {
      if (controlPointCount < 2)
         throw new ExceptionInvalidParam ("Invalid Parameter in Terrace Noise Module");

      clearAllControlPoints ();

      double terraceStep = 2.0 / ((double)controlPointCount - 1.0);
      double curValue = -1.0;
View Full Code Here

TOP

Related Classes of libnoiseforjava.exception.ExceptionInvalidParam

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.