Package org.gephi.graph.api

Examples of org.gephi.graph.api.Node.x()


        //Edge size
        float arrowWidth = ARROW_WIDTH * w * 2f;
        float arrowHeight = ARROW_HEIGHT * w * 2f;

        float x2 = nodeTo.x();
        float y2 = nodeTo.y();
        float x1 = nodeFrom.x();
        float y1 = nodeFrom.y();

        //Edge vector
View Full Code Here


    private void clampPosition(NodeModel nodeModel) {
        //Clamp Hack to avoid nodes to be outside octree
        float quantum = size / 2;
        Node node = nodeModel.getNode();
        float x = node.x();
        float y = node.y();
        float z = node.z();
        if (x > root.posX + quantum) {
            node.setX(root.posX + quantum);
        } else if (x < root.posX - quantum) {
View Full Code Here

        w = ((w - limits.getMinWeight()) * weightRatio + Edge2dModel.WEIGHT_MINIMUM) * edgeScale;
        //

        //Params
        Node node = edge.getSource();
        float x = node.x();
        float y = node.y();
        float z = node.z();

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

        w = ((w - limits.getMinWeight()) * weightRatio + Edge2dModel.WEIGHT_MINIMUM) * edgeScale;
        //

        //Params
        Node node = edge.getSource();
        float x = node.x();
        float y = node.y();
        float z = node.z();

        //CameraVector, from camera location to any point on the line
        Vec3f cameraVector = new Vec3f(x - cameraLocation[0], y - cameraLocation[1], z - cameraLocation[2]);
View Full Code Here

        //Edge size
        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

        //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);

        float x2 = nodeTo.x();
        float y2 = nodeTo.y();
        float z2 = nodeTo.z();
View Full Code Here

        //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);

        float x2 = nodeTo.x();
        float y2 = nodeTo.y();
        float z2 = nodeTo.z();

        //Point of the arrow
        float targetX = x2 - edgeVector.x() * collisionDistance;
 
View Full Code Here

            // Idem, pour tous les noeuds on applique la force d'attraction

            Node Nf = E.getSource();
            Node Nt = E.getTarget();

            float xDist = Nf.x() - Nt.x();
            float yDist = Nf.y() - Nt.y();
            float dist = (float) Math.sqrt(xDist * xDist + yDist * yDist);

            float attractiveF = dist * dist / k;

View Full Code Here

                model.colorMode.textNodeColor(this, objectModel);
                float sizeFactor = textData.getSize() * model.sizeMode.getSizeFactor3d(model.nodeSizeFactor, objectModel);

                float width = sizeFactor * objectModel.getTextWidth();
                float height = sizeFactor * objectModel.getTextHeight();
                float posX = node.x() + (float) width / -2 * sizeFactor;
                float posY = node.y() + (float) height / -2 * sizeFactor;
                float posZ = node.size();

                renderer.draw3D(txt, posX, posY, posZ, sizeFactor);
            }
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.