Package org.h2gis.utilities.jts_utils
Class TriMarkers
- java.lang.Object
-
- org.locationtech.jts.geom.Triangle
-
- org.h2gis.utilities.jts_utils.TriMarkers
-
public class TriMarkers extends org.locationtech.jts.geom.TriangleUsed by TriangleContouring. Add the constraint of CCW orientation Store also three double values, one fore each vertices ANR EvalPDU IFSTTAR 11_05_2011- Author:
- Nicolas FORTIN, Judicaƫl PICAUT
-
-
Constructor Summary
Constructors Constructor Description TriMarkers()Default constructorTriMarkers(org.locationtech.jts.geom.Coordinate p0, org.locationtech.jts.geom.Coordinate p1, org.locationtech.jts.geom.Coordinate p2, double m1, double m2, double m3)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.locationtech.jts.math.Vector3DgetNormalVector(org.locationtech.jts.geom.Triangle t)Get the normal vector to this triangle, of length 1.static doublegetSlopeInPercent(org.locationtech.jts.math.Vector3D normal, double epsilon)static org.locationtech.jts.math.Vector3DgetSteepestVector(org.locationtech.jts.math.Vector3D normal, double epsilon)Get the vector with the highest down slope in the plan.static booleanintersects(org.locationtech.jts.geom.Coordinate p, org.locationtech.jts.geom.Triangle t)Test if a coordinate intersects the triangleStringtoString()-
Methods inherited from class org.locationtech.jts.geom.Triangle
angleBisector, area, area, area3D, area3D, centroid, centroid, circumcentre, circumcentre, circumcentreDD, inCentre, inCentre, interpolateZ, interpolateZ, intersects, isAcute, isAcute, isCCW, isCCW, length, length, longestSideLength, longestSideLength, perpendicularBisector, signedArea, signedArea
-
-
-
-
Constructor Detail
-
TriMarkers
public TriMarkers()
Default constructor
-
TriMarkers
public TriMarkers(org.locationtech.jts.geom.Coordinate p0, org.locationtech.jts.geom.Coordinate p1, org.locationtech.jts.geom.Coordinate p2, double m1, double m2, double m3)Constructor- Parameters:
p0- First vertexp1- Second vertexp2- Third vertexm1- First vertex attributem2- Second vertex attributem3- Third vertex attribute
-
-
Method Detail
-
getNormalVector
public static org.locationtech.jts.math.Vector3D getNormalVector(org.locationtech.jts.geom.Triangle t) throws IllegalArgumentExceptionGet the normal vector to this triangle, of length 1.- Parameters:
t- input triangle- Returns:
- vector normal to the triangle.
- Throws:
IllegalArgumentException
-
getSteepestVector
public static org.locationtech.jts.math.Vector3D getSteepestVector(org.locationtech.jts.math.Vector3D normal, double epsilon)Get the vector with the highest down slope in the plan.- Parameters:
normal-epsilon-- Returns:
- the steepest vector.
-
getSlopeInPercent
public static double getSlopeInPercent(org.locationtech.jts.math.Vector3D normal, double epsilon)- Parameters:
normal- Plane normalepsilon- Epsilon value ex:1e-12- Returns:
- The steepest slope of this plane in degree.
-
intersects
public static boolean intersects(org.locationtech.jts.geom.Coordinate p, org.locationtech.jts.geom.Triangle t)Test if a coordinate intersects the triangle- Parameters:
p- Coordinate of the pointt- input triangle- Returns:
- True if the coordinate is in triangle
- See Also:
- www.blackpawn.com
-
-