Package org.tinfour.common
Class TriangleCount
- java.lang.Object
-
- org.tinfour.common.TriangleCount
-
public class TriangleCount extends Object
Provides descriptive data for a Triangulated Irregular Network (TIN).
-
-
Constructor Summary
Constructors Constructor Description TriangleCount()Create an instance for tabulating a survey of the triangles which may or may not be members of a TIN.TriangleCount(IIncrementalTin tin)A constructor that performs a survey of the TIN to gather statistics about the triangles that comprise it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAreaMax()Gets the maximum area of the triangles in the TIN.doublegetAreaMean()Get the mean area of the triangles in the TIN.doublegetAreaMin()Gets the minimum area of the triangles in the TIN.doublegetAreaStandardDeviation()Gets the standard deviation of the triangles in the TIN.doublegetAreaSum()Gets the sum of the area of all triangles in the TIN.intgetCount()Get the number of triangles in the TIN.voidtabulateTriangle(Vertex vA, Vertex vB, Vertex vC)Compute area for the triangle specified by the vertex arguments and add it to the triangle count and area summations.
-
-
-
Constructor Detail
-
TriangleCount
public TriangleCount()
Create an instance for tabulating a survey of the triangles which may or may not be members of a TIN.
-
TriangleCount
public TriangleCount(IIncrementalTin tin)
A constructor that performs a survey of the TIN to gather statistics about the triangles that comprise it.- Parameters:
tin- a valid instance of an incremental tin
-
-
Method Detail
-
tabulateTriangle
public final void tabulateTriangle(Vertex vA, Vertex vB, Vertex vC)
Compute area for the triangle specified by the vertex arguments and add it to the triangle count and area summations.- Parameters:
vA- the initial vertex, given in counterclockwise ordervB- the second vertex, given in counterclockwise ordervC- the third vertex, given in counterclockwise order
-
getCount
public int getCount()
Get the number of triangles in the TIN.- Returns:
- a integer value of 1 or more (zero if TIN is undefined).
-
getAreaSum
public double getAreaSum()
Gets the sum of the area of all triangles in the TIN.- Returns:
- if the triangle count is greater than zero, a positive floating point value
-
getAreaMean
public double getAreaMean()
Get the mean area of the triangles in the TIN.- Returns:
- if the triangle count is greater than zero, a positive floating point value
-
getAreaStandardDeviation
public double getAreaStandardDeviation()
Gets the standard deviation of the triangles in the TIN.- Returns:
- if the triangle count is greater than one, a positive floating point value
-
getAreaMin
public double getAreaMin()
Gets the minimum area of the triangles in the TIN.- Returns:
- if the triangle count is greater than zero, a positive floating point value
-
getAreaMax
public double getAreaMax()
Gets the maximum area of the triangles in the TIN.- Returns:
- if the triangle count is greater than zero, a positive floating point value
-
-