Package com.kakao.vectormap.shape
Class PointVertex
- java.lang.Object
-
- com.kakao.vectormap.shape.PointVertex
-
public class PointVertex extends java.lang.ObjectDotPoints의 정점을 구성하는 포인트들을 모아놓은 컨테이너 클래스.
-
-
Field Summary
Fields Modifier and Type Field Description booleanclockwisefloatheightPointVertex[]holesfloatradiusintshapeTypeintvertexCountfloatwidthfloat[]xArrayfloat[]yArray
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PointVertexfromCircle(float radius)원(Circle)을 구성하는 PointVertex 를 생성한다.static PointVertexfromCircle(float radius, boolean clockwise)원(Circle)을 구성하는 PointVertex 를 생성한다.static PointVertexfromCircle(float radius, boolean clockwise, int vertexCount)원(Circle)을 구성하는 PointVertex 를 생성한다.static PointVertexfromPoint(java.util.Collection<PointF> points)PointVertex 를 생성한다.static PointVertexfromPoint(java.util.Collection<PointF> points, boolean clockwise)PointVertex 를 생성한다.static PointVertexfromPoint(PointF... points)PointVertex 를 생성한다.static PointVertexfromPoint(PointF[] points, boolean clockwise)PointVertex 를 생성한다.static PointVertexfromRectangle(float width, float height)사각형(Rectangle) 을 구성하는 PointVertex 를 생성한다.static PointVertexfromRectangle(float width, float height, boolean clockwise)사각형(Rectangle) 을 구성하는 PointVertex 를 생성한다.floatgetHeight()사각형(Rectangle) 일 때 세로 길이를 가져온다.PointVertex[]getHoles()구멍 정점 배열을 가져온다.floatgetRadius()원(Circle) 일 때 반지름 길이를 가져온다.intgetShapeType()shapeType 을 가져온다.intgetVertexCount()vertexCount 가져온다.floatgetWidth()사각형(Rectangle) 일 때 가로 길이를 가져온다.booleanisClockwise()정점을 잇는 시계방향 여부를 가져온다.PointVertexsetClockwise(boolean clockwise)정점을 잇는 시계방향 여부를 설정한다.PointVertexsetHoles(PointVertex... holes)구멍(Hole)을 추가한다.PointVertexsetHoles(java.util.Collection<PointVertex> holes)구멍(Hole)을 추가한다.PointVertexsetVertexCount(int vertexCount)vertexCount 를 설정한다.
-
-
-
Field Detail
-
shapeType
public int shapeType
-
clockwise
public boolean clockwise
-
radius
public float radius
-
vertexCount
public int vertexCount
-
width
public float width
-
height
public float height
-
xArray
public float[] xArray
-
yArray
public float[] yArray
-
holes
public PointVertex[] holes
-
-
Method Detail
-
fromCircle
public static PointVertex fromCircle(float radius)
원(Circle)을 구성하는 PointVertex 를 생성한다.- Parameters:
radius- 원(Circle) 의 반지름 (px).
-
fromCircle
public static PointVertex fromCircle(float radius, boolean clockwise)
원(Circle)을 구성하는 PointVertex 를 생성한다.- Parameters:
radius- 원(Circle) 의 반지름 (px).clockwise- 정점을 잇는 시계방향 여부. Polygon 에 Hole 을 만들 때는 시계반대방향으로 구성되어야 하므로 false 를 넣는다.
-
fromCircle
public static PointVertex fromCircle(float radius, boolean clockwise, int vertexCount)
원(Circle)을 구성하는 PointVertex 를 생성한다.- Parameters:
radius- 원(Circle) 의 반지름 (px).clockwise- 정점을 잇는 시계방향 여부. Polygon 에 Hole 을 만들 때는 시계반대방향으로 구성되어야 하므로 false 를 넣는다.vertexCount- vertexCount
-
fromRectangle
public static PointVertex fromRectangle(float width, float height)
사각형(Rectangle) 을 구성하는 PointVertex 를 생성한다.- Parameters:
width- 사각형의 가로 길이 (px)height- 사각형의 세로 길이 (px)
-
fromRectangle
public static PointVertex fromRectangle(float width, float height, boolean clockwise)
사각형(Rectangle) 을 구성하는 PointVertex 를 생성한다.- Parameters:
width- 사각형의 가로 길이 (px)height- 사각형의 세로 길이 (px)clockwise- 정점을 잇는 시계방향 여부. Polygon 에 Hole 을 만들 때는 시계반대방향으로 구성되어야 하므로 false 를 넣는다.
-
fromPoint
public static PointVertex fromPoint(PointF... points)
PointVertex 를 생성한다.- Parameters:
points- 정점 배열.
-
fromPoint
public static PointVertex fromPoint(PointF[] points, boolean clockwise)
PointVertex 를 생성한다.- Parameters:
points- 정점 배열.clockwise- 정점을 잇는 시계방향 여부. Polygon 에 Hole 을 만들 때는 시계반대방향으로 구성되어야 하므로 false 를 넣는다.
-
fromPoint
public static PointVertex fromPoint(java.util.Collection<PointF> points)
PointVertex 를 생성한다.- Parameters:
points- 정점 리스트.
-
fromPoint
public static PointVertex fromPoint(java.util.Collection<PointF> points, boolean clockwise)
PointVertex 를 생성한다.- Parameters:
points- 정점 리스트.clockwise- 정점을 잇는 시계방향 여부. Polygon 에 Hole 을 만들 때는 시계반대방향으로 구성되어야 하므로 false 를 넣는다.
-
setHoles
public PointVertex setHoles(PointVertex... holes)
구멍(Hole)을 추가한다.- Parameters:
holes- 구멍이 될 정점이 추가 된 PointVertex 배열.
-
setHoles
public PointVertex setHoles(java.util.Collection<PointVertex> holes)
구멍(Hole)을 추가한다.- Parameters:
holes- 구멍이 될 정점이 추가 된 PointVertex 리스트.
-
setClockwise
public PointVertex setClockwise(boolean clockwise)
정점을 잇는 시계방향 여부를 설정한다. Polygon 에 Hole 을 만들 때는 시계반대방향으로 구성되어야 하므로 false 를 넣는다.- Parameters:
clockwise- 정점을 잇는 시계방향 여부.
-
setVertexCount
public PointVertex setVertexCount(int vertexCount)
vertexCount 를 설정한다.- Parameters:
vertexCount- vertexCount 설정.
-
getHoles
public PointVertex[] getHoles()
구멍 정점 배열을 가져온다.
-
getShapeType
public int getShapeType()
shapeType 을 가져온다.
-
isClockwise
public boolean isClockwise()
정점을 잇는 시계방향 여부를 가져온다.
-
getWidth
public float getWidth()
사각형(Rectangle) 일 때 가로 길이를 가져온다.
-
getHeight
public float getHeight()
사각형(Rectangle) 일 때 세로 길이를 가져온다.
-
getRadius
public float getRadius()
원(Circle) 일 때 반지름 길이를 가져온다.
-
getVertexCount
public int getVertexCount()
vertexCount 가져온다.
-
-