Class Point

java.lang.Object
stitching.model.Point

public class Point extends Object
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 Details

    • Point

      public Point(float[] l)
      Constructor Sets l to the given float[] reference.
      Parameters:
      l - reference to the local coordinates of the Point
  • Method Details

    • getW

      public final float[] getW()
    • getL

      public final float[] getL()
    • apply

      public final void apply(Model model)
      Apply a Model to the Point. Transfers the local coordinates to new world coordinates.
      Parameters:
      model -
    • apply

      public final void apply(Model model, float amount)
      Apply a Model to the Point by a given amount. Transfers the local coordinates to new world coordinates.
      Parameters:
      model -
      amount - 0.0 -> no application, 1.0 -> full application
    • applyInverse

      public final void applyInverse(InvertibleModel model) throws NoninvertibleModelException
      Apply the inverse of a InvertibleModel to the Point. Transfers the local coordinates to new world coordinates.
      Parameters:
      model -
      Throws:
      NoninvertibleModelException
    • squareDistance

      public static final float squareDistance(Point p1, Point p2)
      Estimate the square distance of two Points in the world.
      Parameters:
      p1 -
      p2 -
      Returns:
      square distance
    • distance

      public static final float distance(Point p1, Point p2)
      Estimate the Euclidean distance of two Points in the world.
      Parameters:
      p1 -
      p2 -
      Returns:
      Euclidean distance
    • clone

      public Point clone()
      Clone this Point instance.
      Overrides:
      clone in class Object