Tabnine Logo
PolygonPoint.setNext
Code IndexAdd Tabnine to your IDE (free)

How to use
setNext
method
in
org.poly2tri.geometry.polygon.PolygonPoint

Best Java code snippets using org.poly2tri.geometry.polygon.PolygonPoint.setNext (Showing top 4 results out of 315)

origin: org.orbisgis/poly2tri-core

/**
 * Will add a point after the last point added
 * 
 * @param p
 */
public void addPoint(PolygonPoint p )    
{
  p.setPrevious( _last );
  p.setNext( _last.getNext() );
  _last.setNext( p );
  _points.add( p );
}
 
origin: org.orbisgis/poly2tri-core

public void addPoints( List<PolygonPoint> list )    
{
  PolygonPoint first;
  for( PolygonPoint p : list )
  {
    p.setPrevious( _last );
    if( _last != null )
    {
      p.setNext( _last.getNext() );
      _last.setNext( p );
    }
    _last = p;
    _points.add( p );
  }
  first = (PolygonPoint)_points.get(0);
  _last.setNext( first );
  first.setPrevious( _last );
}
 
origin: org.orbisgis/poly2tri-core

/**
 * Will insert a point in the polygon after given point
 */
public void insertPointAfter( PolygonPoint a, PolygonPoint newPoint )
{
  // Validate that 
  int index = _points.indexOf( a );
  if( index != -1 )
  {
    newPoint.setNext( a.getNext() );
    newPoint.setPrevious( a );
    a.getNext().setPrevious( newPoint );
    a.setNext( newPoint );
    _points.add( index+1, newPoint );
  }
  else
  {
    throw new RuntimeException( "Tried to insert a point into a Polygon after a point not belonging to the Polygon" );
  }
}
origin: org.orbisgis/poly2tri-core

public void removePoint( PolygonPoint p )
{
  PolygonPoint next, prev;
  
  next = p.getNext();
  prev = p.getPrevious();
  prev.setNext( next );
  next.setPrevious( prev );
  _points.remove( p );
}
org.poly2tri.geometry.polygonPolygonPointsetNext

Popular methods of PolygonPoint

  • <init>
  • equals
  • getNext
  • getPrevious
  • setPrevious

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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