public class Point extends Object implements Serializable
Local coordinates
are thought to be immutable, application
of a model changes the world coordinates
of the point.Modifier and Type | Field and Description |
---|---|
protected double[] |
l
Local coordinates
|
protected double[] |
w
World coordinates
|
Constructor and Description |
---|
Point(double[] l)
Constructor
Sets
l to the given double[] reference. |
Point(double[] l,
double[] w)
Constructor
Sets
l to the given double[] reference. |
Modifier and Type | Method and Description |
---|---|
void |
apply(CoordinateTransform t)
Apply a
CoordinateTransform to the Point . |
void |
apply(CoordinateTransform t,
double amount)
Apply a
CoordinateTransform to the Point by a given amount. |
static <P extends Point> |
apply(CoordinateTransform t,
Iterable<P> points)
|
void |
applyInverse(InverseCoordinateTransform t)
Apply the inverse of an
InvertibleCoordinateTransform to the Point . |
static void |
applyInverse(InverseCoordinateTransform t,
Iterable<Point> points)
|
Point |
clone()
Clone this
Point instance. |
double |
distance()
Estimate the Euclidean distance of local and world coordinates.
|
static double |
distance(Point p1,
Point p2)
Estimate the Euclidean distance of two
Points in world
space. |
double[] |
getL() |
double[] |
getW() |
static double |
localDistance(Point p1,
Point p2)
Estimate the Euclidean distance of two
Points in local
space. |
double |
squareDistance()
Estimate the square distance of local and world coordinates.
|
static double |
squareDistance(Point p1,
Point p2)
Estimate the square Euclidean distance of two
Points in
world space. |
static double |
squareLocalDistance(Point p1,
Point p2)
Estimate the square Euclidean distance of two
Points in
local space. |
protected final double[] w
protected final double[] l
public Point(double[] l, double[] w)
l
to the given double[] reference.public double[] getW()
public double[] getL()
public final void apply(CoordinateTransform t)
t
- public final void apply(CoordinateTransform t, double amount)
CoordinateTransform
to the Point
by a given amount.
Transfers the local coordinates
to new
world coordinates
.t
- amount
- 0.0 -> no application, 1.0 -> full applicationpublic final void applyInverse(InverseCoordinateTransform t) throws NoninvertibleModelException
InvertibleCoordinateTransform
to the Point
.
Transfers the local coordinates
to new
world coordinates
.t
- NoninvertibleModelException
public double squareDistance()
public double distance()
public static final double squareDistance(Point p1, Point p2)
Points
in
world space.p1
- p2
- public static final double distance(Point p1, Point p2)
Points
in world
space.p1
- p2
- public static final double squareLocalDistance(Point p1, Point p2)
Points
in
local space.p1
- p2
- public static final double localDistance(Point p1, Point p2)
Points
in local
space.p1
- p2
- public static <P extends Point> void apply(CoordinateTransform t, Iterable<P> points)
CoordinateTransform
to an Iterable
collection of
Points
.
For each Point
, transfers the local coordinates
to
new world coordinates
.t
- public static void applyInverse(InverseCoordinateTransform t, Iterable<Point> points) throws NoninvertibleModelException
InverseCoordinateTransform
to an Iterable
collection of
Points
.
For each Point
, transfers the local coordinates
to
new world coordinates
.t
- NoninvertibleModelException
Copyright © 2015–2021 Fiji. All rights reserved.