Class PolyLine_2
Class representing a polyline in the plane (ordered sequence of points in 2D)
- Version:
- dec 2012
- Author:
- Luca Castelli Aleardi, Ecole Polytechnique (INF562)
-
Field Summary
Fields inherited from class Jcg.geometry.PointCloud
dimension, points -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new empty polylinePolyLine_2(int n) Create a polyline of size nPolyLine_2(ArrayList<Point_2> points) Create a new polyline (a copy of the list is created) from a collection of pointsPolyLine_2(PointCloud_2 pointCloud) Create a polyline from a point cloud (there is no copy of the list) -
Method Summary
Modifier and TypeMethodDescriptionvoidA a point to the polylinevoidAppend a point to the polylineCompute and return the list of segments defining the polylineMethods inherited from class Jcg.geometry.PointCloud_2
boundingBox, max, min, pointsInCircleMethods inherited from class Jcg.geometry.PointCloud
add, dimension, listOfPoints, remove, size
-
Constructor Details
-
PolyLine_2
public PolyLine_2()Create a new empty polyline -
PolyLine_2
public PolyLine_2(int n) Create a polyline of size n- Parameters:
n- number of points
-
PolyLine_2
-
PolyLine_2
Create a polyline from a point cloud (there is no copy of the list)- Parameters:
a- point cloud
-
-
Method Details
-
addFirst
-
addLast
-
computeSegments
Compute and return the list of segments defining the polyline
-