Package science.aist.imaging.api.domain
Class AbstractJavaPolygon<T extends AbstractJavaPoint<T>,L extends AbstractJavaLine<T>>
- java.lang.Object
-
- science.aist.imaging.api.domain.AbstractSurface<T,L>
-
- science.aist.imaging.api.domain.AbstractJavaPolygon<T,L>
-
- Type Parameters:
T
- The type of the point.
- Direct Known Subclasses:
JavaPolygon2D
,JavaPolygon3D
public abstract class AbstractJavaPolygon<T extends AbstractJavaPoint<T>,L extends AbstractJavaLine<T>> extends AbstractSurface<T,L>
Abstract implementation of a polygon
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Constructor Summary
Constructors Constructor Description AbstractJavaPolygon(Collection<T> points)
AbstractJavaPolygon(T... points)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected List<L>
calculateContour()
protected double
calculateInnerDepth()
protected abstract L
createLine(T p1, T p2)
protected abstract T
createPoint(double x, double y, double z)
List<T>
getPoints()
int
getSize()
boolean
isEmpty()
-
Methods inherited from class science.aist.imaging.api.domain.AbstractSurface
calculateNormalvector, getIntersection
-
-
-
-
Field Detail
-
points
protected List<T extends AbstractJavaPoint<T>> points
internal points representing the polygon
-
-
Constructor Detail
-
AbstractJavaPolygon
@SafeVarargs public AbstractJavaPolygon(T... points)
-
AbstractJavaPolygon
public AbstractJavaPolygon(Collection<T> points)
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Returns:
- true if polygon is empty else false
-
getSize
public int getSize()
-
createPoint
protected abstract T createPoint(double x, double y, double z)
-
calculateContour
protected List<L> calculateContour()
- Specified by:
calculateContour
in classAbstractSurface<T extends AbstractJavaPoint<T>,L extends AbstractJavaLine<T>>
- Returns:
- returns the path segments of this surface
-
calculateInnerDepth
protected double calculateInnerDepth()
-
-