Package stitching.model
Class Point
java.lang.Object
stitching.model.Point
An n-dimensional point.
Local coordinates are thought to be immutable, application
of a model changes the world coordinates of the point.- Author:
- Stephan Saalfeld
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinal voidfinal voidapplyInverse(InvertibleModel model) Apply the inverse of aInvertibleModelto thePoint.clone()Clone thisPointinstance.static final floatEstimate the Euclidean distance of twoPointsin the world.final float[]getL()final float[]getW()static final floatsquareDistance(Point p1, Point p2) Estimate the square distance of twoPointsin the world.
-
Constructor Details
-
Point
public Point(float[] l) Constructor Setslto the given float[] reference.- Parameters:
l- reference to the local coordinates of thePoint
-
-
Method Details
-
getW
public final float[] getW() -
getL
public final float[] getL() -
apply
- Parameters:
model-
-
apply
Apply aModelto thePointby a given amount. Transfers thelocal coordinatesto newworld coordinates.- Parameters:
model-amount- 0.0 -> no application, 1.0 -> full application
-
applyInverse
Apply the inverse of aInvertibleModelto thePoint. Transfers thelocal coordinatesto newworld coordinates.- Parameters:
model-- Throws:
NoninvertibleModelException
-
squareDistance
Estimate the square distance of twoPointsin the world.- Parameters:
p1-p2-- Returns:
- square distance
-
distance
Estimate the Euclidean distance of twoPointsin the world.- Parameters:
p1-p2-- Returns:
- Euclidean distance
-
clone
Clone thisPointinstance.
-