JavaGrinders.spatial
Class Capture

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

public class Capture
extends SpatialVector
implements java.lang.Cloneable

characterizes a single Capture with a capture location (as x, y, z coordinates) and a time stamp for the time of capture


Constructor Summary
Capture()
          empty constructor for the Capture class
Capture(double x, double y, double z)
          constructor for the Capture class with coordinates provided
Capture(double x, double y, double z, java.util.Date aTimeRef)
          standard constructor for the 3D Capture class with coordinates and time provided
Capture(SpatialVector aLocation)
          constructor for the Capture class with coordinates provided as a SpatialVector
Capture(SpatialVector aLocation, java.util.Date aTimeRef)
          constructor for the Capture class with coordinates and time provided
 
Method Summary
 Capture applyMove(MoveVector aMove)
          Returns the coordinates of this Capture after a Move has been applied to it
 double getSpeed(Capture otherCapture)
          returns the speed of travel between this and another capture as distance/second
 double getTimeBetweenCaptures(Capture otherCapture)
          returns the difference in timestamps for this and another capture
 long getTimeMilliSecs()
          returns the timestamp for this capture
 java.util.Date getTimeRef()
          returns the timestamp for this capture
 long getTimeSecs()
          returns the timestamp for this capture
 java.lang.String getTimeString()
          returns the timestamp for this capture as a string
 java.lang.String listValues()
          returns the SpatialVector as a String
 void setTimeRef(java.util.Date aTimeRef)
          sets the timestamp for this capture
 java.lang.String toFileString()
          returns the SpatialVector as a String for writing the Coordinates to a file/screen
 SpatialVector toSpatialVector()
          returns the SpatialVector part of this Capture
 java.lang.String toString()
          returns the SpatialVector as a String
 
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, setX, setY, setZ, subtract, times, toPoint, toPolarVector, unitLength
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Capture

public Capture(double x,
               double y,
               double z,
               java.util.Date aTimeRef)
standard constructor for the 3D Capture class with coordinates and time provided

Parameters:
x - the x coordinate for this capture
y - the y coordinate for this capture
z - the z coordinate for this capture
aTimeRef - the time stamp for this capture

Capture

public Capture()
empty constructor for the Capture class


Capture

public Capture(double x,
               double y,
               double z)
constructor for the Capture class with coordinates provided

Parameters:
x - the x coordinate for this capture
y - the y coordinate for this capture
z - the z coordinate for this capture

Capture

public Capture(SpatialVector aLocation)
constructor for the Capture class with coordinates provided as a SpatialVector

Parameters:
aLocation - the spatial vector for this capture

Capture

public Capture(SpatialVector aLocation,
               java.util.Date aTimeRef)
constructor for the Capture class with coordinates and time provided

Parameters:
aLocation - the spatial vector for this capture
aTimeRef - the timestamp for this capture
Method Detail

toSpatialVector

public SpatialVector toSpatialVector()
returns the SpatialVector part of this Capture

Overrides:
toSpatialVector in class SpatialVector

getTimeRef

public java.util.Date getTimeRef()
returns the timestamp for this capture


getTimeMilliSecs

public long getTimeMilliSecs()
returns the timestamp for this capture


getTimeSecs

public long getTimeSecs()
returns the timestamp for this capture


getTimeString

public java.lang.String getTimeString()
returns the timestamp for this capture as a string


setTimeRef

public void setTimeRef(java.util.Date aTimeRef)
sets the timestamp for this capture

Parameters:
aTimeRef - the time stamp for the capture

getTimeBetweenCaptures

public double getTimeBetweenCaptures(Capture otherCapture)
returns the difference in timestamps for this and another capture

Parameters:
otherCapture - the other capture

getSpeed

public double getSpeed(Capture otherCapture)
returns the speed of travel between this and another capture as distance/second

Parameters:
otherCapture - the other capture

applyMove

public Capture applyMove(MoveVector aMove)
Returns the coordinates of this Capture after a Move has been applied to it

Parameters:
aMove - the move to apply to the current capture

toString

public java.lang.String toString()
returns the SpatialVector as a String

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

toFileString

public java.lang.String toFileString()
returns the SpatialVector as a String for writing the Coordinates to a file/screen


listValues

public java.lang.String listValues()
returns the SpatialVector as a String