Package org.gephi.lib.gleem.linalg

Examples of org.gephi.lib.gleem.linalg.Vec3f.normalize()


        Vec3f cameraVector = new Vec3f(x - cameraLocation[0], y - cameraLocation[1], z - cameraLocation[2]);
        cameraVector.normalize();

        //Get two vectors perpendicular to cameraVector
        Vec3f upVector = transVector.cross(cameraVector);
        upVector.normalize();
        Vec3f sideVector = cameraVector.cross(upVector);
        sideVector.normalize();

        //Get thickness points
        float baseRightX = x + sideVector.x() * w / 2;
View Full Code Here


        //Get two vectors perpendicular to cameraVector
        Vec3f upVector = transVector.cross(cameraVector);
        upVector.normalize();
        Vec3f sideVector = cameraVector.cross(upVector);
        sideVector.normalize();

        //Get thickness points
        float baseRightX = x + sideVector.x() * w / 2;
        float baseRightY = y + sideVector.y() * w / 2;
        float baseRightZ = z + sideVector.z() * w / 2;
View Full Code Here

        float arrowWidth = ARROW_WIDTH * w * 2f;
        float arrowHeight = ARROW_HEIGHT * w * 2f;

        //Edge vector
        Vec3f edgeVector = new Vec3f(nodeTo.x() - nodeFrom.x(), nodeTo.y() - nodeFrom.y(), nodeTo.z() - nodeFrom.z());
        edgeVector.normalize();

        //Get collision distance between nodeTo and arrow point
        double angle = Math.atan2(nodeTo.y() - nodeFrom.y(), nodeTo.x() - nodeFrom.x());
        float collisionDistance = targetModel.getCollisionDistance(angle);

View Full Code Here

        //Transform in 3d coordinates
        mouseX /= -graphDrawable.draggingMarker[0];
        mouseY /= -graphDrawable.draggingMarker[1];

        //Set stepVector for zooming, direction of camera and norm of step
        cameraVector.normalize();
        Vec3f stepVec = cameraVector.times(step);

        cameraLocation[0] += stepVec.x();
        cameraLocation[1] += stepVec.y();
        cameraLocation[2] += stepVec.z();
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.