public class HCoordinate extends Object
HCoordinate
s are used as a clean way
of computing intersections between line segments.Constructor and Description |
---|
HCoordinate() |
HCoordinate(Coordinate p) |
HCoordinate(Coordinate p1,
Coordinate p2)
Constructs a homogeneous coordinate which is the intersection of the lines
define by the homogenous coordinates represented by two
Coordinate s. |
HCoordinate(Coordinate p1,
Coordinate p2,
Coordinate q1,
Coordinate q2) |
HCoordinate(double _x,
double _y) |
HCoordinate(double _x,
double _y,
double _w) |
HCoordinate(HCoordinate p1,
HCoordinate p2) |
Modifier and Type | Method and Description |
---|---|
Coordinate |
getCoordinate() |
double |
getX() |
double |
getY() |
static Coordinate |
intersection(Coordinate p1,
Coordinate p2,
Coordinate q1,
Coordinate q2)
|
public HCoordinate()
public HCoordinate(double _x, double _y, double _w)
public HCoordinate(double _x, double _y)
public HCoordinate(Coordinate p)
public HCoordinate(HCoordinate p1, HCoordinate p2)
public HCoordinate(Coordinate p1, Coordinate p2)
Coordinate
s.p1
- p2
- public HCoordinate(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
public static Coordinate intersection(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2) throws NotRepresentableException
Note that this algorithm is not numerically stable; i.e. it can produce intersection points which lie outside the envelope of the line segments themselves. In order to increase the precision of the calculation input points should be normalized before passing them to this routine.
NotRepresentableException
public double getX() throws NotRepresentableException
NotRepresentableException
public double getY() throws NotRepresentableException
NotRepresentableException
public Coordinate getCoordinate() throws NotRepresentableException
NotRepresentableException
Copyright © 2024. All rights reserved.