com.ericsson.tic.vi
Class GraphNodeRel

java.lang.Object
  extended by com.ericsson.tic.vi.GraphNodeRel
All Implemented Interfaces:
Cloneable

public class GraphNodeRel
extends Object
implements Cloneable

Keeps track of relationships between nodes.

Version:
1.0 (2008-12-04)
Author:
Sami Matilainen

Field Summary
 GraphNode a
          Node a.
 GraphNode b
          Node b.
 float[] controlPointA
          The control point for node a.
 float[] controlPointB
          The control point for node b.
 float[] controlTargetA
          A target for control point a.
 float[] controlTargetB
          A target for control point b.
 float[] globeCurvedControlPointA
          A set of coordinates which defines the control point for node a on the globe.
 float[] globeCurvedControlPointB
          A set of coordinates which defines the control point for node b on the globe.
 float[] globeStraightControlPointA
          A set of coordinates which defines the control point for node a on the globe.
 float[] globeStraightControlPointB
          A set of coordinates which defines the control point for node b on the globe.
 int id
          The id of this relation.
 float[] planeControlPointA
          A set of coordinates which defines the control point for node a on the plane.
 float[] planeControlPointB
          A set of coordinates which defines the control point for node b on the plane.
 float speed
          The speed.
 float[] speedA
          A speed vector for a.
 float[] speedB
          A speed vector for b.
 
Constructor Summary
GraphNodeRel(int id, GraphNode a, GraphNode b)
          Create a graph node relationship.
 
Method Summary
 Object clone()
          Clones this GraphNodeRel object.
 void createControlPoints()
          Creates control points for the bezier curves.
 void moveTowardsTargets()
          Make the control points move towards their target destinations.
 void print()
          Print out some of the more important attributes.
private  void setSpeedVectors()
          Set the movements speed of the control points.
 void setTargetsOnGlobeCurved()
          Set the target on the globe using curved lines.
 void setTargetsOnGlobeStraight()
          Set the target on the globe using straight lines.
 void setTargetsOnPlane()
          Set the target on the plane.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

public GraphNode a
Node a. Node a and b define the relationship.


b

public GraphNode b
Node b. Node a and b define the relationship.


globeCurvedControlPointA

public float[] globeCurvedControlPointA
A set of coordinates which defines the control point for node a on the globe. Note: curved lines.


globeCurvedControlPointB

public float[] globeCurvedControlPointB
A set of coordinates which defines the control point for node b on the globe. Note: curved lines.


globeStraightControlPointA

public float[] globeStraightControlPointA
A set of coordinates which defines the control point for node a on the globe. Note: straight lines.


globeStraightControlPointB

public float[] globeStraightControlPointB
A set of coordinates which defines the control point for node b on the globe. Note: straight lines.


planeControlPointA

public float[] planeControlPointA
A set of coordinates which defines the control point for node a on the plane. Note: straight lines.


planeControlPointB

public float[] planeControlPointB
A set of coordinates which defines the control point for node b on the plane. Note: straight lines.


controlPointA

public float[] controlPointA
The control point for node a.


controlPointB

public float[] controlPointB
The control point for node b.


controlTargetA

public float[] controlTargetA
A target for control point a.


controlTargetB

public float[] controlTargetB
A target for control point b.


speedA

public float[] speedA
A speed vector for a.


speedB

public float[] speedB
A speed vector for b.


speed

public float speed
The speed.


id

public int id
The id of this relation.

Constructor Detail

GraphNodeRel

public GraphNodeRel(int id,
                    GraphNode a,
                    GraphNode b)
Create a graph node relationship.

Parameters:
id - The id of this relationship.
a - The first node of the relationship.
b - The second node of the relationship.
Method Detail

createControlPoints

public void createControlPoints()
Creates control points for the bezier curves. Even straight lines have control points.


moveTowardsTargets

public void moveTowardsTargets()
Make the control points move towards their target destinations.


setSpeedVectors

private void setSpeedVectors()
Set the movements speed of the control points.


setTargetsOnPlane

public void setTargetsOnPlane()
Set the target on the plane.


setTargetsOnGlobeCurved

public void setTargetsOnGlobeCurved()
Set the target on the globe using curved lines.


setTargetsOnGlobeStraight

public void setTargetsOnGlobeStraight()
Set the target on the globe using straight lines.


clone

public Object clone()
             throws CloneNotSupportedException
Clones this GraphNodeRel object.

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

print

public void print()
Print out some of the more important attributes. For debugging.