public class ProjectionStrategy extends java.lang.Object implements IComputationStrategy
IComputationStrategy that computes anchor position by projecting
the respective anchored reference point to the outline of the anchorage
reference geometry so that the respective point has minimal distance to the
anchored reference point.
In detail, the computation is done as follows:
getOutlineSegments(IGeometry).IComputationStrategy.Parameter<T>| Constructor and Description |
|---|
ProjectionStrategy() |
| Modifier and Type | Method and Description |
|---|---|
Point |
computePositionInScene(javafx.scene.Node anchorage,
javafx.scene.Node anchored,
java.util.Set<IComputationStrategy.Parameter<?>> parameters)
Computes an anchor position based on the given anchorage visual, anchored
visual, and anchored reference point.
|
protected Point |
computeProjectionInScene(java.util.List<ICurve> anchorageOutlinesInScene,
Point anchoredReferencePointInScene,
java.util.Set<IComputationStrategy.Parameter<?>> parameters)
Computes the anchorage reference position in scene coordinates, based on
the given anchorage outlines and the given anchored reference point.
|
protected java.util.List<ICurve> |
getOutlineSegments(IGeometry geometry)
|
java.util.Set<java.lang.Class<? extends IComputationStrategy.Parameter<?>>> |
getRequiredParameters()
Returns the types of parameters required by this strategy.
|
public Point computePositionInScene(javafx.scene.Node anchorage, javafx.scene.Node anchored, java.util.Set<IComputationStrategy.Parameter<?>> parameters)
IComputationStrategycomputePositionInScene in interface IComputationStrategyanchorage - The anchorage visual.anchored - The anchored visual.parameters - The available computation parameters. strategy.protected Point computeProjectionInScene(java.util.List<ICurve> anchorageOutlinesInScene, Point anchoredReferencePointInScene, java.util.Set<IComputationStrategy.Parameter<?>> parameters)
anchorageOutlinesInScene - A list of ICurves that describe the outline of the
anchorage.anchoredReferencePointInScene - The reference Point of the anchored for which the
anchorage reference Point is to be determined.parameters - The parameters available for the computation.public java.util.Set<java.lang.Class<? extends IComputationStrategy.Parameter<?>>> getRequiredParameters()
IComputationStrategygetRequiredParameters in interface IComputationStrategyCopyright (c) 2014 itemis AG and others. All rights reserved.