public class IntersectionPoint2d extends Point2d
Constructor and Description |
---|
IntersectionPoint2d(double x,
double y)
Create a new
IntersectionPoint2d with x and y
coordinates set to the given values and the realIntersection
value set to true . |
IntersectionPoint2d(double x,
double y,
boolean realIntersection)
Create a new
IntersectionPoint2d . |
IntersectionPoint2d(Point2d p)
Create a new
IntersectionPoint2d with x and y
coordinates set to the given values of the Point2d
and the realIntersection value set to true . |
Modifier and Type | Method and Description |
---|---|
static IntersectionPoint2d |
convert(Point2d p,
boolean realIntersection,
double weight)
Convert a normal
Point2d to a IntersectionPoint2d . |
static IntersectionPoint2d |
convert(Point2d p,
double weight)
Convert a normal
Point2d to a IntersectionPoint2d . |
static IntersectionPoint2d[] |
convertA(Point2d[] pa,
double weight)
Convert an arrays of normal
Point2d 's to an array of
IntersectionPoint2d 's. |
double |
getWeight()
Get the weight of this intersection point, normally one.
|
boolean |
isRealIntersection()
Tests if this intersection point is derived from a real
circle intersection.
|
void |
setRealIntersection(boolean realIntersection)
Set if this intersection point is derived from a real
circle intersection.
|
void |
setWeight(double weight)
Sets the weight of this intersection point.
|
centerOfMass, centerOfMass, compareTo, distance, equals, geometricMedian, geometricMedian, getX, getY, hashCode, set, toString
public IntersectionPoint2d(Point2d p)
IntersectionPoint2d
with x and y
coordinates set to the given values of the Point2d
and the realIntersection value set to true
.p
- The value of the x and y coordinate.public IntersectionPoint2d(double x, double y)
IntersectionPoint2d
with x and y
coordinates set to the given values and the realIntersection
value set to true
.x
- The value of the x coordinate.y
- The value of the y coordinate.public IntersectionPoint2d(double x, double y, boolean realIntersection)
IntersectionPoint2d
.x
- The value of the x coordinate.y
- The value of the y coordinate.realIntersection
- Whether this is a real intersection or an
approximated one.public boolean isRealIntersection()
true
if this point is derived from a real
circle intersection; false
otherwise.public void setRealIntersection(boolean realIntersection)
realIntersection
- true
if this point is derived from
a real circle intersection; false
otherwise.public double getWeight()
public void setWeight(double weight)
weight
- The new weight of the intersection point.public static IntersectionPoint2d convert(Point2d p, double weight)
Point2d
to a IntersectionPoint2d
.p
- The point to be converted.weight
- The weight to be assigned to the point.IntersectionPoint2d
.public static IntersectionPoint2d convert(Point2d p, boolean realIntersection, double weight)
Point2d
to a IntersectionPoint2d
.p
- The point to be converted.realIntersection
- true
if this point is derived from
a real circle intersection; false
otherwise.weight
- The weight to be assigned to the point.IntersectionPoint2d
.public static IntersectionPoint2d[] convertA(Point2d[] pa, double weight)
Point2d
's to an array of
IntersectionPoint2d
's.pa
- The point array to be converted.weight
- The weight to be assigned to the points.IntersectionPoint2d
's.Copyright © 2012 Thomas Hillebrandt. All Rights Reserved.