Examples of VelocityInterpolator


Examples of com.barrybecker4.simulation.liquid.compute.VelocityInterpolator

        g.setStroke( PARTICLE_VELOCITY_STROKE);
        g.setColor( PARTICLE_VELOCITY_COLOR );
        double[] a_ = new double[2];
        Grid grid = env_.getGrid();
        VelocityInterpolator interpolator = new VelocityInterpolator(grid);
        double maxY = getMaxY();

        for (Particle p : env_.getParticles()) {
            if (options.getShowVelocities()) {
                Vector2d vel = interpolator.findVelocity(p);
                p.get(a_);
                double x = (scale_ * a_[0]) + OFFSET;

                double xLen = x + VELOCITY_SCALE * vel.x;
                double y = maxY - scale_ * a_[1];
 
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.