|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjwo.landserf.structure.msn.GraphNode
Structure to store a graph node. A node represents a 3d location and feature type.
Constructor Summary | |
GraphNode(float x,
float y,
float z,
int type,
int id)
Creates a locational graph node of the given feature type. |
Method Summary | |
int |
getGraphID()
Reports the ID of the graph to which this node belongs. |
int |
getID()
Reports the ID of this node. |
GraphJunction |
getJunction()
Returns the junction at which this node is the centre, or null if the node is not connected to anything. |
GraphNode |
getOtherNode()
Reports the first node connected to this one, or null if node not connected to an edge. |
int |
getType()
Reports the type of feature at the node. |
int |
getValency()
Reports the valency of the node (number of edges connected to it). |
float |
getX()
Reports the x coordinate of the node. |
float |
getY()
Reports the y coordinate of the node. |
float |
getZ()
Reports the z coordinate of the node. |
boolean |
isUniversal()
Reports whether the node is unviversal. |
void |
makeUniversal()
Makes the feature universal. |
void |
removeUniversal()
Removes universal status from feature. |
void |
setGraphID(int id)
Sets the ID of the graph to which this node belongs. |
void |
setJunction(GraphJunction junction)
Associates the given junction with this node. |
void |
setNodeID(int id)
Sets the ID of the node with the given value. |
String |
toString()
Provides a text summary of the node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GraphNode(float x, float y, float z, int type, int id)
x
- x location of the node.y
- y location of the node.z
- height of the node.type
- Feature type (SurfParam.PIT, SurfParam.PASS etc).id
- Identifier for this node.Method Detail |
public String toString()
public float getX()
public float getY()
public float getZ()
public int getType()
public int getGraphID()
public int getID()
public GraphJunction getJunction()
public int getValency()
public GraphNode getOtherNode()
public boolean isUniversal()
public void setGraphID(int id)
id
- ID of graph to which this node belongs.public void setNodeID(int id)
id
- New ID of node.public void setJunction(GraphJunction junction)
public void makeUniversal()
public void removeUniversal()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |