Package libnoiseforjava.model

Examples of libnoiseforjava.model.Sphere


      // Resize the destination noise map so that it can store the new output
      // values from the source model.
      destNoiseMap.setSize (destWidth, destHeight);

      // Create the plane model.
      Sphere sphereModel = new Sphere();
      sphereModel.setModule (sourceModule);

      double lonExtent = eastLonBound  - westLonBound ;
      double latExtent = northLatBound - southLatBound;
      double xDelta = lonExtent / (double)destWidth ;
      double yDelta = latExtent / (double)destHeight;
      double curLon = westLonBound ;
      double curLat = southLatBound;

      // Fill every point in the noise map with the output values from the model.
      for (int y = 0; y < destHeight; y++)
      {
         curLon = westLonBound;
         for (int x = 0; x < destWidth; x++)
         {
            float curValue = (float)sphereModel.getValue (curLat, curLon);
            destNoiseMap.setValue(x, y, curValue);
            curLon += xDelta;
         }
         curLat += yDelta;
         setCallback(y);
View Full Code Here

TOP

Related Classes of libnoiseforjava.model.Sphere

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.