public class Cubic extends AbstractSegment
Segment.SplitResults
Modifier and Type | Field and Description |
---|---|
java.awt.geom.Point2D.Double |
p1 |
java.awt.geom.Point2D.Double |
p2 |
java.awt.geom.Point2D.Double |
p3 |
java.awt.geom.Point2D.Double |
p4 |
Constructor and Description |
---|
Cubic() |
Cubic(double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double x4,
double y4) |
Cubic(java.awt.geom.Point2D.Double p1,
java.awt.geom.Point2D.Double p2,
java.awt.geom.Point2D.Double p3,
java.awt.geom.Point2D.Double p4) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
java.awt.geom.Point2D.Double |
eval(double t) |
java.awt.geom.Point2D.Double |
evalDt(double t) |
protected int |
findRoots(double y,
double[] roots) |
java.awt.geom.Rectangle2D |
getBounds2D() |
double |
getLength() |
double |
getLength(double maxErr) |
Segment |
getSegment(double t0,
double t1) |
double |
maxX() |
double |
maxY() |
double |
minX() |
double |
minY() |
Segment |
reverse() |
void |
subdivide(Cubic c0,
Cubic c1)
Subdivides this Cubic curve into two curves at t = 0.5.
|
void |
subdivide(double t,
Cubic c0,
Cubic c1)
Subdivides this Cubic curve into two curves at given t.
|
void |
subdivide(double t,
Segment s0,
Segment s1)
Subdivides this Cubic curve into two curves at given t.
|
void |
subdivide(Segment s0,
Segment s1)
Subdivides this Cubic curve into two curves at t = 0.5.
|
protected double |
subLength(double leftLegLen,
double rightLegLen,
double maxErr) |
java.lang.String |
toString() |
matchSign, solveCubic, solveLine, solveQuad, split, splitAfter, splitBefore
public java.awt.geom.Point2D.Double p1
public java.awt.geom.Point2D.Double p2
public java.awt.geom.Point2D.Double p3
public java.awt.geom.Point2D.Double p4
public Cubic()
public Cubic(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
public Cubic(java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2, java.awt.geom.Point2D.Double p3, java.awt.geom.Point2D.Double p4)
public java.lang.Object clone()
clone
in class java.lang.Object
public Segment reverse()
public double minX()
public double maxX()
public double minY()
public double maxY()
public java.awt.geom.Rectangle2D getBounds2D()
protected int findRoots(double y, double[] roots)
findRoots
in class AbstractSegment
public java.awt.geom.Point2D.Double evalDt(double t)
public java.awt.geom.Point2D.Double eval(double t)
public void subdivide(Segment s0, Segment s1)
s0
- if non-null contains portion of curve from 0->.5s1
- if non-null contains portion of curve from .5->1public void subdivide(double t, Segment s0, Segment s1)
s0
- if non-null contains portion of curve from 0->t.s1
- if non-null contains portion of curve from t->1.public void subdivide(Cubic c0, Cubic c1)
c0
- if non-null contains portion of curve from 0->.5c1
- if non-null contains portion of curve from .5->1public void subdivide(double t, Cubic c0, Cubic c1)
c0
- if non-null contains portion of curve from 0->t.c1
- if non-null contains portion of curve from t->1.public Segment getSegment(double t0, double t1)
protected double subLength(double leftLegLen, double rightLegLen, double maxErr)
public double getLength()
public double getLength(double maxErr)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2022 Apache Software Foundation. All Rights Reserved.