Package georegression.struct.point
Class Point2D_I16
- All Implemented Interfaces:
Serializable
A point in 2D composed of shorts
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Generic copy routine.Creates a new tuple instance of the same type.double
distance
(int x, int y) double
int
distance2
(int x, int y) int
boolean
int
The dimensionality of space the tuple is contained in and the number of values it has.int
getIdx
(int index) Returns the value of the tuple along the specified coordinate system axis.final int
getX()
final int
getY()
int
hashCode()
boolean
isIdentical
(int x, int y) void
print()
void
setIdx
(int index, int value) setTo
(int x, int y) setTo
(Point2D_I16 src) Sets this equal to 'src'void
setX
(int x) void
setY
(int y) toString()
void
zero()
Sets all coefficients and parameters to zero, which is typically the initial state.Methods inherited from class georegression.struct.GeoTuple_I32
isIdentical
-
Field Details
-
x
public short x -
y
public short y
-
-
Constructor Details
-
Point2D_I16
public Point2D_I16(short x, short y) -
Point2D_I16
-
Point2D_I16
public Point2D_I16()
-
-
Method Details
-
setTo
-
zero
public void zero()Description copied from class:GeoTuple
Sets all coefficients and parameters to zero, which is typically the initial state.- Specified by:
zero
in classGeoTuple<Point2D_I16>
-
distance
-
distance
public double distance(int x, int y) -
distance2
-
distance2
public int distance2(int x, int y) -
setX
public void setX(int x) -
setY
public void setY(int y) -
getX
public final int getX() -
getY
public final int getY() -
isIdentical
public boolean isIdentical(int x, int y) -
setTo
Description copied from class:GeoTuple
Sets this equal to 'src'- Specified by:
setTo
in classGeoTuple<Point2D_I16>
- Parameters:
src
- The tuple being copied- Returns:
- Reference to 'this' class instance. Used to chain operations.
-
getIdx
public int getIdx(int index) Description copied from class:GeoTuple_I32
Returns the value of the tuple along the specified coordinate system axis.- Specified by:
getIdx
in classGeoTuple_I32<Point2D_I16>
- Parameters:
index
- Which axis in the coordinate system.- Returns:
- Its value.
-
setIdx
public void setIdx(int index, int value) - Specified by:
setIdx
in classGeoTuple_I32<Point2D_I16>
-
print
public void print() -
getDimension
public int getDimension()Description copied from class:GeoTuple
The dimensionality of space the tuple is contained in and the number of values it has.- Specified by:
getDimension
in classGeoTuple<Point2D_I16>
- Returns:
- Dimensionality of the object.
-
createNewInstance
Description copied from class:GeoTuple
Creates a new tuple instance of the same type.
- Specified by:
createNewInstance
in classGeoTuple<Point2D_I16>
- Returns:
- new tuple instance.
-
copy
Description copied from class:GeoTuple
Generic copy routine. It is recommended that this be overridden with a faster implementation.- Overrides:
copy
in classGeoTuple<Point2D_I16>
- Returns:
- An exact copy of this GeoTuple.
-
toString
-
equals
-
hashCode
public int hashCode()
-