Package org.gephi.visualization.hull

Examples of org.gephi.visualization.hull.ConvexHull


                Node parent = graph.getParent(n);
                if (parent != null) {
                    Group group = (Group) parent;
                    Model hullModel = group.getGroupData().getHullModel();
                    if (hullModel != null && hullModel.isCacheMatching(cacheMarker)) {
                        ConvexHull hull = (ConvexHull) hullModel.getObj();
                        hull.addNode(n);
                        hull.setModel(hullModel);
                    } else if (hullModel != null) {
                        //Its not the first time the hull exist
                        ConvexHullModel model = (ConvexHullModel) hullModel;
                        model.setScale(1f);
                        hullModel.setCacheMarker(cacheMarker);
                        hulls.add((ModelImpl) hullModel);
                    } else {
                        ConvexHull ch = new ConvexHull();
                        ch.setMetaNode(parent);
                        ch.addNode(n);
                        ModelImpl obj = potInit.initModel(ch);
                        group.getGroupData().setHullModel(obj);
                        obj.setCacheMarker(cacheMarker);
                        hulls.add(obj);
                    }
                }
            }
            for (ModelImpl im : hulls) {
                ConvexHull hull = (ConvexHull) im.getObj();
                hull.recompute();
                engine.addObject(AbstractEngine.CLASS_POTATO, im);
            }
        }
    }
View Full Code Here


            }

            for (Node parent : parents) {
                GroupData gd = (GroupData) parent.getNodeData();
                if (gd.getHullModel() != null) {
                    ConvexHull hull = ((ConvexHullModel) gd.getHullModel()).getObj();
                    contractPositioning(hull);
                }
                graph.retract(parent);
            }
        } catch (Exception e) {
View Full Code Here

* @author Mathieu Bastian
*/
public class CompatibilityHullModeler implements CompatibilityModeler<ConvexHull> {

    public ModelImpl initModel(Renderable n) {
        ConvexHull h = (ConvexHull) n;

        ConvexHullModel hull = new ConvexHullModel();
        hull.setObj(h);
        h.setModel(hull);

        return hull;
    }
View Full Code Here

TOP

Related Classes of org.gephi.visualization.hull.ConvexHull

Copyright © 2018 www.massapicom. 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.