Package toxi.geom

Examples of toxi.geom.Vec3D.magSquared()


        setRadius(radius);
    }

    public void apply(VerletParticle3D p) {
        Vec3D delta = attractor.sub(p);
        float dist = delta.magSquared();
        if (dist < radiusSquared) {
            Vec3D f = delta.normalizeTo((1.0f - dist / radiusSquared))
                    .jitter(jitter).scaleSelf(attrStrength);
            p.addForce(f);
        }
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.