|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjwo.landserf.structure.Triangle
public class Triangle
Stores a topological triangle. Used for Delaunay and TIN networks. Triangle contains 3 topological edges and a circumcircle (for Delaunay triangulation and Voronoi diagrams). Adapted from Zhao and Saalfeld, 1996.
Edge,
Serialized Form| Constructor Summary | |
|---|---|
Triangle(Edge edge1,
Edge edge2,
Edge edge3)
Creates a triangle from the three given edges. |
|
Triangle(Edge edge1,
Edge edge2,
Edge edge3,
boolean isolated)
Creates a triangle from the three given edges. |
|
Triangle(Vector edges,
Edge edge1,
Edge edge2,
Edge edge3)
Creates a triangle from the three given edges and stores them in their own Java vector. |
|
| Method Summary | |
|---|---|
void |
calcCircumCircle()
Calculates this triangle's circumcircle. |
float[] |
calcMER()
Calculates the triangle's minimum enclosing rectangle. |
float[] |
calcMER(float[] mer)
Calculates the minimum enclosing rectangle surrounding this triangle and the supplied MER. |
void |
calcPlane()
Calculates the equation of the plane passing through all three points of the triangle. |
double |
getCircleRadius()
Reports the radius of the circumcircle associated with this triangle. |
double |
getCircleX()
Reports the x coordinate of circumcircle associated with this triangle. |
double |
getCircleY()
Reports the y coordinate of circumcircle associated with this triangle. |
Edge |
getEdge()
Reports an edge associated with this triangle. |
float |
getHeight(float px,
float py)
Interpolates the z value at a given location based on the plane passing though this triangle. |
float[] |
getTriangleX()
Reports the 3 x coordinates of this triangle. |
float[] |
getTriangleY()
Reports the 3 y coordinates of this triangle. |
float[] |
getTriangleZ()
Reports the 3 z coordinates of this triangle. |
float |
getVersion()
Reports the version of the object. |
boolean |
isInCircle(Node node)
Determines if a given point is inside the triangle's circumcircle. |
boolean |
isInTriangle(Node node)
Determines if a given point is inside the triangle. |
void |
removeEdges(Vector edges)
Removes this triangle's three connected edges from a given Java vector. |
void |
setVersion(float version)
Sets the version number of this object. |
String |
toString()
Reports the coordinates of this triangle. |
void |
update(Edge edge1,
Edge edge2,
Edge edge3)
Initialises the triangle by storing the given edges and calculating the triangle's circumcirle. |
void |
update(Edge edge1,
Edge edge2,
Edge edge3,
boolean isolated)
Initialises the triangle by storing the given edges and calculating the triangle's circumcirle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Triangle(Edge edge1,
Edge edge2,
Edge edge3)
edge1 - First triangle edge.edge2 - Second triangle edge.edge3 - Third triangle edge.
public Triangle(Edge edge1,
Edge edge2,
Edge edge3,
boolean isolated)
edge1 - First triangle edge.edge2 - Second triangle edge.edge3 - Third triangle edge.isolated - Edges not linked to this triangle if true.
public Triangle(Vector edges,
Edge edge1,
Edge edge2,
Edge edge3)
edges - Java vector to contain the three edges.edge1 - First triangle edge.edge2 - Second triangle edge.edge3 - Third triangle edge.| Method Detail |
|---|
public void update(Edge edge1,
Edge edge2,
Edge edge3)
edge1 - First triangle edge.edge2 - Second triangle edge.edge3 - Third triangle edge.
public void update(Edge edge1,
Edge edge2,
Edge edge3,
boolean isolated)
edge1 - First triangle edge.edge2 - Second triangle edge.edge3 - Third triangle edge.isolated - Edges not linked to this triangle if true.public boolean isInTriangle(Node node)
node - Node to test.
public boolean isInCircle(Node node)
node - Node to test.
public void removeEdges(Vector edges)
edges - Java vector storing edges.public void calcCircumCircle()
public void calcPlane()
Ax + By + Cz + D = 0. The normal to the plane is the vector
(A,B,C).
public float[] calcMER()
public float[] calcMER(float[] mer)
mer - Array storing some MER.
public Edge getEdge()
public double getCircleX()
public double getCircleY()
public double getCircleRadius()
public float[] getTriangleX()
public float[] getTriangleY()
public float[] getTriangleZ()
public float getHeight(float px,
float py)
px - x coordinate of the location to interpolate.py - y coordinate of the location to interpolate.
public String toString()
toString in class Objectpublic 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 | ||||||||