Class TriMarkers


  • public class TriMarkers
    extends org.locationtech.jts.geom.Triangle
    Used 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
    • Field Summary

      • Fields inherited from class org.locationtech.jts.geom.Triangle

        p0, p1, p2
    • Constructor Summary

      Constructors 
      Constructor Description
      TriMarkers()
      Default constructor
      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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.locationtech.jts.math.Vector3D getNormalVector​(org.locationtech.jts.geom.Triangle t)
      Get the normal vector to this triangle, of length 1.
      static double getSlopeInPercent​(org.locationtech.jts.math.Vector3D normal, double epsilon)  
      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.
      static boolean intersects​(org.locationtech.jts.geom.Coordinate p, org.locationtech.jts.geom.Triangle t)
      Test if a coordinate intersects the triangle
      String toString()  
      • 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 vertex
        p1 - Second vertex
        p2 - Third vertex
        m1 - First vertex attribute
        m2 - Second vertex attribute
        m3 - Third vertex attribute
    • Method Detail

      • getNormalVector

        public static org.locationtech.jts.math.Vector3D getNormalVector​(org.locationtech.jts.geom.Triangle t)
                                                                  throws IllegalArgumentException
        Get 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 normal
        epsilon - 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 point
        t - input triangle
        Returns:
        True if the coordinate is in triangle
        See Also:
        www.blackpawn.com