Package snap.geom
Class PointArrayIndex
java.lang.Object
snap.geom.PointArrayIndex
- All Implemented Interfaces:
Cloneable
This class represents an array of indexes into a PointArray assumed to form a polygon, quads or triangles.
-
Constructor Summary
ConstructorDescriptionPointArrayIndex
(double... theCoords) Constructor for given XY coords double array. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Standard clone implementation.int
getIndex
(int anIndex) Returns the PointArray index at given index.int[]
Returns the index array.Returns the PointArray holding actual points.int
Returns the point count.double
getX
(int anIndex) Returns the x at given point index.double
getY
(int anIndex) Returns the y at given point index.static PointArrayIndex
newTrianglePointArrayForPolygonPoints
(double[] pointsArray) Returns a PointsArray with triangle ordering.static PointArrayIndex
newTrianglePointArrayForShape
(Shape aShape) Returns a PointsArray with triangle ordering.
-
Constructor Details
-
PointArrayIndex
public PointArrayIndex(double... theCoords) Constructor for given XY coords double array.
-
-
Method Details
-
getPointArray
Returns the PointArray holding actual points. -
getPointCount
public int getPointCount()Returns the point count. -
getIndexArray
public int[] getIndexArray()Returns the index array. -
getIndex
public int getIndex(int anIndex) Returns the PointArray index at given index. -
getX
public double getX(int anIndex) Returns the x at given point index. -
getY
public double getY(int anIndex) Returns the y at given point index. -
clone
Standard clone implementation. -
newTrianglePointArrayForShape
Returns a PointsArray with triangle ordering. -
newTrianglePointArrayForPolygonPoints
Returns a PointsArray with triangle ordering.
-