Examples of normalizeTo()


Examples of toxi.geom.Vec3D.normalizeTo()

    protected void alignAttachedParticle(DLAParticle p, Vec3D target) {
        Vec3D d = p.sub(target).normalize();
        d.interpolateToSelf(dirCurvePoint, config.getCurveAlign());
        d.scaleSelf(config.getGrowthScale());
        d.normalizeTo(config.getParticleRadius());
        p.set(target).addSelf(d);
    }

    /**
     * Checks if the given particle is close to an existing one or a curve. If
View Full Code Here

Examples of toxi.geom.Vec3D.normalizeTo()

        Vec3D mid = edge.getMidPoint();
        Vec3D n = edge.faces.get(0).normal;
        if (edge.faces.size() > 1) {
            n.addSelf(edge.faces.get(1).normal);
        }
        n.normalizeTo(amp * edge.getLength());
        List<Vec3D> points = new ArrayList<Vec3D>(3);
        points.add(mid.addSelf(n));
        return points;
    }

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.