public class PolarVector extends SpatialVector
Modifier and Type | Field and Description |
---|---|
double |
vecLength |
double |
XYDeg |
double |
XZDeg |
dX, dY, dZ
Constructor and Description |
---|
PolarVector()
constructor that creates a zero vector.
|
PolarVector(double XYDeg,
double XZDeg,
double vecLength)
constructor specifying initial degrees for longitude and latitude, and vector
length.
|
PolarVector(SpatialVector sV1,
SpatialVector sV2)
constructor specifying initial degrees for XY and XZå, vector length, and Date
XY for the western hemisphere and XZ for the southern
hemisphere are expressed as negative values
|
Modifier and Type | Method and Description |
---|---|
void |
copy(PolarVector v)
copy other vector into this one
|
double |
getLength()
retrieves the length of the vector
|
double |
getXYDeg()
retrieves the longitude component in degrees - the angle if 2D only in xy
|
double |
getXYRad()
retrieves the longitude component in radians - the angle if 2D only in xy
|
double |
getXZDeg()
retrieves the latitude component in degrees
|
double |
getXZRad()
retrieves the latitude component in radians
|
SpatialVector |
setLength(double newLength)
Scales the vector to a particular length
|
void |
setXYDeg(double newXYDeg)
sets the longitude component in degrees
|
void |
setXYRad(double newXYRad)
sets the longitude component in radians
|
void |
setXZDeg(double newXZDeg)
sets the latitude component in degrees
|
void |
setXZRad(double newXZRad)
sets the latitude component in radians
|
SpatialVector |
toSpatialVector()
returns the vector as polar coordinates
|
java.lang.String |
toString()
Returns a string representation of the vector.
|
void |
updateXYZ()
updates the vector's cartesian coordinates
|
applyVector, applyVector, checkLatLong, clone, copy, cross, dot, equals, getCircleLineIntersections, getCircleLineIntersections, getCircleLinesegmentIntersections, getCircleLinesegmentIntersections, getConnect, getDistanceToLinesegment, getDistanceToLinesegment, getEuclidianDistance, getLengthSquared, getManhattanDistance, getManhattanLength, getPolarVector, getScaledPoint, getSpatialVector, getSquaredEuclidianDistance, getStraightnessIndex, getVolume, getX, getXY, getXYDeg, getXYRad, getXZDeg, getXZRad, getY, getZ, isLatLong, list, listValues, minus, negate, negateX, negateY, negateZ, plus, remapLatLongToDistanceCoords, reverseDirection, rotate, rotate, rotateXY, rotateXZ, scale, setConnect, setLatLong, setX, setY, setZ, subtract, times, toFileString, toPoint, toPolarVector, unitLength
public PolarVector(double XYDeg, double XZDeg, double vecLength)
XYDeg
- longitude degreesXZDeg
- latitude degreesvecLength
- the length of the vectorpublic PolarVector()
public PolarVector(SpatialVector sV1, SpatialVector sV2)
sV1
- start vectorsV2
- end vectorpublic void copy(PolarVector v)
v
- a 3d vectorpublic final double getXYDeg()
getXYDeg
in class SpatialVector
public final double getXYRad()
getXYRad
in class SpatialVector
public final double getXZDeg()
getXZDeg
in class SpatialVector
public final double getXZRad()
getXZRad
in class SpatialVector
public final double getLength()
getLength
in class SpatialVector
public SpatialVector setLength(double newLength)
setLength
in class SpatialVector
newLength
- the desired length or the vectorpublic void setXYDeg(double newXYDeg)
newXYDeg
- new XY angle in radianspublic void setXYRad(double newXYRad)
newXYRad
- new XY angle in radianspublic void setXZDeg(double newXZDeg)
newXZDeg
- new XZ angle in degreespublic void setXZRad(double newXZRad)
newXZRad
- new XZ angle in radianspublic void updateXYZ()
public SpatialVector toSpatialVector()
toSpatialVector
in class SpatialVector
public java.lang.String toString()
toString
in class SpatialVector
RH, 2017