org.osm2world.core.map_elevation.creation
Class ForceElevationCalculator.ForceElevationDeterminationScenario.AngleForce

Object
  extended by ForceElevationCalculator.ForceElevationDeterminationScenario.AngleForce
All Implemented Interfaces:
ForceElevationCalculator.ForceElevationDeterminationScenario.Force
Enclosing class:
ForceElevationCalculator.ForceElevationDeterminationScenario

protected static final class ForceElevationCalculator.ForceElevationDeterminationScenario.AngleForce
extends Object
implements ForceElevationCalculator.ForceElevationDeterminationScenario.Force

force that tries to reduce extreme angles. If the center node is not on the interpolation between the two adjacent lines, a force will try to move it there.


Field Summary
protected  Double effect
          effect used in apply()
protected  AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode neighbor1
           
protected  AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode neighbor2
           
protected  AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode node
           
 
Constructor Summary
ForceElevationCalculator.ForceElevationDeterminationScenario.AngleForce(AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode node, AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode neighbor1, AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode neighbor2)
           
 
Method Summary
 void apply()
          applies this force to the nodes affected by it.
 void prepare(float forceScale)
          Calculates the effect of the next application, but doesn't modify the ForceNodes yet.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

protected final AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode node

neighbor1

protected final AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode neighbor1

neighbor2

protected final AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode neighbor2

effect

protected Double effect
effect used in apply()

Constructor Detail

ForceElevationCalculator.ForceElevationDeterminationScenario.AngleForce

public ForceElevationCalculator.ForceElevationDeterminationScenario.AngleForce(AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode node,
                                                                               AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode neighbor1,
                                                                               AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode neighbor2)
Method Detail

prepare

public void prepare(float forceScale)
Description copied from interface: ForceElevationCalculator.ForceElevationDeterminationScenario.Force
Calculates the effect of the next application, but doesn't modify the ForceNodes yet. Must be called once before each ForceElevationCalculator.ForceElevationDeterminationScenario.Force.apply() call. This method has been introduced to remove effects of the force order (otherwise, later forces could "react" to the previous ones).

Specified by:
prepare in interface ForceElevationCalculator.ForceElevationDeterminationScenario.Force
Parameters:
forceScale - scale factor for the force's strength

apply

public void apply()
Description copied from interface: ForceElevationCalculator.ForceElevationDeterminationScenario.Force
applies this force to the nodes affected by it.

Specified by:
apply in interface ForceElevationCalculator.ForceElevationDeterminationScenario.Force