org.osm2world.core.map_elevation.creation
Class ForceElevationCalculator.ForceElevationDeterminationScenario.AngleForce
Object
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.
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 ForceNode s yet. |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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()
ForceElevationCalculator.ForceElevationDeterminationScenario.AngleForce
public ForceElevationCalculator.ForceElevationDeterminationScenario.AngleForce(AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode node,
AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode neighbor1,
AdvancedAbstractElevationCalculator.AbstractElevationDeterminationScenario.ForceNode neighbor2)
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
ForceNode
s 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