Class Translation2D
- java.lang.Object
-
- ch.sahits.game.openpatrician.javafx.effects.transform.Translation2D
-
public class Translation2D extends java.lang.ObjectDefinition of a 2D translation transformation. A 2D point is moved from a source location to a destination location.- Author:
- andi
-
-
Constructor Summary
Constructors Constructor Description Translation2D(double srcX, double srcY, double destX, double destY)Initialize the object using coordinates for the source and destinationTranslation2D(javafx.geometry.Point2D source, javafx.geometry.Point2D destination)Initialize the object using two 2D points.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.Point2D>destinationProperty()Property containing the destination point.javafx.geometry.Point2DgetDestination()Get the destination point.javafx.geometry.Point2DgetSource()Get the source point.javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.Point2D>sourceProperty()Property containing the source point.
-
-
-
Constructor Detail
-
Translation2D
public Translation2D(javafx.geometry.Point2D source, javafx.geometry.Point2D destination)Initialize the object using two 2D points.- Parameters:
source- pointdestination- point
-
Translation2D
public Translation2D(double srcX, double srcY, double destX, double destY)Initialize the object using coordinates for the source and destination- Parameters:
srcX- X-coordinate of the source pointsrcY- Y-coordinate of the source pointdestX- X-coordinate of the destination pointdestY- Y-coordinate of the destination point
-
-
Method Detail
-
getSource
public javafx.geometry.Point2D getSource()
Get the source point.- Returns:
- .
-
getDestination
public javafx.geometry.Point2D getDestination()
Get the destination point.- Returns:
- .
-
sourceProperty
public javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.Point2D> sourceProperty()
Property containing the source point.- Returns:
- .
-
destinationProperty
public javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.Point2D> destinationProperty()
Property containing the destination point.- Returns:
- .
-
-