|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ericsson.tic.vi.Pickable
com.ericsson.tic.vi.GraphNode
public class GraphNode
A node in a graph which is mapped onto a plane or onto a sphere/globe.
| Field Summary | |
|---|---|
float[] |
colorf
Color as a 3f value (RGB) |
boolean |
expanded
Indicates wheter this node is expanded or not. |
int |
id
A unique identifier for this node. |
Label |
label
A label associated with this node. |
float |
lat
Latitude in degrees. |
float |
lon
Longitutude in degrees. |
float |
rad
Radius of globe. |
float |
speed
The speed of this node. |
String |
title
|
NodeType |
type
The type of this node. |
private float |
weight
The weight of this node (used for calculating tention between nodes) |
float |
x
Current coordinate. |
float |
xPlanar
Planar Coordinate (default -2 <= x < 2) |
private float |
xSpeed
The speed of this node. |
private float |
xTarget
The travel-target of this node. |
float |
xTex
Texture coordinate (should correspond to planar coordinate) |
float |
xUser
User Planar Coordinate (default -2 <= x < 2) |
float |
y
Current coordinate. |
float |
yPlanar
Planar Coordinate (default -1 <= y < 1) |
private float |
ySpeed
The speed of this node. |
private float |
yTarget
The travel-target of this node. |
float |
yTex
Texture coordinate (should correspond to planar coordinate) |
float |
yUser
User Planar Coordinate (default -1 <= y < 1) |
float |
z
Current coordinate. |
float |
zPlanar
Planar Coordinate (default z = 0.0) |
private float |
zSpeed
The speed of this node. |
private float |
zTarget
The travel-target of this node. |
float |
zUser
User Planar Coordinate (default z = 0.0) |
| Fields inherited from class com.ericsson.tic.vi.Pickable |
|---|
highlighted, pid |
| Constructor Summary | |
|---|---|
GraphNode(int id,
NodeType type,
String title)
Creates a node at coordinate 0, 0, 0 (on the map) Which corresponds to a longitude latitude position of 0 degrees lat, 0 degrees long. |
|
GraphNode(int id,
NodeType type,
String title,
float x,
float y,
float z)
Creates a node at coordinate x, y, z (on the map) |
|
| Method Summary | |
|---|---|
Object |
clone()
Clones this graph node. |
void |
moveTowardsTarget()
Take a step towards the target. |
private void |
planarFromSpherical()
Sets the planar coordinates from the spherical coordinates. |
private void |
planarFromTexture()
Sets the planar coordinates from the texture coordinates. |
void |
print()
Print out some of the more important attributes. |
void |
setPlanar(float xPlanar,
float yPlanar,
float zPlanar)
Sets the coordinates of the node by using planar coordinates. |
void |
setSpeed(float speed)
Set the speed of this node. |
private void |
setSpeedVector()
Set the speedvector. |
void |
setSpeedVector(float speed)
Set the speedvector. |
void |
setSpherical(float lon,
float lat,
float rad)
Sets the coordinates of the node by using spherical coordinates. |
void |
setTarget(float xTarget,
float yTarget,
float zTarget)
Sets the traveling target of this node. |
void |
setTargetOnGlobe()
Sets the target on the globe surface. |
void |
setTargetOnPlane()
Sets the target on the plane. |
void |
setUser(float xUser,
float yUser,
float zUser)
Sets the user coordinates. |
float[] |
sphericalAsCarteesian()
Return carteesian coordinates from spherical once. |
private void |
sphericalFromPlanar()
Sets the spherical coordinates from the planar coordinates. |
void |
stopMoving()
Stops moving. |
private void |
textureFromPlanar()
Sets the texture coordinates from the planar coordinates. |
| Methods inherited from class com.ericsson.tic.vi.Pickable |
|---|
newPID |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int id
public NodeType type
public float[] colorf
public float x
public float y
public float z
public Label label
public float xPlanar
public float yPlanar
public float zPlanar
public float xUser
public float yUser
public float zUser
public float xTex
public float yTex
public float lon
public float lat
public float rad
private float xTarget
private float yTarget
private float zTarget
public float speed
private float xSpeed
private float ySpeed
private float zSpeed
private float weight
public boolean expanded
public String title
| Constructor Detail |
|---|
public GraphNode(int id,
NodeType type,
String title)
id - the id of this node.type - the type of this node.
public GraphNode(int id,
NodeType type,
String title,
float x,
float y,
float z)
id - the id of this node.type - the type of this node.title - The Title of the node.x - The x-coordinate. [-2 < x < 2]y - The y-coordinate. [-1 < y < 1]z - The z-coordinate should be 0| Method Detail |
|---|
public void setUser(float xUser,
float yUser,
float zUser)
xUser - The x coordinate.yUser - The y coordinate.zUser - The z coordinate.
public void setPlanar(float xPlanar,
float yPlanar,
float zPlanar)
xPlanar - The x coordinate.yPlanar - The y coordinate.zPlanar - The z coordinate.
public void setSpherical(float lon,
float lat,
float rad)
lon - The longitude.lat - The latitude.rad - The radious of the Sphere/Globe/Earth..private void planarFromSpherical()
private void sphericalFromPlanar()
private void textureFromPlanar()
private void planarFromTexture()
public void setSpeed(float speed)
speed - The speed.public void setSpeedVector(float speed)
speed - The speed.private void setSpeedVector()
public void setTarget(float xTarget,
float yTarget,
float zTarget)
xTarget - The x coordinate of the target.yTarget - The y coordinate of the target.zTarget - The z coordinate of the target.public void setTargetOnGlobe()
public void setTargetOnPlane()
public float[] sphericalAsCarteesian()
public void moveTowardsTarget()
public void stopMoving()
public void print()
public Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||