aima.core.robotics.impl.map.IPoseFactory Maven / Gradle / Ivy
Show all versions of aima-core Show documentation
package aima.core.robotics.impl.map;
import aima.core.robotics.datatypes.IMclMove;
import aima.core.robotics.impl.datatypes.IPose2D;
import aima.core.util.math.geom.shapes.Point2D;
/**
* This interface defines a factory for the class implementing {@link IPose2D} in the context of the {@link MclCartesianPlot2D}.
*
* @author Arno von Borries
* @author Jan Phillip Kretzschmar
* @author Andreas Walscheid
*
* @param a pose implementing {@link IPose2D}.
* @param a movement (or a sequence of movements) implementing {@link IMclMove}.
*/
public interface IPoseFactory,M extends IMclMove> {
/**
* Creates a new instance of {@code } for the given parameters.
* @param point the 2D coordinates of the new pose.
* @return the new pose.
*/
P getPose(Point2D point);
/**
* Creates a new instance of {@code
} for the given parameters.
* This function is used to create the result of {@link MclCartesianPlot2D}{@code .getAverage()}.
* @param point the 2D coordinates of the new pose.
* @param heading the heading of the pose. This heading may be invalid. Based on the given environment this can be corrected or ignored.
* @return the new pose.
*/
P getPose(Point2D point, double heading);
/**
* Checks whether the heading of a pose is valid.
* @param pose the pose to be checked.
* @return true if the heading is valid.
*/
boolean isHeadingValid(P pose);
}