Class AbstractSurface<P extends AbstractJavaPoint<P>,​L extends AbstractJavaLine<P>>

  • 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 Detail

      • AbstractSurface

        public AbstractSurface()
    • 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 surface
        line - to intersect with
        Returns:
        Optional containing intersection point or Optional.empty() if line is parallel to triangle