Class CoonsPatch


  • class CoonsPatch
    extends Patch
    This class is used to describe a patch for type 6 shading. This was done as part of GSoC2014, Tilman Hausherr is the mentor.
    • Constructor Detail

      • CoonsPatch

        protected CoonsPatch​(java.awt.geom.Point2D[] points,
                             float[][] color)
        Constructor of a patch for type 6 shading.
        Parameters:
        points - 12 control points
        color - 4 corner colors
    • Method Detail

      • reshapeControlPoints

        private java.awt.geom.Point2D[][] reshapeControlPoints​(java.awt.geom.Point2D[] points)
      • calcLevel

        private int[] calcLevel()
      • getTriangles

        private java.util.List<ShadedTriangle> getTriangles()
      • getFlag1Edge

        protected java.awt.geom.Point2D[] getFlag1Edge()
        Description copied from class: Patch
        Get the implicit edge for flag = 1.
        Specified by:
        getFlag1Edge in class Patch
        Returns:
        implicit control points
      • getFlag2Edge

        protected java.awt.geom.Point2D[] getFlag2Edge()
        Description copied from class: Patch
        Get the implicit edge for flag = 2.
        Specified by:
        getFlag2Edge in class Patch
        Returns:
        implicit control points
      • getFlag3Edge

        protected java.awt.geom.Point2D[] getFlag3Edge()
        Description copied from class: Patch
        Get the implicit edge for flag = 3.
        Specified by:
        getFlag3Edge in class Patch
        Returns:
        implicit control points