|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcz.cuni.amis.pogamut.base3d.worldview.object.Location
public class Location

Location within the world. Location is represented as a point within the world's coordinates.
| Nested Class Summary | |
|---|---|
static class |
Location.PropertyEditor
PropertyEditor for class Location. |
| Field Summary | |
|---|---|
double |
x
X coordinate. |
double |
y
Y coordinate. |
double |
z
Z coordinate. |
| Constructor Summary | |
|---|---|
Location()
Creates location with all values set to zeroes. |
|
Location(double[] d)
Creates location from array of three doubles. |
|
Location(double x,
double y)
Creates location with specified planar coordinates. |
|
Location(double x,
double y,
double z)
Creates location with specified coordinates. |
|
Location(float[] f)
Creates location from array of three doubles. |
|
Location(Location source)
Copy constructor |
|
Location(Tuple3d p)
Creates location from specified 3D point. |
|
| Method Summary | |
|---|---|
Location |
add(Location l)
Retreives sum of this location and given location. |
static Location |
add(Location l1,
Location l2)
Retreives sum of two given locations. |
static Location |
add(Location l,
Velocity v)
Adds given velocity to given location. |
Location |
add(Velocity v)
Adds given velocity to this location. |
Point3d |
asPoint3d()
|
math.geom3d.Point3D |
asPoint3D()
|
Vector3d |
asVector3d()
|
Location |
clone()
|
Location |
cross(Location b)
Calculates cross product of this Location and Lcoations b |
double |
dot(Location b)
Calculates dot product of this Location and Location b |
double |
dot2D(Location b)
Calculates dot product of this Location and Location b in 2D (x,y coord only) |
static boolean |
equal(Location l1,
Location l2)
Tells, whether two given locations equal. |
static boolean |
equal(Location l1,
Location l2,
double epsilon)
Tells, whether the distance between coordinates of two given locations is less than or equal to the given epsilon. |
boolean |
equals(Location v)
Tells, whether this location equals to given location. |
boolean |
equals(Location l,
double epsilon)
Tells, whether the distance between coordinates of this location and given location is less than or equal to the given epsilon. |
static Location |
getAverage(java.util.Collection<Location> locations)
Calculates average of all 'locations'. |
double |
getDistance(Location l)
Calculates the distance between this and given location. |
static double |
getDistance(Location l1,
Location l2)
Calculates the distance between two given locations. |
double |
getDistance2D(Location l)
Calculates the distance between this and given location (ignoring 'z' coordinate). |
static double |
getDistance2D(Location l1,
Location l2)
Calculates the distance between two given locations (ignoring 'z' coordinate). |
double |
getDistanceL1(Location l)
Calculates the Manhattan distance between this and given location. |
static double |
getDistanceL1(Location l1,
Location l2)
Calculates the Manhattan distance between two given locations. |
double |
getDistanceLinf(Location l)
Calculates the Chebyshev distance between this and given location. |
static double |
getDistanceLinf(Location l1,
Location l2)
Calculates the Chebyshev distance between two given locations. |
double |
getDistancePlane(Location l)
Calculates the distance between this and given location after being projected to the (x,y) plane. |
static double |
getDistancePlane(Location l1,
Location l2)
Calculates the distance between two given locations after being projected to the (x,y) plane. |
double |
getDistanceSquare(Location l)
Calculates the square of the distance between this and given location. |
static double |
getDistanceSquare(Location l1,
Location l2)
Calculates the square of the distance between two given locations. |
double |
getDistanceZ(Location location)
Returns difference between z-coords (this.z - location.z). |
double |
getLength()
Calculates length of Location |
Location |
getLocation()
Retreives the location itself to implement ILocated. |
Location |
getNormalized()
Normalizes this Location |
Point3d |
getPoint3d()
Retreives javax.vecmath.Point3d representation of the location. |
Rotation |
getQuatLikeRotationSeq(Rotation.Order order)
WIP not completed yet. |
Rotation |
getRotation(Rotation.Order order)
Converts Location into Rotation. |
double |
getX()
X coordinate. |
double |
getY()
Y coordinate. |
double |
getZ()
Z coordinate. |
Location |
interpolate(Location l,
double d)
Lineary interpolates between this location and given location. |
static Location |
interpolate(Location l1,
Location l2,
double d)
Linearly interpolates between two given locations. |
Location |
invert()
Calculates inverse Location |
Location |
mul(Matrix3d matrix)
Projects this Location (vector) using matrix from parameter |
Location |
scale(double d)
Scales values of all three coordinates by given multiplier. |
Location |
setTo(double x,
double y,
double z)
Set content of this location from passed data. |
Location |
setTo(Location l)
Set content of this location from passed tocation. |
Location |
sub(Location l)
Retreives subtraction of given location from this location. |
static Location |
sub(Location l1,
Location l2)
Retreives subtraction of two given locations. |
static Location |
sub(Location l,
Velocity v)
Subtracts given velocity from given location. |
Location |
sub(Velocity v)
Subtracts given velocity from this location. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double x
public double y
public double z
| Constructor Detail |
|---|
public Location()
public Location(double x,
double y,
double z)
x - X coordinate.y - Y coordinate.z - Z coordinate.
public Location(double x,
double y)
x - X coordinate.y - Y coordinate.public Location(Location source)
source - Location to copypublic Location(double[] d)
d - Array of doubles to be used for creation.public Location(float[] f)
f - Array of to be used for creation.public Location(Tuple3d p)
p - Point in space to be used for creation.| Method Detail |
|---|
public Location clone()
clone in class java.lang.Objectpublic Vector3d asVector3d()
public Point3d asPoint3d()
public math.geom3d.Point3D asPoint3D()
public double getX()
public double getY()
public double getZ()
public Location add(Location l)
l - Location to be added to this location.
public static Location add(Location l1,
Location l2)
l1 - First location to be summed.l2 - Second location to be summed.
public Location sub(Location l)
l - Location to be subtracted.
public static Location sub(Location l1,
Location l2)
l1 - Location to be subtracted from.l2 - Location to be subtracted.
public Location add(Velocity v)
v - Velocity to be added to this location.
public static Location add(Location l,
Velocity v)
l - Location to be summed.v - Velocity to be summed.
public Location sub(Velocity v)
v - Velocity to be subtracted.
public static Location sub(Location l,
Velocity v)
l - Location to be subtracted from.v - Velocity to be subtracted.
public Location scale(double d)
d - Scaling multiplier.
public Location interpolate(Location l,
double d)
l - Location to be interpolated to.d - Interpolation parameter.
public static Location interpolate(Location l1,
Location l2,
double d)
l1 - Location to be interpolated from.l2 - Location to be interpolated to.d - Interpolation parameter.
public boolean equals(Location v)
v - Location to be compared with.
public static boolean equal(Location l1,
Location l2)
l1 - First location to comapre.l2 - Second location to comapre.
public boolean equals(Location l,
double epsilon)
l - Location to comapre with.epsilon - Epsilon to compare with.
public static boolean equal(Location l1,
Location l2,
double epsilon)
l1 - First location to comapre.l2 - Second location to comapre.epsilon - Epsilon to compare with.
public static Location getAverage(java.util.Collection<Location> locations)
locations -
public double getDistance(Location l)
l - Location to be calculated the distance to.
public double getDistance2D(Location l)
l - Location to be calculated the distance to.
public static double getDistance(Location l1,
Location l2)
l1 - Location to be calculated the distance from.l2 - Location to be calculated the distance to.
public double getDistanceZ(Location location)
location -
public static double getDistance2D(Location l1,
Location l2)
l1 - Location to be calculated the distance from.l2 - Location to be calculated the distance to.
public double getDistanceSquare(Location l)
l - Location to be calculated the distance to.
public static double getDistanceSquare(Location l1,
Location l2)
l1 - Location to be calculated the distance from.l2 - Location to be calculated the distance to.
public double getDistanceL1(Location l)
l - Location to be calculated the distance to.
public static double getDistanceL1(Location l1,
Location l2)
l1 - Location to be calculated the distance from.l2 - Location to be calculated the distance to.
public double getDistanceLinf(Location l)
l - Location to be calculated the distance to.
public static double getDistanceLinf(Location l1,
Location l2)
l1 - Location to be calculated the distance from.l2 - Location to be calculated the distance to.
public double getDistancePlane(Location l)
l - Location to be calculated the distance to.
public static double getDistancePlane(Location l1,
Location l2)
l1 - Location to be calculated the distance from.l2 - Location to be calculated the distance to.
public Location getLocation()
ILocated.
getLocation in interface ILocatedpublic Point3d getPoint3d()
public double dot(Location b)
b - Location to dot with
public double dot2D(Location b)
b - Location to dot with
public Location cross(Location b)
b - Location to cross with
public Rotation getRotation(Rotation.Order order)
order - tells resulting rotation, which rotation order should it
represent
public Rotation getQuatLikeRotationSeq(Rotation.Order order)
order -
public Location getNormalized()
public double getLength()
public Location mul(Matrix3d matrix)
matrix - projection matrix
public Location invert()
public Location setTo(Location l)
public Location setTo(double x,
double y,
double z)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||