java.lang.Object |
↳ |
org.apache.commons.math.geometry.Vector3D |
|
↳ |
uk.ac.imperial.presage2.util.location.Location |
Known Direct Subclasses
|
Class Overview
This represents a location in the environment space as defined by a 3D
vector. We the apache commons Vector3D class for this vector.
Summary
[Expand]
Inherited Constants |
From class
org.apache.commons.math.geometry.Vector3D
Vector3D |
MINUS_I |
|
Vector3D |
MINUS_J |
|
Vector3D |
MINUS_K |
|
Vector3D |
NEGATIVE_INFINITY |
|
Vector3D |
NaN |
|
Vector3D |
PLUS_I |
|
Vector3D |
PLUS_J |
|
Vector3D |
PLUS_K |
|
Vector3D |
POSITIVE_INFINITY |
|
Vector3D |
ZERO |
|
|
Public Constructors |
|
Location(double x, double y)
Create a 2D location with the given x and y coordinates.
|
|
Location(double x, double y, double z)
Create a 3D location with the given x, y and z coordinates.
|
|
Location(Vector3D v)
Create a location from an existing Vector3D.
|
[Expand]
Inherited Methods |
From class
org.apache.commons.math.geometry.Vector3D
Vector3D
|
add(double arg0, Vector3D arg1)
|
Vector3D
|
add(Vector3D arg0)
|
static
double
|
angle(Vector3D arg0, Vector3D arg1)
|
static
Vector3D
|
crossProduct(Vector3D arg0, Vector3D arg1)
|
static
double
|
distance(Vector3D arg0, Vector3D arg1)
|
static
double
|
distance1(Vector3D arg0, Vector3D arg1)
|
static
double
|
distanceInf(Vector3D arg0, Vector3D arg1)
|
static
double
|
distanceSq(Vector3D arg0, Vector3D arg1)
|
static
double
|
dotProduct(Vector3D arg0, Vector3D arg1)
|
boolean
|
equals(Object arg0)
|
double
|
getAlpha()
|
double
|
getDelta()
|
double
|
getNorm()
|
double
|
getNorm1()
|
double
|
getNormInf()
|
double
|
getNormSq()
|
double
|
getX()
|
double
|
getY()
|
double
|
getZ()
|
int
|
hashCode()
|
boolean
|
isInfinite()
|
boolean
|
isNaN()
|
Vector3D
|
negate()
|
Vector3D
|
normalize()
|
Vector3D
|
orthogonal()
|
Vector3D
|
scalarMultiply(double arg0)
|
Vector3D
|
subtract(double arg0, Vector3D arg1)
|
Vector3D
|
subtract(Vector3D arg0)
|
String
|
toString()
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0)
|
final
void
|
wait(long arg0, int arg1)
|
|
From interface
uk.ac.imperial.presage2.util.location.HasLocation
|
Public Constructors
public
Location
(double x, double y)
Create a 2D location with the given x and y coordinates.
public
Location
(double x, double y, double z)
Create a 3D location with the given x, y and z coordinates.
public
Location
(Vector3D v)
Create a location from an existing Vector3D.
Public Methods
public
double
distanceTo
(Location l)
Get the distance between this Location and the location l
Get the Move
from this Location which will result in the location
l
.
Returns
Move
m such that this.add(m)
will return a
vector v.equals(l)
public
Move
getMoveTo
(Location l, double speed)
Get the Move
from this Location towards a location l
with a magnitude less than or equal to speed
.
public
Vector3D
getVector
()
public
Vector3D
getVectorTo
(Location l)
Get the direction vector between two point vectors.
public
boolean
in
(Area a)
public
void
setLocation
(Location l)
Not available in Immutable Location class.
Protected Methods