JavaGrinders.spatial
Class MoveVector

java.lang.Object
  extended by JavaGrinders.spatial.SpatialVector
      extended by JavaGrinders.spatial.Capture
          extended by JavaGrinders.spatial.MoveVector
All Implemented Interfaces:
java.lang.Cloneable

public class MoveVector
extends Capture

characterizes a single move from a start capture at one time to an end capture at another time. A variety of descriptives can be obtained for the move.


Field Summary
 SpatialVector itsPreviousMoveVector
           
 
Constructor Summary
MoveVector()
          Empty constructor for the MoveVector class with start at 0 and end capture provided
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
 
Method Summary
 double getAngle()
          Returns the angle of the move
 Capture getEndCapture()
          Returns the end capture of the move
 long getEndTime()
          Returns the end capture of the move
 Capture getInterpolatedCaptureAtTime(long time)
          Returns the interpolated capture of the move
 MoveVector getRelMoveVector()
          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
 long getTimeBetweenCaptures()
          Returns the time the move took
 double setX(double dNewX)
          sets x component
 double setY(double dNewY)
          sets y component
 double setZ(double dNewZ)
          sets z component
 java.lang.String toString()
          Returns the move as a string
 
Methods inherited from class JavaGrinders.spatial.Capture
applyMove, getSpeed, getTimeBetweenCaptures, getTimeMilliSecs, getTimeRef, getTimeSecs, getTimeString, listValues, setTimeRef, toFileString, toSpatialVector
 
Methods inherited from class JavaGrinders.spatial.SpatialVector
applyVector, applyVector, clone, copy, cross, dot, equals, getConnect, getEuclidianDistance, getLat, getLatDeg, getLength, getLengthSquared, getLong, getLongDeg, getManhattanDistance, getManhattanLength, getPolarVector, getScaledPoint, getSpatialVector, getSquaredEuclidianDistance, getX, getXY, getY, getZ, minus, negate, negateX, negateY, negateZ, plus, remapLatLongToDistanceCoords, rotate, rotate, rotateXY, rotateXZ, scale, setConnect, setLength, subtract, times, toPoint, toPolarVector, unitLength
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

itsPreviousMoveVector

public SpatialVector itsPreviousMoveVector
Constructor Detail

MoveVector

public MoveVector(Capture startCapture,
                  Capture endCapture,
                  SpatialVector prevMove)
Standard constructor for the MoveVector class with start and end captures, and pevious movement angle provided

Parameters:
startCapture - the move starts at this location
endCapture - the move ends at this location
prevMove - the direction of the previous move

MoveVector

public MoveVector(Capture startCapture,
                  Capture endCapture)
Standard constructor for the MoveVector class with start and end captures provided, no previous move is available

Parameters:
startCapture - the move starts at this location
endCapture - the move ends at this location

MoveVector

public MoveVector(SpatialVector startPoint,
                  SpatialVector endPoint)
Standard constructor for the MoveVector class with start and end captures provided

Parameters:
startPoint - the move starts at this location
endPoint - the move ends at this location

MoveVector

public MoveVector()
Empty constructor for the MoveVector class with start at 0 and end capture provided

Method Detail

getStartCapture

public Capture getStartCapture()
Returns the start capture of the move


getEndCapture

public Capture getEndCapture()
Returns the end capture of the move


getInterpolatedCaptureAtTime

public Capture getInterpolatedCaptureAtTime(long time)
                                     throws java.lang.Exception
Returns the interpolated capture of the move

Parameters:
time - the time to use
Throws:
java.lang.Exception

setX

public double setX(double dNewX)
sets x component

Overrides:
setX in class SpatialVector
Parameters:
dNewX - move the end capture of the move for the given x

setY

public double setY(double dNewY)
sets y component

Overrides:
setY in class SpatialVector
Parameters:
dNewY - move the end capture of the move for the given y

setZ

public double setZ(double dNewZ)
sets z component

Overrides:
setZ in class SpatialVector
Parameters:
dNewZ - move the end capture of the move for the given z

getRelMoveVector

public MoveVector getRelMoveVector()
Returns the difference vector of the move relative to the previous heading direction


getStartTime

public long getStartTime()
Returns the start capture of the move


getEndTime

public long getEndTime()
Returns the end capture of the move


getTimeBetweenCaptures

public long getTimeBetweenCaptures()
Returns the time the move took


getSpeed

public double getSpeed()
Returns the speed for the move


getAngle

public double getAngle()
Returns the angle of the move


toString

public java.lang.String toString()
Returns the move as a string

Overrides:
toString in class Capture
Returns:
a string representation of the vector