cz.cuni.amis.pogamut.defcon.base3d.worldview.object
Class DefConLocation
java.lang.Object
cz.cuni.amis.pogamut.base3d.worldview.object.Location
cz.cuni.amis.pogamut.defcon.base3d.worldview.object.DefConLocation
- All Implemented Interfaces:
- ILocated, Serializable, Cloneable
public class DefConLocation
- extends Location
Checks and corrects coordinates for the ingame locations and provides useful
methods.
- Author:
- Radek 'Black_Hand' Pibil
- See Also:
- Serialized Form
Methods inherited from class cz.cuni.amis.pogamut.base3d.worldview.object.Location |
add, add, add, addX, addY, addZ, asPoint3d, asPoint3D, asVector3d, clone, cross, dot, dot2D, equal, equal, equals, equals, getAverage, getDistance, getDistance2D, getDistanceL1, getDistanceL1, getDistanceLinf, getDistanceLinf, getDistancePlane, getDistancePlane, getDistanceSquare, getDistanceZ, getLength, getLocation, getPoint3d, getQuatLikeRotationSeq, getRotation, getX, getY, getZ, hashCode, interpolate, interpolate, mul, rotateXY, rotateXZ, rotateYZ, scaleX, scaleY, scaleZ, setX, setY, setZ, sub, sub, sub, sub, toString |
DefConLocation
public DefConLocation()
DefConLocation
public DefConLocation(double x,
double y)
DefConLocation
public DefConLocation(float[] f)
DefConLocation
public DefConLocation(double[] d)
DefConLocation
public DefConLocation(Location location)
getDistance2D
public double getDistance2D(Location location)
- Overrides:
getDistance2D
in class Location
getDistance
public double getDistance(Location location)
- Overrides:
getDistance
in class Location
sub
public static Location sub(DefConLocation l1,
DefConLocation l2)
correctX
protected static double correctX(double x,
double y)
mathModulus
protected static final double mathModulus(double a,
double b)
scale
public DefConLocation scale(double d)
- Overrides:
scale
in class Location
add
public DefConLocation add(Location l)
- Retrieves sum of this location and given location.
- Overrides:
add
in class Location
- Parameters:
l
- Location to be added to this location.
- Returns:
- Sum of the two locations.
sub
public Location sub(DefConLocation l)
- Retrieves sum of this location and given location.
- Parameters:
l
- Location to be added to this location.
- Returns:
- Sum of the two locations.
getNormalized
public DefConLocation getNormalized()
- Overrides:
getNormalized
in class Location
invert
public DefConLocation invert()
- Calculates inverse Location
- Overrides:
invert
in class Location
- Returns:
- new inverted Location
getDistanceSquare
public double getDistanceSquare(Location l)
- Calculates the square of the distance between this and given location.
- Overrides:
getDistanceSquare
in class Location
- Parameters:
l
- Location to be calculated the distance to.
- Returns:
- Square of the euclidean distance between the two locations.
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.