bass.visualisation.graph
Class BassSceneGraph

java.lang.Object
  extended by bass.visualisation.graph.BassSceneGraph

public class BassSceneGraph
extends java.lang.Object

This class actually creates the scenegraph. Get all info for the desired band from the embedded database. Then send the data to the BandView class for further actions. When all the following work is done BassSceneGraph return the final Branchgroup to the GraphCanvas object that has called it before.

Version:
0.4
Author:
Patrick Mai

Field Summary
(package private)  BassEdgeList[] allEdgesArray
           
(package private)  BassNodeList[] allNodesArray
           
(package private)  javax.media.j3d.Appearance app
           
(package private)  javax.media.j3d.BranchGroup sceneRoot
           
 
Constructor Summary
BassSceneGraph()
           
 
Method Summary
 javax.media.j3d.BranchGroup createSceneGraph(java.lang.String bandId, int minFriends, int depth, boolean friendsconnection, boolean edgeconnection, boolean showNames, Gui theGui)
          Calls getEdgeAndNodeLists (calls DTToLists which itself calls the database method).
 void getEdgeAndNodeLists(java.lang.String bandId, int depth, int minFriends, Gui theGui)
          Create a DTOToLists object, then calls writeLists().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sceneRoot

javax.media.j3d.BranchGroup sceneRoot

app

javax.media.j3d.Appearance app

allEdgesArray

BassEdgeList[] allEdgesArray

allNodesArray

BassNodeList[] allNodesArray
Constructor Detail

BassSceneGraph

public BassSceneGraph()
Method Detail

createSceneGraph

public javax.media.j3d.BranchGroup createSceneGraph(java.lang.String bandId,
                                                    int minFriends,
                                                    int depth,
                                                    boolean friendsconnection,
                                                    boolean edgeconnection,
                                                    boolean showNames,
                                                    Gui theGui)
Calls getEdgeAndNodeLists (calls DTToLists which itself calls the database method). Then it creates a branchgroup with all the spheres (nodes) and cylinders (edges) added as childs. This should be the main entrance for getting stuff to the screen. Hence why we have to get external methods for all different kinds of how we can present a band...

Returns:
The Branchgroup with all children added (Transformgroups, spheres, cylinders etc...)

getEdgeAndNodeLists

public void getEdgeAndNodeLists(java.lang.String bandId,
                                int depth,
                                int minFriends,
                                Gui theGui)
Create a DTOToLists object, then calls writeLists(). If this was successful, make a reference of this classes edge/nodelists to those DTOToLists created.