|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.onebusaway.geospatial.model.PointVector
public class PointVector
Constructor Summary | |
---|---|
PointVector(double... vector)
|
Method Summary | ||
---|---|---|
|
addToPoint(T origin)
|
|
static
|
create(T origin,
T direction)
|
|
double |
dotProduct(PointVector v)
|
|
boolean |
equals(Object obj)
Object Interface |
|
double |
getAngle()
|
|
double |
getAngle(PointVector v)
|
|
PointVector |
getAsLength(double length)
Scale our vector such that it has the specified length |
|
double |
getCosAngle(PointVector v)
|
|
PointVector |
getCrossProduct(PointVector v)
|
|
int |
getDimensions()
|
|
double |
getOrdinate(int dimension)
|
|
double[] |
getOrdinates()
|
|
PointVector |
getProjection(PointVector v)
Project a vector v onto this vector |
|
PointVector |
getScaled(double factor)
Operations |
|
double |
getSinAngle(PointVector v)
|
|
PointVector |
getUnitVector()
|
|
double |
getX()
|
|
double |
getY()
|
|
double |
getZ()
|
|
int |
hashCode()
|
|
double |
length()
Properties |
|
PointVector |
rotate(double angle)
|
|
PointVector |
rotate(double angle,
int dimensionA,
int dimensionB)
|
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PointVector(double... vector)
Method Detail |
---|
public static <T extends Point> PointVector create(T origin, T direction)
public int getDimensions()
public double getOrdinate(int dimension)
public double[] getOrdinates()
public double getX()
public double getY()
public double getZ()
public double length()
public double dotProduct(PointVector v)
public PointVector getCrossProduct(PointVector v)
public double getCosAngle(PointVector v)
public double getSinAngle(PointVector v)
public double getAngle(PointVector v)
v
- the other vector
public double getAngle()
public PointVector getScaled(double factor)
public PointVector getUnitVector()
public PointVector getProjection(PointVector v)
v
- the vector to project
public PointVector getAsLength(double length)
length
- - the target length
public PointVector rotate(double angle)
public PointVector rotate(double angle, int dimensionA, int dimensionB)
public <T extends Point> T addToPoint(T origin)
T
- the position typeorigin
- point to translate
public boolean equals(Object obj)
Object
Interface
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |