|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object math.geom2d.curve.AbstractContinuousCurve2D math.geom2d.curve.AbstractSmoothCurve2D math.geom2d.line.AbstractLine2D math.geom2d.line.InvertedRay2D
public class InvertedRay2D
Inverted ray is defined from an origin and a direction vector. It is composed of all points satisfying the parametric equation:
x(t) = x0+t*dx
y(t) = y0+t*dy
t comprised between -INFINITY and 0.
This is complementary class to Ray2D.
- See Also:
- Serialized Form
Field Summary
Fields inherited from class math.geom2d.line.AbstractLine2D
dx, dy, x0, y0
Fields inherited from interface math.geom2d.Shape2D
ACCURACY
Constructor Summary
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 angle<\code> (in radians).
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 (dx, dy)<\code>.
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 angle<\code> (in radians).
InvertedRay2D(Point2D point,
double dx,
double dy)
Creates a new Ray2D, originating from point point<\code>, and going
in the direction defined by vector (dx,dy)<\code>.
InvertedRay2D(Point2D point1,
Point2D point2)
Creates a new Ray2D, originating from
point1<\code>, and going in the
direction of point2<\code>.
InvertedRay2D(Point2D point,
Vector2D vector)
Creates a new Ray2D, originating from point point<\code>, and going
in the direction specified by vector<\code>.
Method Summary
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.
Methods inherited from class math.geom2d.curve.AbstractSmoothCurve2D
getLeftTangent, getRightTangent, getSingularPoints, isSingular
Methods inherited from class math.geom2d.curve.AbstractContinuousCurve2D
draw, getAsAWTShape, getAsPolyline, getFirstPoint, getLastPoint, wrapCurve
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D
getAsPolyline, getLeftTangent, getRightTangent
Methods inherited from interface math.geom2d.curve.Curve2D
draw, getAsAWTShape, getFirstPoint, getLastPoint, getSingularPoints, isSingular
Constructor Detail
InvertedRay2D
public InvertedRay2D()
- Empty constructor for Ray2D. Default is ray starting at origin, and
having a slope of 1*dx and 0*dy.
InvertedRay2D
public InvertedRay2D(Point2D point1,
Point2D point2)
- Creates a new Ray2D, originating from
point1<\code>, and going in the
direction of point2<\code>.
InvertedRay2D
public 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 (dx, dy)<\code>.
InvertedRay2D
public InvertedRay2D(Point2D point,
double dx,
double dy)
- Creates a new Ray2D, originating from point
point<\code>, and going
in the direction defined by vector (dx,dy)<\code>.
InvertedRay2D
public InvertedRay2D(Point2D point,
Vector2D vector)
- Creates a new Ray2D, originating from point
point<\code>, and going
in the direction specified by vector<\code>.
InvertedRay2D
public InvertedRay2D(Point2D point,
double angle)
- Creates a new Ray2D, originating from point
point<\code>, and going
in the direction specified by angle<\code> (in radians).
InvertedRay2D
public InvertedRay2D(double x,
double y,
double angle)
- Creates a new Ray2D, originating from point
(x, y)<\code>, and going
in the direction specified by angle<\code> (in radians).
InvertedRay2D
public InvertedRay2D(LinearShape2D line)
- Define a new Ray, with same characteristics as given object.
Method Detail
create
public static final InvertedRay2D create(Point2D target,
Vector2D direction)
- Static factory for creating a new inverted ray with given direction
to target.
- Since:
- 0.8.1
setRay
@Deprecated
public void setRay(double x0,
double y0,
double dx,
double dy)
- Deprecated. lines will become immutable in a future release
setRay
@Deprecated
public void setRay(Point2D p1,
Point2D p2)
- Deprecated. lines will become immutable in a future release
setRay
@Deprecated
public void setRay(Point2D point,
Vector2D vect)
- Deprecated. lines will become immutable in a future release
getParallel
public InvertedRay2D getParallel(double d)
- Description copied from interface:
CirculinearCurve2D
- 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.
- Specified by:
getParallel
in interface CirculinearContinuousCurve2D
- Specified by:
getParallel
in interface CirculinearCurve2D
- Specified by:
getParallel
in interface CirculinearElement2D
- Specified by:
getParallel
in interface ContinuousCirculinearCurve2D
- Parameters:
d
- the distance between the original curve and he parallel curve.
- Returns:
- the parallel curve
appendPath
public GeneralPath appendPath(GeneralPath path)
- Throws an infiniteShapeException
- Specified by:
appendPath
in interface ContinuousCurve2D
- Parameters:
path
- a path to modify
- Returns:
- the modified path
getGeneralPath
public GeneralPath getGeneralPath()
- Throws an infiniteShapeException
getPoint
public Point2D getPoint(double t)
- Description copied from interface:
Curve2D
- Gets the point from a parametric representation of the curve. If the
parameter lies outside the definition range, the parameter corresponding
to the closest bound is used instead. This method can be used to draw an
approximated outline of a curve, by selecting multiple values for t and
drawing lines between them.
- Specified by:
getPoint
in interface Curve2D
getT0
public double getT0()
- Description copied from interface:
Curve2D
- Get value of parameter t for the first point of the curve. It can be
-Infinity, in this case the piece of curve is not bounded.
- Specified by:
getT0
in interface Curve2D
getT1
public double getT1()
- Description copied from interface:
Curve2D
- Get value of parameter t for the last point of the curve. It can be
+Infinity, in this case the piece of curve is not bounded.
- Specified by:
getT1
in interface Curve2D
getReverseCurve
public Ray2D getReverseCurve()
- Description copied from interface:
Curve2D
- Returns the curve with same trace on the plane with parametrization in
reverse order.
- Specified by:
getReverseCurve
in interface CirculinearContinuousCurve2D
- Specified by:
getReverseCurve
in interface CirculinearCurve2D
- Specified by:
getReverseCurve
in interface CirculinearElement2D
- Specified by:
getReverseCurve
in interface ContinuousCirculinearCurve2D
- Specified by:
getReverseCurve
in interface ContinuousCurve2D
- Specified by:
getReverseCurve
in interface Curve2D
- Specified by:
getReverseCurve
in interface SmoothCurve2D
- Specified by:
getReverseCurve
in interface ContinuousOrientedCurve2D
- Specified by:
getReverseCurve
in interface OrientedCurve2D
- Specified by:
getReverseCurve
in interface SmoothOrientedCurve2D
isBounded
public boolean isBounded()
- Always returns false, because n inverted ray is not bounded.
- Specified by:
isBounded
in interface Shape2D
contains
public boolean contains(double x,
double y)
- Description copied from interface:
Shape2D
- Checks if the shape contains the planar point defined by (x,y).
- Specified by:
contains
in interface Shape2D
getBoundingBox
public Box2D getBoundingBox()
- Description copied from interface:
Shape2D
- Returns the bounding box of the shape.
- Specified by:
getBoundingBox
in interface Shape2D
- Returns:
- the bounding box of the shape.
transform
public InvertedRay2D transform(AffineTransform2D trans)
- Description copied from interface:
Curve2D
- Transforms the curve by an affine transform. The result is an instance of
Curve2D.
- Specified by:
transform
in interface ContinuousCurve2D
- Specified by:
transform
in interface Curve2D
- Specified by:
transform
in interface SmoothCurve2D
- Specified by:
transform
in interface ContinuousOrientedCurve2D
- Specified by:
transform
in interface OrientedCurve2D
- Specified by:
transform
in interface SmoothOrientedCurve2D
- Specified by:
transform
in interface LinearShape2D
- Specified by:
transform
in interface Shape2D
- Specified by:
transform
in class AbstractLine2D
- Parameters:
trans
- an affine transform
- Returns:
- the transformed shape
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
clone
public InvertedRay2D clone()
- Description copied from class:
AbstractLine2D
- Ensures public declaration of clone(), and ensures valid return type.
- Specified by:
clone
in interface Curve2D
- Specified by:
clone
in class AbstractLine2D
- Returns:
- the cloned curve
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.