Tabnine Logo
TriangulationPoint.getY
Code IndexAdd Tabnine to your IDE (free)

How to use
getY
method
in
org.poly2tri.triangulation.TriangulationPoint

Best Java code snippets using org.poly2tri.triangulation.TriangulationPoint.getY (Showing top 20 results out of 315)

origin: org.orbisgis/poly2tri-core

@Override
public String toString()
{
  return "[" + getX() + "," + getY() + "]";
}
 
origin: org.orbisgis/poly2tri-core

public boolean equals(Object obj) 
{
  if( obj instanceof TriangulationPoint ) 
  {
    TriangulationPoint p = (TriangulationPoint)obj;
    return getX() == p.getX() && getY() == p.getY();
  }
  return super.equals( obj );
}
origin: org.orbisgis/poly2tri-core

public double area()
{
  double a = (points[0].getX() - points[2].getX())*(points[1].getY() - points[0].getY());
  double b = (points[0].getX() - points[1].getX())*(points[2].getY() - points[0].getY());
  return 0.5*Math.abs( a - b );
}
origin: org.orbisgis/poly2tri-core

public int hashCode()
{
  long bits = java.lang.Double.doubleToLongBits(getX());
  bits ^= java.lang.Double.doubleToLongBits(getY()) * 31;
  return (((int) bits) ^ ((int) (bits >> 32)));
}
origin: org.orbisgis/poly2tri-core

/**
 * The basin angle is decided against the horizontal line [1,0]
 */
private static double basinAngle( AdvancingFrontNode node )
{
  double ax = node.point.getX() - node.next.next.point.getX();
  double ay = node.point.getY() - node.next.next.point.getY();
  return Math.atan2( ay, ax );
}
origin: org.orbisgis/poly2tri-core

public TPoint centroid()
{
  double cx = ( points[0].getX() + points[1].getX() + points[2].getX() ) / 3d;
  double cy = ( points[0].getY() + points[1].getY() + points[2].getY() ) / 3d;
  return new TPoint( cx, cy );
}
origin: org.orbisgis/poly2tri-core

private static boolean isShallow( DTSweepContext tcx, AdvancingFrontNode node )
{
  double height;
  if( tcx.basin.leftHighest )
  {
    height = tcx.basin.leftNode.getPoint().getY() - node.getPoint().getY();
  }
  else
  {
    height = tcx.basin.rightNode.getPoint().getY() - node.getPoint().getY();            
  }
  if( tcx.basin.width > height ) 
  {
    return true;
  }        
  return false;
}

origin: org.orbisgis/poly2tri-core

/**
 * Forumla to calculate signed area<br>
 * Positive if CCW<br>
 * Negative if CW<br>
 * 0 if collinear<br>
 * <pre>
 * A[P1,P2,P3]  =  (x1*y2 - y1*x2) + (x2*y3 - y2*x3) + (x3*y1 - y3*x1)
 *              =  (x1-x3)*(y2-y3) - (y1-y3)*(x2-x3)
 * </pre>             
 */
public static Orientation orient2d( TriangulationPoint pa, 
                  TriangulationPoint pb, 
                  TriangulationPoint pc )
{
  double detleft = ( pa.getX() - pc.getX() ) * ( pb.getY() - pc.getY() );
  double detright = ( pa.getY() - pc.getY() ) * ( pb.getX() - pc.getX() );
  double val = detleft - detright;
  if( val > -EPSILON && val < EPSILON )
  {
    return Orientation.Collinear;                    
  }
  else if( val > 0 )
  {
    return Orientation.CCW;
  }
  return Orientation.CW;
}
origin: org.orbisgis/poly2tri-core

  public int compare( TriangulationPoint p1, TriangulationPoint p2 )
  {
   if(p1.getY() < p2.getY() )
   {
     return -1;
   }
   else if( p1.getY() > p2.getY())
   {
     return 1;
   }
   else 
   {
     if(p1.getX() < p2.getX())
     {
       return -1;
     }
     else if( p1.getX() > p2.getX() )
     {
       return 1;
     }
     else
     {
       return 0;
     }
   }            
  }
}
origin: org.orbisgis/poly2tri-core

/**
 * 
 * @param node - middle node
 * @return the angle between p-a and p-b in range [-pi,pi]
 */
private static double angle( TriangulationPoint p, 
               TriangulationPoint a, 
               TriangulationPoint b )
{
  // XXX: do we really need a signed angle for holeAngle?
  //      could possible save some cycles here
  /* Complex plane
   * ab = cosA +i*sinA
   * ab = (ax + ay*i)(bx + by*i) = (ax*bx + ay*by) + i(ax*by-ay*bx)
   * atan2(y,x) computes the principal value of the argument function
   * applied to the complex number x+iy
   * Where x = ax*bx + ay*by
   *       y = ax*by - ay*bx
   */
  final double px = p.getX();
  final double py = p.getY();
  final double ax = a.getX() - px;
  final double ay = a.getY() - py;
  final double bx = b.getX() - px;
  final double by = b.getY() - py;
  return Math.atan2( ax*by - ay*bx, ax*bx + ay*by );
}
origin: org.orbisgis/poly2tri-core

final double pdy = pd.getY();
final double adx = pa.getX() - pdx;
final double ady = pa.getY() - pdy;        
final double bdx = pb.getX() - pdx;
final double bdy = pb.getY() - pdy;
final double cdy = pc.getY() - pdy;
origin: org.orbisgis/poly2tri-core

if( p1.getY() > p2.getY() )
else if( p1.getY() == p2.getY() )
origin: org.orbisgis/h2gis-functions

double uy = p2.getY() - p1.getY();
double uz = p2.getZ() - p1.getZ();
double vy = p3.getY() - p1.getY();
double vz = p3.getZ() - p1.getZ();
origin: orbisgis/h2gis

double uy = p2.getY() - p1.getY();
double uz = p2.getZ() - p1.getZ();
double vy = p3.getY() - p1.getY();
double vz = p3.getZ() - p1.getZ();
origin: org.orbisgis/poly2tri-core

ymax = ymin = _points.get(0).getY();
  if( p.getX() < xmin )
    xmin = p.getX();
  if( p.getY() > ymax )
    ymax = p.getY();
  if( p.getY() < ymin )
    ymin = p.getY();
origin: org.orbisgis/h2gis

double uy = p2.getY() - p1.getY();
double uz = p2.getZ() - p1.getZ();
double vy = p3.getY() - p1.getY();
double vz = p3.getZ() - p1.getZ();
origin: kendzi/kendzi3d

private static List<Triangle2d> convert(Polygon p) {
  List<DelaunayTriangle> triangles = p.getTriangles();
  if (triangles == null || triangles.size() == 0) {
    return null;
  }
  List<Triangle2d> out = new ArrayList<Triangle2d>();
  for (DelaunayTriangle t : triangles) {
    Triangle2d triangle = new Triangle2d(
        new Point2d(t.points[0].getX(), t.points[0].getY()),
        new Point2d(t.points[1].getX(), t.points[1].getY()),
        new Point2d(t.points[2].getX(), t.points[2].getY()));
    out.add(triangle);
  }
  return out;
}
origin: org.orbisgis/poly2tri-core

   && tcx.basin.bottomNode.point.getY() >= tcx.basin.bottomNode.next.point.getY() )
   && tcx.basin.rightNode.point.getY() < tcx.basin.rightNode.next.point.getY() )
tcx.basin.leftHighest = tcx.basin.leftNode.getPoint().getY() > tcx.basin.rightNode.getPoint().getY();
origin: org.orbisgis/poly2tri-core

if( node.prev.point.getY() < node.next.point.getY() )
origin: kendzi/kendzi3d

Point2d center = new Point2d(tCenter.getX(), tCenter.getY());
triangles.add(new Triangle2d(new Point2d(t.points[0].getX(), t.points[0].getY()), new Point2d(t.points[1].getX(),
    t.points[1].getY()), new Point2d(t.points[2].getX(), t.points[2].getY())));
org.poly2tri.triangulationTriangulationPointgetY

Popular methods of TriangulationPoint

  • getX
  • getZ
  • addEdge
  • getEdges
  • hasEdges
  • mergeInstances
    Replace points in ptList for all equals object in uniquePts.

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • runOnUiThread (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Option (scala)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now