|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uka.algo.GT3D.BFSVisualizer
public class BFSVisualizer
Field Summary | |
---|---|
(package private) javax.media.j3d.ColoringAttributes |
axisColoringAttributes
|
(package private) float |
axisConeLength
|
(package private) float |
axisConeRadius
|
(package private) float |
axisLength
|
(package private) javax.media.j3d.Material |
axisMaterial
|
(package private) float |
axisRadius
|
(package private) float |
axisTranslation
|
(package private) javax.vecmath.Color3f |
black
|
(package private) javax.vecmath.Color3f |
blue
|
(package private) javax.vecmath.Color3f |
brown
|
(package private) javax.vecmath.Color3f |
darkblue
|
(package private) javax.vecmath.Color3f |
darkergray
|
(package private) javax.vecmath.Color3f |
darkgray
|
(package private) javax.vecmath.Color3f |
darkgreen
|
(package private) javax.vecmath.Color3f |
darkyellow
|
private javax.media.j3d.BranchGroup |
dynamicRoot
The root of everything that is going to be dynamic |
private javax.media.j3d.BranchGroup |
dynLightRoot
The root for all the lights |
private javax.media.j3d.BranchGroup |
edgeRoot
The root for all the edges |
(package private) float |
edgeThickness
|
private java.util.Map<edu.uci.ics.jung.graph.Edge,javax.media.j3d.BranchGroup> |
edgeToBG
|
private java.util.Map<edu.uci.ics.jung.graph.Edge,com.sun.j3d.utils.geometry.Cylinder> |
edgeToCylinder
|
(package private) javax.vecmath.Color3f |
green
|
(package private) javax.vecmath.Color3f |
lightblue
|
(package private) javax.vecmath.Color3f |
lightgray
|
(package private) javax.vecmath.Color3f |
lightgreen
|
(package private) javax.vecmath.Color3f |
lightred
|
(package private) javax.vecmath.Color3f |
lightyellow
|
private javax.media.j3d.BranchGroup |
nodeRoot
The root for all the nodes |
private java.util.Map<edu.uci.ics.jung.graph.Vertex,javax.vecmath.Vector3f> |
nodeToLocation
|
private java.util.Map<edu.uci.ics.jung.graph.Vertex,com.sun.j3d.utils.geometry.Sphere> |
nodeToSphere
|
private java.util.Map<edu.uci.ics.jung.graph.Vertex,javax.media.j3d.TransformGroup> |
nodeToTG
|
(package private) javax.vecmath.Color3f |
orange
|
(package private) javax.vecmath.Color3f |
red
|
private javax.media.j3d.BranchGroup |
sceneRoot
The root of it all |
private javax.media.j3d.BranchGroup |
staticRoot
The root for everything static |
private edu.uci.ics.jung.graph.DirectedGraph |
theGraph
A reference on the underlying graph which is drawn. |
(package private) javax.vecmath.Color3f |
white
|
(package private) float |
xAxisLength
|
(package private) javax.vecmath.Color3f |
yellow
|
Constructor Summary | |
---|---|
BFSVisualizer(edu.uci.ics.jung.graph.DirectedGraph aGraph)
initializes the Graph |
Method Summary | |
---|---|
private void |
createCoordinateSystem(javax.media.j3d.BranchGroup objRoot)
Draws the coordinate system. |
private void |
createLight(javax.media.j3d.BranchGroup objRoot)
Let there be light. |
protected void |
deleteEdge(edu.uci.ics.jung.graph.Edge e)
|
javax.media.j3d.BranchGroup |
getChild()
|
protected javax.media.j3d.Transform3D |
getEdgeT3D(edu.uci.ics.jung.graph.Vertex source,
edu.uci.ics.jung.graph.Vertex target)
computes the transformation for placing an edge between two vertices |
private javax.vecmath.Vector3f |
getNodeLocation(edu.uci.ics.jung.graph.Vertex currentNode)
|
private com.sun.j3d.utils.geometry.Sphere |
getNodeSphere(edu.uci.ics.jung.graph.Vertex currentNode)
|
javax.vecmath.Vector3d |
getStartPosition()
The scene must be centered at the origin. |
void |
highlight(edu.uci.ics.jung.graph.Vertex v)
A simple way of highlighting a node. |
private void |
imprintSourceGraph(javax.media.j3d.BranchGroup nRoot,
javax.media.j3d.BranchGroup eRoot)
Draws nodes, edges and light |
private javax.media.j3d.Node |
placeEdge(edu.uci.ics.jung.graph.Edge theEdge,
float thickness,
edu.uci.ics.jung.graph.Vertex source,
edu.uci.ics.jung.graph.Vertex target)
Draws an edge. |
void |
setNodeLocation(edu.uci.ics.jung.graph.Vertex v,
javax.vecmath.Vector3f loc)
Places a Vertex at a specified location. |
void |
showGraph()
Constructs the scene. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private edu.uci.ics.jung.graph.DirectedGraph theGraph
private javax.media.j3d.BranchGroup sceneRoot
private javax.media.j3d.BranchGroup dynamicRoot
private javax.media.j3d.BranchGroup staticRoot
private javax.media.j3d.BranchGroup nodeRoot
private javax.media.j3d.BranchGroup edgeRoot
private javax.media.j3d.BranchGroup dynLightRoot
private java.util.Map<edu.uci.ics.jung.graph.Vertex,javax.vecmath.Vector3f> nodeToLocation
private java.util.Map<edu.uci.ics.jung.graph.Vertex,com.sun.j3d.utils.geometry.Sphere> nodeToSphere
private java.util.Map<edu.uci.ics.jung.graph.Vertex,javax.media.j3d.TransformGroup> nodeToTG
private java.util.Map<edu.uci.ics.jung.graph.Edge,com.sun.j3d.utils.geometry.Cylinder> edgeToCylinder
private java.util.Map<edu.uci.ics.jung.graph.Edge,javax.media.j3d.BranchGroup> edgeToBG
final float edgeThickness
final float axisRadius
final float axisConeLength
final float axisConeRadius
final float xAxisLength
final float axisLength
final float axisTranslation
javax.media.j3d.ColoringAttributes axisColoringAttributes
javax.media.j3d.Material axisMaterial
javax.vecmath.Color3f black
javax.vecmath.Color3f white
javax.vecmath.Color3f red
javax.vecmath.Color3f lightred
javax.vecmath.Color3f blue
javax.vecmath.Color3f lightblue
javax.vecmath.Color3f darkblue
javax.vecmath.Color3f yellow
javax.vecmath.Color3f darkyellow
javax.vecmath.Color3f lightyellow
javax.vecmath.Color3f orange
javax.vecmath.Color3f green
javax.vecmath.Color3f darkgreen
javax.vecmath.Color3f lightgreen
javax.vecmath.Color3f brown
javax.vecmath.Color3f darkgray
javax.vecmath.Color3f lightgray
javax.vecmath.Color3f darkergray
Constructor Detail |
---|
public BFSVisualizer(edu.uci.ics.jung.graph.DirectedGraph aGraph)
aGraph
- Method Detail |
---|
public void showGraph()
private void imprintSourceGraph(javax.media.j3d.BranchGroup nRoot, javax.media.j3d.BranchGroup eRoot)
nRoot
- The Branchgroup for all the nodes.eRoot
- The Branchgroup for all the edges.private javax.vecmath.Vector3f getNodeLocation(edu.uci.ics.jung.graph.Vertex currentNode)
private com.sun.j3d.utils.geometry.Sphere getNodeSphere(edu.uci.ics.jung.graph.Vertex currentNode)
protected javax.media.j3d.Transform3D getEdgeT3D(edu.uci.ics.jung.graph.Vertex source, edu.uci.ics.jung.graph.Vertex target)
source
- First node.target
- Second node.
private javax.media.j3d.Node placeEdge(edu.uci.ics.jung.graph.Edge theEdge, float thickness, edu.uci.ics.jung.graph.Vertex source, edu.uci.ics.jung.graph.Vertex target)
theEdge
- thickness
- source
- target
-
protected void deleteEdge(edu.uci.ics.jung.graph.Edge e)
private void createCoordinateSystem(javax.media.j3d.BranchGroup objRoot)
objRoot
- The sub-scene is attached to this BranchGroup.private void createLight(javax.media.j3d.BranchGroup objRoot)
objRoot
- The sub-scene is attached to this BranchGroup.public javax.media.j3d.BranchGroup getChild()
getChild
in interface Scene3DProvider
public javax.vecmath.Vector3d getStartPosition()
Scene3DProvider
getStartPosition
in interface Scene3DProvider
public void setNodeLocation(edu.uci.ics.jung.graph.Vertex v, javax.vecmath.Vector3f loc)
v
- The vertex.loc
- The new location.public void highlight(edu.uci.ics.jung.graph.Vertex v)
v
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |