edu.uci.ics.jung.visualization3d.VertexGroup Maven / Gradle / Ivy
/*
* Copyright (c) 2003, the JUNG Project and the Regents of the University of
* California All rights reserved.
*
* This software is open-source under the BSD license; see either "license.txt"
* or http://jung.sourceforge.net/license.txt for a description.
*/
package edu.uci.ics.jung.visualization3d;
/**
*/
import javax.media.j3d.Node;
import javax.media.j3d.Transform3D;
import javax.media.j3d.TransformGroup;
/**
*
* @author Tom Nelson - [email protected]
*
*/
public class VertexGroup extends TransformGroup {
V vertex;
Node shape;
TransformGroup labelNode = new TransformGroup();
public VertexGroup(V vertex, Node shape) {
this.vertex = vertex;
this.shape = shape;
setCapability(TransformGroup.ENABLE_PICK_REPORTING);
addChild(shape);
addChild(labelNode);
Transform3D tt = new Transform3D();
// tt.setTranslation(new Vector3f(10,10,0));
labelNode.setTransform(tt);
}
/**
* @return the shape
*/
public Node getShape() {
return shape;
}
/**
* @param shape the shape to set
*/
public void setShape(Node shape) {
this.shape = shape;
}
public String toString() { return "VertexGroup for "+vertex.toString(); }
/**
* @return the labelNode
*/
public TransformGroup getLabelNode() {
return labelNode;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy