bass.visualisation.layout
Class BassLayout
java.lang.Object
bass.visualisation.layout.BassLayout
public class BassLayout
- extends java.lang.Object
BassLayout actually get the right positions for all spheres(band) in the targetbands friendlist and if depth=2 for the friends
of the friends as well =). In addition it calculates the directionvector of each edge that connects two bands as well.
- Version:
- 0.1
- Author:
- Patrick Mai
|
Method Summary |
private static void |
calcPositions(BassNodeList[] nodesToCalcArray,
BassEdgeList[] edgesToCalc,
java.lang.String startBand,
boolean friendsConn,
boolean edgeConn,
int depth)
|
private static void |
calcPositionsDepth2(BassNodeList[] nodesToCalcArray,
BassEdgeList[] edgesToCalc,
java.lang.String startBand,
boolean edgeConn)
Calculates positions in a z=0 and then x=0 circle around the specific band |
static void |
calculatePositionsBandnetwork(BassNodeList[] nodesToCalc,
BassEdgeList[] edgesToCalc,
java.lang.String startBand,
int depth,
boolean friendsConn,
boolean edgeConn)
It calls the calcPosition method |
static javax.vecmath.AxisAngle4f |
getAxisAngle4f(javax.vecmath.Vector3f init,
javax.vecmath.Vector3f target)
|
static javax.vecmath.AxisAngle4f |
getPositionAngle(BassEdge edge)
|
static javax.vecmath.Vector3d |
getPositionVector(BassEdge edge)
|
static javax.media.j3d.TransformGroup |
setFullTransform(javax.vecmath.Vector3d preTranslate,
javax.vecmath.Vector3d translation,
javax.vecmath.AxisAngle4f rotation,
javax.media.j3d.Transform3D t3d,
javax.media.j3d.TransformGroup tG)
set up for a full transform with scale, transform and rotation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
initVector
private static javax.vecmath.Vector3f initVector
maxXfrom0
public static float maxXfrom0
maxYfrom0
public static float maxYfrom0
BassLayout
public BassLayout()
calculatePositionsBandnetwork
public static void calculatePositionsBandnetwork(BassNodeList[] nodesToCalc,
BassEdgeList[] edgesToCalc,
java.lang.String startBand,
int depth,
boolean friendsConn,
boolean edgeConn)
- It calls the calcPosition method
- Parameters:
nodesToCalc - Array with all BassNodeList'sedgesToCalc - Array with all BassEdgeList'sstartBand - The id of the target banddepth - the hierarchielevel ( 1 or 2 )friendsConn - should the friends show their connections (edges) to other friends of the friendslist of the targetband?edgeConn - Should the edges between the mainband and all it's friends be visible?
calcPositions
private static void calcPositions(BassNodeList[] nodesToCalcArray,
BassEdgeList[] edgesToCalc,
java.lang.String startBand,
boolean friendsConn,
boolean edgeConn,
int depth)
- Parameters:
nodesToCalc - Array with all BassNodeList'sedgesToCalc - Array with all BassEdgeList'sstartBand - The id of the target banddepth - the hierarchielevel ( 1 or 2 )friendsConn - should the friends show their connections (edges) to other friends of the friendslist of the targetband?edgeConn - Should the edges between the mainband and all it's friends be visible?
calcPositionsDepth2
private static void calcPositionsDepth2(BassNodeList[] nodesToCalcArray,
BassEdgeList[] edgesToCalc,
java.lang.String startBand,
boolean edgeConn)
- Calculates positions in a z=0 and then x=0 circle around the specific band
- Parameters:
nodesToCalc - Array with all BassNodeList'sedgesToCalc - Array with all BassEdgeList'sstartBand - The id of the target bandedgeConn - Should the edges between the mainband and all it's friends be visible?
getAxisAngle4f
public static javax.vecmath.AxisAngle4f getAxisAngle4f(javax.vecmath.Vector3f init,
javax.vecmath.Vector3f target)
- Parameters:
init - initialisation vectortarget - target vector
- Returns:
- AxisAngle for rotation of init vector to be oriented with target vector
getPositionAngle
public static javax.vecmath.AxisAngle4f getPositionAngle(BassEdge edge)
- Parameters:
edge - the edge from which the directionvector is used
- Returns:
- Call AxisAngle4f to get the right angle for the rotation
getPositionVector
public static javax.vecmath.Vector3d getPositionVector(BassEdge edge)
- Parameters:
edge - the edge to be used for getting the position vector (middle point)
- Returns:
- Return the current position, mid-point, of the edge
setFullTransform
public static javax.media.j3d.TransformGroup setFullTransform(javax.vecmath.Vector3d preTranslate,
javax.vecmath.Vector3d translation,
javax.vecmath.AxisAngle4f rotation,
javax.media.j3d.Transform3D t3d,
javax.media.j3d.TransformGroup tG)
- set up for a full transform with scale, transform and rotation
- Parameters:
scale - translation - rotation - t3d - The TransformtG - The TransformGroup
- Returns:
- The Transformgroup with scaling, translating and rotating done