Package science.aist.imaging.api.domain
Class AbstractSurface<P extends AbstractJavaPoint<P>,L extends AbstractJavaLine<P>>
- java.lang.Object
-
- science.aist.imaging.api.domain.AbstractSurface<P,L>
-
- Type Parameters:
P
- The type of the point.L
- the type of the line.
- Direct Known Subclasses:
AbstractJavaPolygon
public abstract class AbstractSurface<P extends AbstractJavaPoint<P>,L extends AbstractJavaLine<P>> extends Object
Abstract class representing any surface
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Constructor Summary
Constructors Constructor Description AbstractSurface()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract List<L>
calculateContour()
protected abstract P
calculateNormalvector()
protected Optional<P>
getIntersection(P planePoint, AbstractJavaLine<P> line)
Determines the point of intersection between this surface and a line (source: https://stackoverflow.com/questions/5666222/3d-line-plane-intersection)
-
-
-
Method Detail
-
calculateNormalvector
protected abstract P calculateNormalvector()
- Returns:
- the normalvector of this surface
-
calculateContour
protected abstract List<L> calculateContour()
- Returns:
- returns the path segments of this surface
-
getIntersection
protected Optional<P> getIntersection(P planePoint, AbstractJavaLine<P> line)
Determines the point of intersection between this surface and a line (source: https://stackoverflow.com/questions/5666222/3d-line-plane-intersection)- Parameters:
planePoint
- point on this surfaceline
- to intersect with- Returns:
- Optional containing intersection point or
Optional.empty()
if line is parallel to triangle
-
-