Documentation of 'Catalano.Math.Geometry.FlatAnglesOptimizer' Java class
FlatAnglesOptimizer
Catalano.Math.Geometry

Class FlatAnglesOptimizer

  • All Implemented Interfaces:
    IShapeOptimizer


    public class FlatAnglesOptimizer
    extends java.lang.Object
    implements IShapeOptimizer
    Shape optimizer, which removes obtuse angles (close to flat) from a shape.
    • Constructor Summary

      Constructors 
      Constructor and Description
      FlatAnglesOptimizer()
      Initializes a new instance of the class.
      FlatAnglesOptimizer(float maxAngleToKeep)
      Initializes a new instance of the class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      float getMaxAngleToKeep()
      Maximum angle between adjacent edges to keep in a shape, [140, 180].
      java.util.List<IntPoint> OptimizeShape(java.util.List<IntPoint> shape)
      Optimize specified shape.
      void setMaxAngleToKeep(float maxAngleToKeep)
      Maximum angle between adjacent edges to keep in a shape, [140, 180].
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FlatAnglesOptimizer

        public FlatAnglesOptimizer()
        Initializes a new instance of the class. Default value is set to 160.
      • FlatAnglesOptimizer

        public FlatAnglesOptimizer(float maxAngleToKeep)
        Initializes a new instance of the class. Default value is set to 160.
        Parameters:
        maxAngleToKeep - Maximum acceptable angle between two edges of a shape (see ).
    • Method Detail

      • getMaxAngleToKeep

        public float getMaxAngleToKeep()
        Maximum angle between adjacent edges to keep in a shape, [140, 180].
        Returns:
        Angle.
      • setMaxAngleToKeep

        public void setMaxAngleToKeep(float maxAngleToKeep)
        Maximum angle between adjacent edges to keep in a shape, [140, 180].
        Parameters:
        maxAngleToKeep -
      • OptimizeShape

        public java.util.List<IntPoint> OptimizeShape(java.util.List<IntPoint> shape)
        Description copied from interface: IShapeOptimizer
        Optimize specified shape.
        Specified by:
        OptimizeShape in interface IShapeOptimizer
        Parameters:
        shape - Shape to be optimized.
        Returns:
        Returns final optimized shape, which may have reduced amount of points.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.