|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmath.geom2d.line.StraightObject2D
math.geom2d.line.LineArc2D
math.geom2d.line.StraightLine2D
public class StraightLine2D
Representation of straigth lines. Such lines can be constructed using two points, a point and a parallel line or straight object, or with coefficient of the cartesian equation.
| Field Summary |
|---|
| Fields inherited from class math.geom2d.line.LineArc2D |
|---|
t0, t1 |
| Fields inherited from class math.geom2d.line.StraightObject2D |
|---|
dx, dy, x0, y0 |
| Fields inherited from interface math.geom2d.curve.ContinuousCurve2D |
|---|
CIRCLE, CLOSED_EDGE, LOOP, OPEN_EDGE |
| Fields inherited from interface math.geom2d.Shape2D |
|---|
ACCURACY, defaultClipWindow, EMPTY_SET |
| Constructor Summary | |
|---|---|
StraightLine2D()
Empty constructor: a straight line corresponding to horizontal axis. |
|
StraightLine2D(double a,
double b,
double c)
Define a new straight line, from the coefficients of the cartesian equation. |
|
StraightLine2D(double xp,
double yp,
double dx,
double dy)
Define a new Straight line going through the point (xp, yp) and with the direction dx, dy. |
|
StraightLine2D(java.awt.geom.Point2D point,
double angle)
Define a new Straight line going through the given point, and with the specified direction given by angle. |
|
StraightLine2D(java.awt.geom.Point2D point,
double dx,
double dy)
Define a new Straight line going through the given point, and with the specified direction vector. |
|
StraightLine2D(java.awt.geom.Point2D point1,
java.awt.geom.Point2D point2)
Define a new Straight line going through the two given points. |
|
StraightLine2D(java.awt.geom.Point2D point,
Vector2D direction)
Define a new Straight line going through the given point, and with the specified direction vector. |
|
StraightLine2D(StraightObject2D obj)
Define a new Straight line at the same position and with the same direction than an other straight object (line, edge or ray). |
|
StraightLine2D(StraightObject2D line,
java.awt.geom.Point2D point)
Define a new Straight line, parallel to another straigth object (ray, straight line or edge), and going through the given point. |
|
| Method Summary | |
|---|---|
CurveSet2D<SmoothCurve2D> |
clipSmoothCurve(SmoothCurve2D curve)
clip a continuous smooth curve by the half-plane defined by this line. |
static StraightLine2D |
createCartesianLine2D(double a,
double b,
double c)
Return a new Straight line, with the given coefficient of the cartesian equation (a*x + b*y + c = 0). |
static StraightLine2D |
createMedian2D(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
* |
static StraightLine2D |
createOrthogonalLine2D(StraightObject2D line,
Point2D point)
Return a new Straight line, parallel to another straigth object (ray, straight line or edge), and going through the given point. |
static StraightLine2D |
createParallelLine2D(StraightObject2D line,
double d)
Return a new Straight line, parallel to another straight object (ray, straight line or edge), and going through the given point. |
static StraightLine2D |
createParallelLine2D(StraightObject2D line,
java.awt.geom.Point2D point)
Return a new Straight line, parallel to another straight object (ray, straight line or edge), and going through the given point. |
static StraightLine2D |
createStraightLine2D(java.awt.geom.Point2D point,
double dx,
double dy)
Return a new Straight line going through the given point, and with the specified direction vector. |
static StraightLine2D |
createStraightLine2D(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
|
java.util.Collection<ContinuousBoundary2D> |
getBoundaryCurves()
Return the different continuous curves composing the boundary |
static Point2D |
getIntersection(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.geom.Point2D p3,
java.awt.geom.Point2D p4)
Compute the intersection point of the two (infinite) lines going through p1 and p2 for the first one, and p3 and p4 for the second one. |
StraightLine2D |
getParallel(double d)
Return the parallel line located at a distance d. |
StraightLine2D |
getParallel(java.awt.geom.Point2D point)
Return a new Straight line, parallel to another straigth object (ray, straight line or edge), and going through the given point. |
StraightLine2D |
getPerpendicular(Point2D point)
Return a new Straight line, parallel to another straigth object (ray, straight line or edge), and going through the given point. |
StraightLine2D |
getReverseCurve()
Returns the straight line with same origin but with opposite direction vector. |
void |
setCartesianEquation(double a,
double b,
double c)
|
void |
setLine(double x0,
double y0,
double dx,
double dy)
|
void |
setLine(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
|
void |
setPoints(double x1,
double y1,
double x2,
double y2)
|
StraightLine2D |
transform(AffineTransform2D trans)
Returns the transformed line. |
| Methods inherited from class math.geom2d.line.LineArc2D |
|---|
appendPath, clip, contains, contains, equals, equals, getAsPolyline, getBoundingBox, getBounds, getBounds2D, getContinuousCurves, getCurvature, getDistance, getDistance, getFirstPoint, getInnerPath, getLastPoint, getLength, getPathIterator, getPathIterator, getPoint, getPoint, getPoint1, getPoint2, getPosition, getSmoothPieces, getSubCurve, getT0, getT1, getTangent, getWindingAngle, getX1, getX2, getY1, getY2, intersects, intersects, isBounded, isInside, project, toString |
| Methods inherited from class math.geom2d.line.StraightObject2D |
|---|
contains, contains, getCartesianEquation, getDistance, getHorizontalAngle, getIntersection, getIntersection, getIntersections, getOrigin, getParallel, getParametric, getPolarCoefficients, getPositionOnLine, getPositionOnLine, getProjectedPoint, getProjectedPoint, getSignedDistance, getSignedDistance, getSignedPolarCoefficients, getSupportLine, getSymmetric, getSymmetric, getVector, isClosed, isColinear, isColinear, isInside, isParallel, isParallel |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface math.geom2d.curve.ContinuousOrientedCurve2D |
|---|
clip, getSubCurve |
| Methods inherited from interface math.geom2d.curve.ContinuousCurve2D |
|---|
appendPath, getAsPolyline, getSmoothPieces, isClosed |
| Methods inherited from interface math.geom2d.curve.OrientedCurve2D |
|---|
getSignedDistance, getSignedDistance, getWindingAngle, isInside |
| Methods inherited from interface math.geom2d.curve.Curve2D |
|---|
getContinuousCurves, getFirstPoint, getIntersections, getLastPoint, getPoint, getPoint, getPosition, getT0, getT1, project |
| Methods inherited from interface math.geom2d.Shape2D |
|---|
getBoundingBox, getDistance, getDistance, isBounded |
| Methods inherited from interface java.awt.Shape |
|---|
contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, intersects, intersects |
| Constructor Detail |
|---|
public StraightLine2D()
public StraightLine2D(java.awt.geom.Point2D point1,
java.awt.geom.Point2D point2)
public StraightLine2D(java.awt.geom.Point2D point,
Vector2D direction)
public StraightLine2D(java.awt.geom.Point2D point,
double dx,
double dy)
public StraightLine2D(java.awt.geom.Point2D point,
double angle)
public StraightLine2D(StraightObject2D obj)
public StraightLine2D(double xp,
double yp,
double dx,
double dy)
public StraightLine2D(StraightObject2D line,
java.awt.geom.Point2D point)
public StraightLine2D(double a,
double b,
double c)
| Method Detail |
|---|
public static final StraightLine2D createStraightLine2D(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
public static final StraightLine2D createMedian2D(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
p1 - one pointp2 - another point
public static final StraightLine2D createStraightLine2D(java.awt.geom.Point2D point,
double dx,
double dy)
public static final StraightLine2D createParallelLine2D(StraightObject2D line,
java.awt.geom.Point2D point)
public static final StraightLine2D createParallelLine2D(StraightObject2D line,
double d)
public static final StraightLine2D createOrthogonalLine2D(StraightObject2D line,
Point2D point)
public static final StraightLine2D createCartesianLine2D(double a,
double b,
double c)
public static final Point2D getIntersection(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.geom.Point2D p3,
java.awt.geom.Point2D p4)
public StraightLine2D getParallel(java.awt.geom.Point2D point)
public StraightLine2D getParallel(double d)
public StraightLine2D getPerpendicular(Point2D point)
getPerpendicular in class StraightObject2Dpoint - the point to go through
public void setLine(double x0,
double y0,
double dx,
double dy)
public void setPoints(double x1,
double y1,
double x2,
double y2)
public void setLine(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
public void setCartesianEquation(double a,
double b,
double c)
public CurveSet2D<SmoothCurve2D> clipSmoothCurve(SmoothCurve2D curve)
public java.util.Collection<ContinuousBoundary2D> getBoundaryCurves()
Boundary2D
getBoundaryCurves in interface Boundary2Dpublic StraightLine2D getReverseCurve()
getReverseCurve in interface Boundary2DgetReverseCurve in interface ContinuousBoundary2DgetReverseCurve in interface ContinuousCurve2DgetReverseCurve in interface ContinuousOrientedCurve2DgetReverseCurve in interface Curve2DgetReverseCurve in interface OrientedCurve2DgetReverseCurve in interface SmoothCurve2DgetReverseCurve in interface SmoothOrientedCurve2DgetReverseCurve in class LineArc2Dpublic StraightLine2D transform(AffineTransform2D trans)
transform in interface Boundary2Dtransform in interface ContinuousBoundary2Dtransform in interface ContinuousCurve2Dtransform in interface ContinuousOrientedCurve2Dtransform in interface Curve2Dtransform in interface OrientedCurve2Dtransform in interface SmoothCurve2Dtransform in interface SmoothOrientedCurve2Dtransform in interface Shape2Dtransform in class LineArc2Dtrans - an affine transform
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||