org.jdelaunay.delaunay.evaluator
Class SkinnyEvaluator

java.lang.Object
  extended by org.jdelaunay.delaunay.evaluator.SkinnyEvaluator
All Implemented Interfaces:
InsertionEvaluator

public class SkinnyEvaluator
extends Object
implements InsertionEvaluator

Evaluator used to determine if a triangle is skinny (ie if it has an angle inferior to a given value) or not.

Author:
Alexis Guéganno

Field Summary
static double MAX_VALUE
          The maximum valule that can be used in a skinny evaluator.
 
Constructor Summary
SkinnyEvaluator(double minAngle)
          Instanciate a new SkinnyEvaluator, with the given threshold angle value, in degrees.
 
Method Summary
 boolean evaluate(DTriangle dt)
          Returns true if the circumcenter of dt must be inserted.
 double getMinAngle()
          Get the angle that is used to determine if triangles are skinny or not.
 void setMinAngle(double minAngle)
          Set the minimum angle that will be used to determine if triangles are skinny, for this evaluator, or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_VALUE

public static final double MAX_VALUE
The maximum valule that can be used in a skinny evaluator. As the Ruppert algorithm won't end for angles superior to this value, such values are forbidden.

See Also:
Constant Field Values
Constructor Detail

SkinnyEvaluator

public SkinnyEvaluator(double minAngle)
Instanciate a new SkinnyEvaluator, with the given threshold angle value, in degrees.

Parameters:
minAngle -
Throws:
IllegalArgumentException - if minAngle is greater than 32° or inferior to 0°
Method Detail

getMinAngle

public final double getMinAngle()
Get the angle that is used to determine if triangles are skinny or not.

Returns:
The angle limit, in degrees.

setMinAngle

public final void setMinAngle(double minAngle)
Set the minimum angle that will be used to determine if triangles are skinny, for this evaluator, or not.

Parameters:
minAngle - The new limit, in degrees.
Throws:
IllegalArgumentException - if minAngle is greater than 32° or inferior to 0°

evaluate

public final boolean evaluate(DTriangle dt)
Description copied from interface: InsertionEvaluator
Returns true if the circumcenter of dt must be inserted.

Specified by:
evaluate in interface InsertionEvaluator
Returns:
true if the insertion is needed.


Copyright © 2014 IRSTV CNRS-FR-2488. All Rights Reserved.