public class InvertedRay2D extends AbstractLine2D implements Cloneable
x(t) = x0+t*dx
y(t) = y0+t*dy
t comprised between -INFINITY and 0.
This is complementary class to Ray2D.
dx, dy, x0, y0
Constructor and Description |
---|
InvertedRay2D()
Empty constructor for Ray2D.
|
InvertedRay2D(double x,
double y,
double angle)
Creates a new Ray2D, originating from point
(x, y)<\code>, and going
in the direction specified by |
InvertedRay2D(double x1,
double y1,
double dx,
double dy)
Creates a new Ray2D, originating from point
(x1,y1)<\code>, and going
in the direction defined by vector |
InvertedRay2D(LinearShape2D line)
Define a new Ray, with same characteristics as given object.
|
InvertedRay2D(Point2D point,
double angle)
Creates a new Ray2D, originating from point
point<\code>, and going
in the direction specified by |
InvertedRay2D(Point2D point,
double dx,
double dy)
Creates a new Ray2D, originating from point
point<\code>, and going
in the direction defined by vector |
InvertedRay2D(Point2D point1,
Point2D point2)
Creates a new Ray2D, originating from
point1<\code>, and going in the
direction of |
InvertedRay2D(Point2D point,
Vector2D vector)
Creates a new Ray2D, originating from point
point<\code>, and going
in the direction specified by |
Modifier and Type | Method and Description |
---|---|
GeneralPath |
appendPath(GeneralPath path)
Throws an infiniteShapeException
|
InvertedRay2D |
clone()
Ensures public declaration of clone(), and ensures valid return type.
|
boolean |
contains(double x,
double y)
Checks if the shape contains the planar point defined by (x,y).
|
static InvertedRay2D |
create(Point2D target,
Vector2D direction)
Static factory for creating a new inverted ray with given direction
to target.
|
boolean |
equals(Object obj) |
Box2D |
getBoundingBox()
Returns the bounding box of the shape.
|
GeneralPath |
getGeneralPath()
Throws an infiniteShapeException
|
InvertedRay2D |
getParallel(double d)
Creates a new curve, formed by the points with parameterization:
p(t) = c(t) + d*n(t)/|n(t)| , with p(t) being a point of
the original curve, n(t) the normal of the curve, and |n| being the
norm of n.In the case of a continuous curve formed by several smooth circulinear elements, the parallels of contiguous elements are joined by a circle arc. |
Point2D |
getPoint(double t)
Gets the point from a parametric representation of the curve.
|
Ray2D |
getReverseCurve()
Returns the curve with same trace on the plane with parametrization in
reverse order.
|
double |
getT0()
Get value of parameter t for the first point of the curve.
|
double |
getT1()
Get value of parameter t for the last point of the curve.
|
boolean |
isBounded()
Always returns false, because n inverted ray is not bounded.
|
void |
setRay(double x0,
double y0,
double dx,
double dy)
Deprecated.
lines will become immutable in a future release
|
void |
setRay(Point2D p1,
Point2D p2)
Deprecated.
lines will become immutable in a future release
|
void |
setRay(Point2D point,
Vector2D vect)
Deprecated.
lines will become immutable in a future release
|
String |
toString() |
InvertedRay2D |
transform(AffineTransform2D trans)
Transforms the curve by an affine transform.
|
clip, contains, getBuffer, getCartesianEquation, getContinuousCurves, getCurvature, getDistance, getDistance, getHorizontalAngle, getIntersection, getIntersection, getIntersections, getLength, getLength, getOrigin, getParallel, getParametric, getPerpendicular, getPolarCoefficients, getPosition, getPosition, getPositionOnLine, getPositionOnLine, getProjectedPoint, getProjectedPoint, getSignedDistance, getSignedDistance, getSignedPolarCoefficients, getSmoothPieces, getSubCurve, getSupportingLine, getSymmetric, getSymmetric, getTangent, getVector, getWindingAngle, isClosed, isColinear, isColinear, isEmpty, isInside, isParallel, isParallel, project, supportContains, transform
getLeftTangent, getRightTangent, getSingularPoints, isSingular
draw, getAsAWTShape, getAsPolyline, getFirstPoint, getLastPoint, wrapCurve
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAsPolyline, getLeftTangent, getRightTangent
draw, getAsAWTShape, getFirstPoint, getLastPoint, getSingularPoints, isSingular
public InvertedRay2D()
public InvertedRay2D(Point2D point1, Point2D point2)
point1<\code>, and going in the
direction of point2<\code>.
public InvertedRay2D(double x1, double y1, double dx, double dy)
(x1,y1)<\code>, and going
in the direction defined by vector (dx, dy)<\code>.
public InvertedRay2D(Point2D point, double dx, double dy)
point<\code>, and going
in the direction defined by vector (dx,dy)<\code>.
public InvertedRay2D(Point2D point, Vector2D vector)
point<\code>, and going
in the direction specified by vector<\code>.
public InvertedRay2D(Point2D point, double angle)
point<\code>, and going
in the direction specified by angle<\code> (in radians).
public InvertedRay2D(double x, double y, double angle)
(x, y)<\code>, and going
in the direction specified by angle<\code> (in radians).
public InvertedRay2D(LinearShape2D line)
public static final InvertedRay2D create(Point2D target, Vector2D direction)
@Deprecated public void setRay(double x0, double y0, double dx, double dy)
@Deprecated public void setRay(Point2D p1, Point2D p2)
@Deprecated public void setRay(Point2D point, Vector2D vect)
public InvertedRay2D getParallel(double d)
CirculinearCurve2D
p(t) = c(t) + d*n(t)/|n(t)|
, with p(t) being a point of
the original curve, n(t) the normal of the curve, and |n| being the
norm of n.getParallel
in interface CirculinearContinuousCurve2D
getParallel
in interface CirculinearCurve2D
getParallel
in interface CirculinearElement2D
getParallel
in interface ContinuousCirculinearCurve2D
d
- the distance between the original curve and he parallel curve.public GeneralPath appendPath(GeneralPath path)
appendPath
in interface ContinuousCurve2D
path
- a path to modifypublic GeneralPath getGeneralPath()
public Point2D getPoint(double t)
Curve2D
public double getT0()
Curve2D
public double getT1()
Curve2D
public Ray2D getReverseCurve()
Curve2D
getReverseCurve
in interface CirculinearContinuousCurve2D
getReverseCurve
in interface CirculinearCurve2D
getReverseCurve
in interface CirculinearElement2D
getReverseCurve
in interface ContinuousCirculinearCurve2D
getReverseCurve
in interface ContinuousCurve2D
getReverseCurve
in interface Curve2D
getReverseCurve
in interface SmoothCurve2D
getReverseCurve
in interface ContinuousOrientedCurve2D
getReverseCurve
in interface OrientedCurve2D
getReverseCurve
in interface SmoothOrientedCurve2D
public boolean isBounded()
public boolean contains(double x, double y)
Shape2D
public Box2D getBoundingBox()
Shape2D
getBoundingBox
in interface Shape2D
public InvertedRay2D transform(AffineTransform2D trans)
Curve2D
transform
in interface ContinuousCurve2D
transform
in interface Curve2D
transform
in interface SmoothCurve2D
transform
in interface ContinuousOrientedCurve2D
transform
in interface OrientedCurve2D
transform
in interface SmoothOrientedCurve2D
transform
in interface LinearShape2D
transform
in interface Shape2D
transform
in class AbstractLine2D
trans
- an affine transformpublic InvertedRay2D clone()
AbstractLine2D
clone
in interface Curve2D
clone
in class AbstractLine2D
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.