public class CircularObject extends StationaryObject
potentialVector
Constructor and Description |
---|
CircularObject(Circle circle,
double standoff)
Constructor
|
CircularObject(double[] position,
double radius,
double standoff)
Constructor
|
CircularObject(double x,
double y,
double radius,
double standoff)
Constructor
|
CircularObject(Point position,
double radius,
double standoff)
Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
getDistance(double[] point) |
double |
getDistance(double[] end1,
double[] end2) |
double |
getDistance(double x,
double y) |
double |
getDistance(double x1,
double y1,
double x2,
double y2) |
double |
getDistance(LineSegment segment) |
double |
getDistance(Point point) |
double |
getDistance(Point end1,
Point end2) |
double |
getRadius() |
void |
getVisiblePoints(double[] startPt,
ArrayList<double[]> result)
Develops a list of corner points or tangent points that are potentially
visible from an input point--does include "standoff" in calculation
(does not test whether other objects are in the way)
|
void |
setPosit(double[] newPosit)
Resets the object's position in the world
|
void |
setPosit(double newX,
double newY)
Resets the object's position in the world
|
void |
setPosit(Point newPosit)
Resets the object's position in the world
|
void |
setRadius(double newRadius)
Sets the radius of the obstacle
|
String |
toMATLABString()
Generates a string representation of the Path object that can be used to plot the path in MATLAB
|
String |
toString()
Generates a string representation of the wall object
|
getDistanceOfConcern, getPosit, getPotentialForce, getPotentialForce, getPotentialForce, getPotentialForceDirection, getPotentialForceDirection, getPotentialForceDirection, getPotentialVector, getPotentialVector, getPotentialVector, getStandoff, getXPosit, getYPosit, setStandoff
public CircularObject(double x, double y, double radius, double standoff)
x
- north/south Cartesian coordinate of the object's location in the worldy
- east/west Cartesian coordinate of the object's location in the worldradius
- defines the size of the obstacle as a radius (meters) around a central point (uses the absolute value to avoid negative)standoff
- required distance (meters) that the vehicle must remain clear from this objectpublic CircularObject(double[] position, double radius, double standoff)
position
- 2-element array with the Cartesian coordinates of the object's location in the worldradius
- defines the size of the obstacle as a radius (meters) around a central point (uses the absolute value to avoid negative)standoff
- required distance (meters) that the vehicle must remain clear from this objectpublic CircularObject(Point position, double radius, double standoff)
position
- the Cartesian coordinates of the object's location in the worldradius
- defines the size of the obstacle as a radius (meters) around a central point (uses the absolute value to avoid negative)standoff
- required distance (meters) that the vehicle must remain clear from this objectpublic CircularObject(Circle circle, double standoff)
circle
- defines the size of the obstacle as a radius (meters) around a central point (uses the absolute value to avoid negative)standoff
- required distance (meters) that the vehicle must remain clear from this objectpublic void getVisiblePoints(double[] startPt, ArrayList<double[]> result)
getVisiblePoints
in class StationaryObject
startPt
- Cartesian coordinates of the point being testedresult
- container into which the computed points (double[2]) that
can be reached from the test point without crossing the
objects will be addedpublic String toMATLABString()
toMATLABString
in class StationaryObject
public void setPosit(double newX, double newY)
setPosit
in class WorldObject
newX
- newY
- public void setPosit(double[] newPosit)
setPosit
in class WorldObject
newPosit
- 2-element array containing the new Cartesian positionpublic void setPosit(Point newPosit)
setPosit
in class WorldObject
newPosit
- 2-element array containing the new Cartesian positionpublic double getDistance(double[] point)
getDistance
in class WorldObject
point
- a 2x1 double[] containing the Cartesian coordinates of the point being testedpublic double getDistance(Point point)
getDistance
in class WorldObject
point
- a 2x1 double[] containing the Cartesian coordinates of the point being testedpublic double getDistance(double x, double y)
getDistance
in class WorldObject
x
- the north/south Cartesian coordinate of the point being testedy
- the east/west Cartesian coordinate of the point being testedpublic double getDistance(LineSegment segment)
getDistance
in class WorldObject
segment
- an object containing the line segmentpublic double getDistance(Point end1, Point end2)
getDistance
in class WorldObject
end1
- an object containing the Cartesian coordinates of the first end pointend2
- an object containing the Cartesian coordinates of the second end pointpublic double getDistance(double[] end1, double[] end2)
getDistance
in class WorldObject
end1
- a 2x1 double[] containing the Cartesian coordinates of the first segment end pointend2
- a 2x1 double[] containing the Cartesian coordinates of the second segment end pointpublic double getDistance(double x1, double y1, double x2, double y2)
getDistance
in class WorldObject
x1
- the north/south Cartesian coordinate of the first segment end pointy1
- the east/west Cartesian coordinate of the first segment end pointx2
- the north/south Cartesian coordinate of the second segment end pointy2
- the east/west Cartesian coordinate of the second segment end pointpublic String toString()
toString
in class StationaryObject
public double getRadius()
public void setRadius(double newRadius)
newRadius
- the new radius (meters) of the obstacle (uses the absolute value to avoid negative)