Codota Logo
TPoint.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.poly2tri.triangulation.point.TPoint
constructor

Best Java code snippets using org.poly2tri.triangulation.point.TPoint.<init> (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.orbisgis/poly2tri-core

public static List<TriangulationPoint> uniformDistribution( int n, double scale )
{
  ArrayList<TriangulationPoint> points = new ArrayList<TriangulationPoint>();
  for( int i=0; i<n; i++ )
  {
    points.add( new TPoint( scale*(0.5 - Math.random()), scale*(0.5 - Math.random()) ) );
  }
  return points;
}
 
origin: org.orbisgis/h2gis-functions

protected int addPt(Coordinate coordinate) {
  TPoint pt = new TPoint(delaunayData.r(coordinate.x), delaunayData.r(coordinate.y),
      Double.isNaN(coordinate.z) ? 0 : delaunayData.r(coordinate.z));
  Integer index = pts.get(pt);
  if(index == null) {
    index = maxIndex.getAndAdd(1);
    pts.put(pt, index);
  }
  return index;
}
origin: orbisgis/h2gis

protected int addPt(Coordinate coordinate) {
  TPoint pt = new TPoint(delaunayData.r(coordinate.x), delaunayData.r(coordinate.y),
      Double.isNaN(coordinate.z) ? 0 : delaunayData.r(coordinate.z));
  Integer index = pts.get(pt);
  if(index == null) {
    index = maxIndex.getAndAdd(1);
    pts.put(pt, index);
  }
  return index;
}
origin: org.orbisgis/h2gis

protected int addPt(Coordinate coordinate) {
  TPoint pt = new TPoint(delaunayData.r(coordinate.x), delaunayData.r(coordinate.y),
      Double.isNaN(coordinate.z) ? 0 : delaunayData.r(coordinate.z));
  Integer index = pts.get(pt);
  if(index == null) {
    index = maxIndex.getAndAdd(1);
    pts.put(pt, index);
  }
  return index;
}
origin: org.orbisgis/poly2tri-core

  public static List<TriangulationPoint> uniformGrid( int n, double scale )
  {
    double x=0;
    double size = scale/n;
    double halfScale = 0.5*scale;
    
    ArrayList<TriangulationPoint> points = new ArrayList<TriangulationPoint>();
    for( int i=0; i<n+1; i++ )
    {
      x =  halfScale - i*size;
      for( int j=0; j<n+1; j++ )
      {
        points.add( new TPoint( x, halfScale - j*size ) );
      }
    }
    return points;        
  }
}
origin: kendzi/kendzi3d

  @Override
  public void prepareTriangulation(TriangulationContext<?> tcx) {
    triangles.clear();
    for (LineSegment2d l : segmentSet) {
      TriangulationPoint tp1, tp2;
      if (!pointSet.containsKey(l.getBegin())) {
        tp1 = new TPoint(l.getBegin().x, l.getBegin().y);
        pointSet.put(l.getBegin(), tp1);
        points.add(tp1);
      } else {
        tp1 = pointSet.get(l.getBegin());
      }
      if (!pointSet.containsKey(l.getEnd())) {
        tp2 = new TPoint(l.getEnd().x, l.getEnd().y);
        pointSet.put(l.getEnd(), tp2);
        points.add(tp2);
      } else {
        tp2 = pointSet.get(l.getEnd());
      }
      tcx.newConstraint(tp1, tp2);
    }
    segmentSet.clear();
    pointSet.clear();
    tcx.addPoints(points);
  }
}
origin: kendzi/kendzi3d

TPoint tp = new TPoint(p.x, p.y);
pointSet.put(p, tp);
points.add(tp);
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

TPoint p1 = new TPoint( xmax + deltaX, ymin - deltaY );
TPoint p2 = new TPoint( xmin - deltaX, ymin - deltaY );
org.poly2tri.triangulation.pointTPoint<init>

Popular methods of TPoint

    Popular in Java

    • Making http post requests using okhttp
    • setScale (BigDecimal)
    • getSharedPreferences (Context)
    • setRequestProperty (URLConnection)
      Sets the general request property. If a property with the key already exists, overwrite its value wi
    • HttpServer (com.sun.net.httpserver)
      This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
    • BufferedInputStream (java.io)
      Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
    • ConnectException (java.net)
      A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
    • Time (java.sql)
      Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
    • LinkedHashMap (java.util)
      Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
    • TreeMap (java.util)
      A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now