|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjwo.landserf.structure.Node
public class Node
Stores a topological node and pointer to an edge for higher dimensional features. Used to create TIN structures. Nodes may be either 2d or 3d.
Edge,
Serialized Form| Field Summary | |
|---|---|
static int |
EXTERIOR
Identifies a node at the outer edge of a network. |
static int |
HULL
Identifies a node that is part of a convex hull. |
static int |
INNER
Identifies an inner node. |
static int |
UNDEFINED
Undefined type. |
| Constructor Summary | |
|---|---|
Node(float x,
float y)
Creates a 2-d node with given coordinates. |
|
Node(float x,
float y,
Edge edge)
Creates a 2-d node with given coordinates associated with given edge. |
|
Node(float x,
float y,
float z)
Creates a 3-d node with given coordinates. |
|
Node(float x,
float y,
float z,
Edge edge)
Creates a 3-d node with given coordinates associated with given edge. |
|
| Method Summary | |
|---|---|
float |
calcDistance(double px,
double py)
Reports the 2-d Euclidean distance between the given point and this node. |
float |
calcDistance(float px,
float py,
float pz)
Reports the 3-d Euclidean distance between the given point and this node. |
boolean |
equals2d(Node node)
Compares the 2d coordinates of a given node with this one. |
boolean |
equals3d(Node node)
Compares the 3d coordinates of a given node with this one. |
Edge |
getEdge()
Reports an edge that this node is connected to. |
float |
getVersion()
Reports the version of the object. |
float |
getX()
Reports the x-coordinate of this node. |
float |
getY()
Reports the y-coordinate of this node. |
float |
getZ()
Reports the z-coordinate of this node. |
void |
setEdge(Edge edge)
Sets the edge that this node is connected to. |
void |
setVersion(float version)
Sets the version number of this object. |
void |
setX(float x)
Sets the x-coordinate associated with this node. |
void |
setY(float y)
Sets the y-coordinate associated with this node. |
void |
setZ(float z)
Sets the z-coordinate associated with this node. |
String |
toString()
Reports the coordinates of this node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int UNDEFINED
public static final int INNER
public static final int HULL
public static final int EXTERIOR
| Constructor Detail |
|---|
public Node(float x,
float y)
x - x coordinate of node.y - y coordinate of node.
public Node(float x,
float y,
float z)
x - x coordinate of node.y - y coordinate of node.z - z coordinate of node.
public Node(float x,
float y,
Edge edge)
x - x coordinate of node.y - y coordinate of node.edge - Edge that this node is part of.
public Node(float x,
float y,
float z,
Edge edge)
x - x coordinate of node.y - y coordinate of node.z - z coordinate of node.edge - Edge that this node is part of.| Method Detail |
|---|
public float calcDistance(double px,
double py)
px - x coordinate of point to measure to.py - y coordinate of point to measure to.
public float calcDistance(float px,
float py,
float pz)
px - x coordinate of point to measure to.py - y coordinate of point to measure to.pz - z coordinate of point to measure to.
public boolean equals2d(Node node)
node - Node to compare.
public boolean equals3d(Node node)
node - Node to compare.
public String toString()
toString in class Objectpublic float getX()
public void setX(float x)
x - x-coordinate associated with this node.public float getY()
public void setY(float y)
y - y-coordinate associated with this node.public float getZ()
public void setZ(float z)
z - z-coordinate associated with this node.public Edge getEdge()
public void setEdge(Edge edge)
edge - Edge to associate with this node.public float getVersion()
public void setVersion(float version)
version - Version number of this object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||