Package toxi.geom

Examples of toxi.geom.Vec3D.normalize()


    float pLen = vecPosStart.distanceTo(vecPosEnd);

    Vec3D vecDir = new Vec3D(vecPosStart.x - vecPosEnd.x, vecPosStart.y
        - vecPosEnd.y, 0);
    vecDir = vecDir.normalize();

    Vec3D vecDirOffset = vecDir.copy();

    vecDirOffset.rotateZ((float) (Math.PI / 2));
View Full Code Here


    private static void pointToLine3D(ReadonlyVec3D p, ReadonlyVec3D t,
            Vec3D top, Vec3D out) {
        Vec3D dir = top.sub(p);
        float hyp = dir.magnitude();
        out.set(p.add(t.scale(t.dot(dir.normalize()) * hyp)));
    }

    private static float[][] surfaceMeshParameters(Vec3D points[][], int n,
            int m) {
        final float[][] res = new float[2][];
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.