public class Geometry
extends java.lang.Object
Constructor | Description |
---|---|
Geometry() |
Modifier and Type | Method | Description |
---|---|---|
static Point |
center(BoundingBox bbox) |
Calculates the center of the given bounding box and returns a point representing that center.
|
static double |
dotProduct(Point a,
Point b) |
Computes the dot product of the given two points
|
static double |
euclideanDistance(Point a,
Point b) |
Calculates the Eucledian distance between two points a and b.
|
static java.awt.geom.GeneralPath |
normalize(java.awt.geom.GeneralPath path) |
|
static java.awt.geom.GeneralPath |
toGeneralPath(Curve curve) |
|
static Point |
weightedSum(double weightA,
Point a,
double weightB,
Point b) |
Adds the given points a and b, weighted by the respective weight, i.e
|
public static java.awt.geom.GeneralPath toGeneralPath(Curve curve)
curve
- public static java.awt.geom.GeneralPath normalize(java.awt.geom.GeneralPath path)
path
- public static Point center(BoundingBox bbox)
bbox
- public static double euclideanDistance(Point a, Point b)
a
- b
- public static Point weightedSum(double weightA, Point a, double weightB, Point b)
weightA
- scalar weight of vector aa
- weightB
- scalar weight of vector bb
-