Package railo.runtime.img.math

Examples of railo.runtime.img.math.Function2D.evaluate()


        if (bumpSource != BUMPS_FROM_BEVEL) {
          // Complicated and slower method
          // Calculate four normals using the gradients in +/- X/Y directions
          int count = 0;
          normal.x = normal.y = normal.z = 0;
          float m0 = width45*bump.evaluate(nx, ny);
          float m1 = x > 0 ? width45*bump.evaluate(nx - 1.0f, ny)-m0 : -2;
          float m2 = y > 0 ? width45*bump.evaluate(nx, ny - 1.0f)-m0 : -2;
          float m3 = x < width-1 ? width45*bump.evaluate(nx + 1.0f, ny)-m0 : -2;
          float m4 = y < height-1 ? width45*bump.evaluate(nx, ny + 1.0f)-m0 : -2;
         
View Full Code Here


          // Complicated and slower method
          // Calculate four normals using the gradients in +/- X/Y directions
          int count = 0;
          normal.x = normal.y = normal.z = 0;
          float m0 = width45*bump.evaluate(nx, ny);
          float m1 = x > 0 ? width45*bump.evaluate(nx - 1.0f, ny)-m0 : -2;
          float m2 = y > 0 ? width45*bump.evaluate(nx, ny - 1.0f)-m0 : -2;
          float m3 = x < width-1 ? width45*bump.evaluate(nx + 1.0f, ny)-m0 : -2;
          float m4 = y < height-1 ? width45*bump.evaluate(nx, ny + 1.0f)-m0 : -2;
         
          if (m1 != -2 && m4 != -2) {
View Full Code Here

          // Calculate four normals using the gradients in +/- X/Y directions
          int count = 0;
          normal.x = normal.y = normal.z = 0;
          float m0 = width45*bump.evaluate(nx, ny);
          float m1 = x > 0 ? width45*bump.evaluate(nx - 1.0f, ny)-m0 : -2;
          float m2 = y > 0 ? width45*bump.evaluate(nx, ny - 1.0f)-m0 : -2;
          float m3 = x < width-1 ? width45*bump.evaluate(nx + 1.0f, ny)-m0 : -2;
          float m4 = y < height-1 ? width45*bump.evaluate(nx, ny + 1.0f)-m0 : -2;
         
          if (m1 != -2 && m4 != -2) {
            v1.x = -1.0f; v1.y = 0.0f; v1.z = m1;
View Full Code Here

          int count = 0;
          normal.x = normal.y = normal.z = 0;
          float m0 = width45*bump.evaluate(nx, ny);
          float m1 = x > 0 ? width45*bump.evaluate(nx - 1.0f, ny)-m0 : -2;
          float m2 = y > 0 ? width45*bump.evaluate(nx, ny - 1.0f)-m0 : -2;
          float m3 = x < width-1 ? width45*bump.evaluate(nx + 1.0f, ny)-m0 : -2;
          float m4 = y < height-1 ? width45*bump.evaluate(nx, ny + 1.0f)-m0 : -2;
         
          if (m1 != -2 && m4 != -2) {
            v1.x = -1.0f; v1.y = 0.0f; v1.z = m1;
            v2.x = 0.0f; v2.y = 1.0f; v2.z = m4;
View Full Code Here

          normal.x = normal.y = normal.z = 0;
          float m0 = width45*bump.evaluate(nx, ny);
          float m1 = x > 0 ? width45*bump.evaluate(nx - 1.0f, ny)-m0 : -2;
          float m2 = y > 0 ? width45*bump.evaluate(nx, ny - 1.0f)-m0 : -2;
          float m3 = x < width-1 ? width45*bump.evaluate(nx + 1.0f, ny)-m0 : -2;
          float m4 = y < height-1 ? width45*bump.evaluate(nx, ny + 1.0f)-m0 : -2;
         
          if (m1 != -2 && m4 != -2) {
            v1.x = -1.0f; v1.y = 0.0f; v1.z = m1;
            v2.x = 0.0f; v2.y = 1.0f; v2.z = m4;
            n.cross(v1, v2);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.