Examples of scaleAdd()


Examples of com.jme.math.Vector3f.scaleAdd()

        // TODO: Add inertia and acceleration
        // TODO: Add ground collision detection and keep the camera above ground.

        final Vector3f newLocation = new Vector3f( camera.getLocation() );

        newLocation.scaleAdd( -deltaX * altitudeFactor, camera.getLeft(), newLocation );
        newLocation.scaleAdd( -deltaY * altitudeFactor, camera.getUp(), newLocation );

        camera.setLocation( newLocation );
    }

View Full Code Here

Examples of com.jme.math.Vector3f.scaleAdd()

        // TODO: Add ground collision detection and keep the camera above ground.

        final Vector3f newLocation = new Vector3f( camera.getLocation() );

        newLocation.scaleAdd( -deltaX * altitudeFactor, camera.getLeft(), newLocation );
        newLocation.scaleAdd( -deltaY * altitudeFactor, camera.getUp(), newLocation );

        camera.setLocation( newLocation );
    }

}
View Full Code Here

Examples of javax.vecmath.Point3d.scaleAdd()

/*      */     }
/* 3017 */     double dist = s;
/*      */
/* 3019 */     pi.setDistance(dist);
/* 3020 */     Point3d iPnt = new Point3d();
/* 3021 */     iPnt.scaleAdd(s, dir, ori);
/* 3022 */     pi.setPointCoordinatesVW(iPnt);
/*      */
/* 3025 */     return true;
/*      */   }
/*      */
View Full Code Here

Examples of javax.vecmath.Point3f.scaleAdd()

    // you could do something with this point if you wanted to
    // here we save it for the surface area/volume calculation

    if (doSaveSurfacePoints) {
      Point3f pt = new Point3f();
      pt.scaleAdd(f, edgeVector, pointA);
      surfacePoints.add(pt);
    }
    return edgeCount++;
  }
 
View Full Code Here

Examples of javax.vecmath.Point3f.scaleAdd()

    return (floor > iMax ? iMax : floor);
  }

  void offsetCenter(Point3f center) {
    Point3f pt = new Point3f();
    pt.scaleAdd((voxelCounts[0] - 1) / 2f, volumetricVectors[0], pt);
    pt.scaleAdd((voxelCounts[1] - 1) / 2f, volumetricVectors[1], pt);
    pt.scaleAdd((voxelCounts[2] - 1) / 2f, volumetricVectors[2], pt);
    volumetricOrigin.sub(center, pt);
  }
View Full Code Here

Examples of javax.vecmath.Point3f.scaleAdd()

  }

  void offsetCenter(Point3f center) {
    Point3f pt = new Point3f();
    pt.scaleAdd((voxelCounts[0] - 1) / 2f, volumetricVectors[0], pt);
    pt.scaleAdd((voxelCounts[1] - 1) / 2f, volumetricVectors[1], pt);
    pt.scaleAdd((voxelCounts[2] - 1) / 2f, volumetricVectors[2], pt);
    volumetricOrigin.sub(center, pt);
  }

  public void setDataDistanceToPlane(Point4f plane) {
View Full Code Here

Examples of javax.vecmath.Point3f.scaleAdd()

  void offsetCenter(Point3f center) {
    Point3f pt = new Point3f();
    pt.scaleAdd((voxelCounts[0] - 1) / 2f, volumetricVectors[0], pt);
    pt.scaleAdd((voxelCounts[1] - 1) / 2f, volumetricVectors[1], pt);
    pt.scaleAdd((voxelCounts[2] - 1) / 2f, volumetricVectors[2], pt);
    volumetricOrigin.sub(center, pt);
  }

  public void setDataDistanceToPlane(Point4f plane) {
    setPlaneParameters(plane);
View Full Code Here

Examples of javax.vecmath.Point3f.scaleAdd()

        continue;
      Point3f pt = offsetVertices[i];
      if (ptOffset != null)
        pt.add(ptOffset);
      if (normal != null && val != 0)
        pt.scaleAdd(val, normal, pt);
    }
    initialize(lighting, offsetVertices, null);
    return offsetVertices;
  }
View Full Code Here

Examples of javax.vecmath.Point3f.scaleAdd()

    }
    Point3f pt = new Point3f(v.volumetricOrigin);
    sb.append("1 1.0 ").append(pt.x).append(' ').append(pt.y).append(' ')
        .append(pt.z).append(" //BOGUS H ATOM ADDED FOR JVXL FORMAT\n");
    for (int i = 0; i < 3; i++)
      pt.scaleAdd(v.voxelCounts[i] - 1, v.volumetricVectors[i], pt);
    sb.append("2 2.0 ").append(pt.x).append(' ').append(pt.y).append(' ')
        .append(pt.z).append(" //BOGUS He ATOM ADDED FOR JVXL FORMAT\n");
  }

  /*
 
View Full Code Here

Examples of javax.vecmath.Point3f.scaleAdd()

          default:
            break;
          case 3: // three bonds needed RC
            getHybridizationAndAxes(i, z, x, "sp3b", false, true);
            pt = new Point3f();
            pt.scaleAdd(1.1f, z, atom);
            hAtoms[i][hPt++] = pt;
            if (vConnect != null)
              vConnect.add(atom);
            getHybridizationAndAxes(i, z, x, "sp3c", false, true);
            pt = new Point3f();
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.