public class MoveVector extends Capture implements java.lang.Cloneable, java.util.Comparator<SpatialVector>
Modifier and Type | Field and Description |
---|---|
SpatialVector |
itsPreviousMoveVector |
dX, dY, dZ
Constructor and Description |
---|
MoveVector()
Empty constructor for the MoveVector class with start at 0 and end capture provided
|
MoveVector(Capture endCapture)
Standard constructor for the MoveVector class with start and end captures provided, no previous move is available
|
MoveVector(Capture startCapture,
Capture endCapture)
Standard constructor for the MoveVector class with start and end captures provided, no previous move is available
|
MoveVector(Capture startCapture,
Capture endCapture,
SpatialVector prevMove)
Standard constructor for the MoveVector class with start and end captures, and
pevious movement angle provided
|
MoveVector(SpatialVector startPoint,
SpatialVector endPoint)
Standard constructor for the MoveVector class with start and end captures provided
|
Modifier and Type | Method and Description |
---|---|
int |
compare(SpatialVector sVec1,
SpatialVector sVec2) |
boolean |
equals(MoveVector m)
Tests whether or not two vectors are identical in respect
to x,y,z coordinates.
|
long |
getDuration()
Returns the time the move took
|
Capture |
getEndCapture()
Returns the end capture of the move
|
long |
getEndTime()
Returns the end capture of the move
|
double |
getEndX()
Returns the end capture of the move
|
double |
getEndY()
Returns the end capture of the move
|
PolarVector |
getHeading()
Returns the end capture of the move
|
Capture |
getInterpolatedCaptureAtDistance(double distance)
interpolates and returns the capture within this move at a given distance from the start
|
Capture |
getInterpolatedCaptureAtTime(long time)
Returns the interpolated capture of the move
|
java.util.Date |
getInterpolatedTimeAtCapture(SpatialVector aVec)
Returns the interpolated capture of the move
|
SpatialVector[] |
getIntersectionsWithCircle(SpatialVector circleCtr,
double radius)
Returns the point of intersection of this move with a circle of a given radius
|
java.awt.geom.Area |
getMoveArea()
Returns the area of the move at a given width
|
SGPolygon |
getMovePoly()
Returns the area of the move at a given width
|
java.awt.geom.Path2D.Double |
getPathOutline()
Returns the area of the move at a given width
|
MoveVector |
getRelMoveVector()
Returns the difference vector of the move relative to the
previous heading direction
|
MoveVector |
getRelMoveVector(SpatialVector aVector)
Returns the difference vector of the move relative to the
previous heading direction
|
double |
getSpeed()
Returns the speed for the move
|
Capture |
getStartCapture()
Returns the start capture of the move
|
long |
getStartTime()
Returns the start capture of the move
|
double |
getStartX()
Returns the start capture of the move
|
double |
getStartY()
Returns the start capture of the move
|
void |
listIntersectionsWithCircle(SpatialVector circleCtr,
double rad)
Returns the point of intersection of this move with a circle of a given radius
|
SpatialVector |
reverseDirection()
reverse the direction of the MoveVector
|
SpatialVector |
scale(double dScalar)
Multiplies this vector by a scalar and keeps the result.
|
void |
setEndCapture(Capture aCap)
Sets the end capture of the move
|
void |
setStartCapture(Capture aCap)
Sets the start capture of the move
|
void |
setWidth(double w)
Returns the end capture of the move
|
void |
sortAlongMoveVector(java.util.Vector<SpatialVector> aVec)
Returns the point of intersection of this move with a circle of a given radius
|
void |
sortReverseAlongMoveVector(java.util.Vector<SpatialVector> aVec)
Returns the point of intersection of this move with a circle of a given radius
|
java.lang.String |
toString()
Returns the move as a string
|
void |
updateEndCapture()
updates the endCapture to match the size of the vector
|
applyMove, equals, getMilliSecsBetween, getSecsBetween, getSpeed, getTimeMilliSecs, getTimeRef, getTimeSecs, getTimeString, getTimeString, setTimeMilliSecs, setTimeRef, setTimeSecs
applyVector, applyVector, checkLatLong, clone, copy, cross, dot, equals, getCircleLineIntersections, getCircleLineIntersections, getCircleLinesegmentIntersections, getCircleLinesegmentIntersections, getConnect, getDistanceToLinesegment, getDistanceToLinesegment, getEuclidianDistance, getLength, getLengthSquared, getManhattanDistance, getManhattanLength, getPolarVector, getScaledPoint, getSpatialVector, getSquaredEuclidianDistance, getStraightnessIndex, getVolume, getX, getXY, getXYDeg, getXYDeg, getXYRad, getXYRad, getXZDeg, getXZDeg, getXZRad, getXZRad, getY, getZ, isLatLong, list, listValues, minus, negate, negateX, negateY, negateZ, plus, remapLatLongToDistanceCoords, rotate, rotate, rotateXY, rotateXZ, setConnect, setLatLong, setLength, setX, setY, setZ, subtract, times, toFileString, toPoint, toPolarVector, toSpatialVector, unitLength
public SpatialVector itsPreviousMoveVector
public MoveVector(Capture startCapture, Capture endCapture, SpatialVector prevMove)
startCapture
- the move starts at this locationendCapture
- the move ends at this locationprevMove
- the direction of the previous movepublic MoveVector(Capture endCapture)
endCapture
- the move ends at this locationpublic MoveVector(Capture startCapture, Capture endCapture)
startCapture
- the move starts at this locationendCapture
- the move ends at this locationpublic MoveVector(SpatialVector startPoint, SpatialVector endPoint)
startPoint
- the move starts at this locationendPoint
- the move ends at this locationpublic MoveVector()
public void setStartCapture(Capture aCap)
public void setEndCapture(Capture aCap)
public Capture getStartCapture()
public Capture getEndCapture()
public double getStartX()
public double getEndX()
public double getStartY()
public double getEndY()
public PolarVector getHeading()
public void setWidth(double w)
public SpatialVector scale(double dScalar)
scale
in class SpatialVector
dScalar
- a scalar to multiplypublic SpatialVector reverseDirection()
reverseDirection
in class SpatialVector
public void updateEndCapture()
public MoveVector getRelMoveVector()
public MoveVector getRelMoveVector(SpatialVector aVector)
public long getStartTime()
public long getEndTime()
public long getDuration()
public double getSpeed()
public java.awt.geom.Path2D.Double getPathOutline() throws java.lang.Exception
java.lang.Exception
public java.awt.geom.Area getMoveArea() throws java.lang.Exception
java.lang.Exception
public SGPolygon getMovePoly() throws java.lang.Exception
java.lang.Exception
public boolean equals(MoveVector m)
m
- another SpatialVectorpublic void sortAlongMoveVector(java.util.Vector<SpatialVector> aVec) throws java.lang.Exception
aVec
- a vector of locationsjava.lang.Exception
public void sortReverseAlongMoveVector(java.util.Vector<SpatialVector> aVec) throws java.lang.Exception
aVec
- a vector of locationsjava.lang.Exception
public SpatialVector[] getIntersectionsWithCircle(SpatialVector circleCtr, double radius) throws java.lang.Exception
circleCtr
- the center point of the circleradius
- the radius of the circlejava.lang.Exception
public void listIntersectionsWithCircle(SpatialVector circleCtr, double rad) throws java.lang.Exception
circleCtr
- the center point of the circlerad
- the radius of the circlejava.lang.Exception
public Capture getInterpolatedCaptureAtDistance(double distance) throws java.lang.Exception
java.lang.Exception
public Capture getInterpolatedCaptureAtTime(long time) throws java.lang.Exception
time
- the time to usejava.lang.Exception
public java.util.Date getInterpolatedTimeAtCapture(SpatialVector aVec) throws java.lang.Exception
aVec
- the vectorjava.lang.Exception
public java.lang.String toString()
public int compare(SpatialVector sVec1, SpatialVector sVec2)
compare
in interface java.util.Comparator<SpatialVector>
RH, 2017