Class OrientedPoint2i
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.i.Tuple2i<Point2i>
-
- org.arakhne.afc.math.geometry.d2.i.Point2i
-
- org.arakhne.afc.math.geometry.d2.i.OrientedPoint2i
-
- All Implemented Interfaces:
Serializable,Cloneable,OrientedPoint2D<Point2i,Vector2i>,Point2D<Point2i,Vector2i>,Tuple2D<Point2i>,JsonableObject
public class OrientedPoint2i extends Point2i implements OrientedPoint2D<Point2i,Vector2i>
2D oriented point with int precision floating-point numbers.- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Thomas PIOTROWSKI
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Constructor Summary
Constructors Constructor Description OrientedPoint2i()Construct an empty oriented point.OrientedPoint2i(int x, int y)Construct an oriented point from the two given coordinates.OrientedPoint2i(int x, int y, int tanX, int tanY)Construct an oriented point from the two given coordinates.OrientedPoint2i(Point2D<?,?> point, Vector2D<?,?> vector)Construct an oriented point from a point and a tangent vector.OrientedPoint2i(Tuple2D<?> point)Construct an oriented point from a point.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector2igetNormal()Replies the normal vector at this point.Vector2igetTangent()Replies the tangent vector at this point.doublegetTangentX()Replies the X coordinate of the direction vector.doublegetTangentY()Replies the Y coordinate of the direction vector.inthashCode()Returns a hash code value based on the data values in this object.intitx()Replies the X coordinate of the direction vector.intity()Replies the Y coordinate of the direction vector.voidsetTangentX(double tanX)Sets a new value in the X direction of the point.voidsetTangentX(int tanX)Sets a new value in the X direction of the point.voidsetTangentY(double tanY)Sets a new value in the Y direction of the point.voidsetTangentY(int tanY)Sets a new value in the Y direction of the point.-
Methods inherited from class org.arakhne.afc.math.geometry.d2.i.Point2i
add, add, add, convert, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getGeomFactory, getIdistanceL1, getIdistanceLinf, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleAdd, sub, sub, toUnmodifiable
-
Methods inherited from class org.arakhne.afc.math.geometry.d2.i.Tuple2i
absolute, absolute, add, add, addX, addX, addY, addY, clone, equals, getX, getY, ix, iy, negate, negate, scale, scale, scale, scale, set, set, set, set, set, setX, setX, setY, setY, sub, sub, subX, subX, subY, subY, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.OrientedPoint2D
equals, getNormalX, getNormalY, getPoint, inx, iny, set, set, setTangent, setTangent, setTangent
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Point2D
$amp$amp, $minus, $minus, $minus, $plus, $plus, add, add, add, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getGeomFactory, getIdistanceL1, getIdistanceLinf, operator_add, operator_and, operator_elvis, operator_equals, operator_minus, operator_minus, operator_minus, operator_notEquals, operator_plus, operator_plus, operator_remove, operator_upTo, operator_upTo, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleAdd, sub, sub, toUnmodifiable, turn, turn, turn, turnLeft, turnLeft, turnLeft, turnRight, turnRight, turnRight
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Tuple2D
absolute, absolute, add, add, addX, addX, addY, addY, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, clone, epsilonEquals, equals, equals, get, get, get, getX, getY, interpolate, interpolate, ix, iy, negate, negate, scale, scale, scale, scale, set, set, set, set, set, setX, setX, setY, setY, sub, sub, subX, subX, subY, subY
-
-
-
-
Constructor Detail
-
OrientedPoint2i
public OrientedPoint2i()
Construct an empty oriented point.
-
OrientedPoint2i
public OrientedPoint2i(Tuple2D<?> point)
Construct an oriented point from a point.- Parameters:
point- the point.
-
OrientedPoint2i
public OrientedPoint2i(int x, int y)Construct an oriented point from the two given coordinates.- Parameters:
x- x coordinate of the point.y- y coordinate of the point.
-
OrientedPoint2i
public OrientedPoint2i(Point2D<?,?> point, Vector2D<?,?> vector)
Construct an oriented point from a point and a tangent vector.- Parameters:
point- the point.vector- the tangent vector.
-
OrientedPoint2i
public OrientedPoint2i(int x, int y, int tanX, int tanY)Construct an oriented point from the two given coordinates.- Parameters:
x- x coordinate of the point.y- y coordinate of the point.tanX- x coordinate of the vector.tanY- y coordinate of the vector.
-
-
Method Detail
-
hashCode
@Pure public int hashCode()
Description copied from interface:Tuple2DReturns a hash code value based on the data values in this object. Two differentTuple2Dobjects with identical data values (i.e.,Tuple2D.equals(Object)returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.
-
getTangentX
public double getTangentX()
Description copied from interface:OrientedPoint2DReplies the X coordinate of the direction vector. If this point is not part of a polyline, the direction vector is null.- Specified by:
getTangentXin interfaceOrientedPoint2D<Point2i,Vector2i>- Returns:
- the x coordinate of the direction vector.
-
itx
public int itx()
Description copied from interface:OrientedPoint2DReplies the X coordinate of the direction vector. If this point is not part of a polyline, the direction vector is null.- Specified by:
itxin interfaceOrientedPoint2D<Point2i,Vector2i>- Returns:
- the x coordinate of the direction vector.
-
setTangentX
public void setTangentX(int tanX)
Description copied from interface:OrientedPoint2DSets a new value in the X direction of the point.- Specified by:
setTangentXin interfaceOrientedPoint2D<Point2i,Vector2i>- Parameters:
tanX- the new value double x.
-
setTangentX
public void setTangentX(double tanX)
Description copied from interface:OrientedPoint2DSets a new value in the X direction of the point.- Specified by:
setTangentXin interfaceOrientedPoint2D<Point2i,Vector2i>- Parameters:
tanX- the new value double x.
-
getTangentY
public double getTangentY()
Description copied from interface:OrientedPoint2DReplies the Y coordinate of the direction vector. If this point is not part of a polyline, the direction vector is null.- Specified by:
getTangentYin interfaceOrientedPoint2D<Point2i,Vector2i>- Returns:
- the y coordinate of the direction vector.
-
ity
public int ity()
Description copied from interface:OrientedPoint2DReplies the Y coordinate of the direction vector. If this point is not part of a polyline, the direction vector is null.- Specified by:
ityin interfaceOrientedPoint2D<Point2i,Vector2i>- Returns:
- the y coordinate of the direction vector.
-
setTangentY
public void setTangentY(int tanY)
Description copied from interface:OrientedPoint2DSets a new value in the Y direction of the point.- Specified by:
setTangentYin interfaceOrientedPoint2D<Point2i,Vector2i>- Parameters:
tanY- the new value double y.
-
setTangentY
public void setTangentY(double tanY)
Description copied from interface:OrientedPoint2DSets a new value in the Y direction of the point.- Specified by:
setTangentYin interfaceOrientedPoint2D<Point2i,Vector2i>- Parameters:
tanY- the new value double y.
-
getTangent
public Vector2i getTangent()
Description copied from interface:OrientedPoint2DReplies the tangent vector at this point.- Specified by:
getTangentin interfaceOrientedPoint2D<Point2i,Vector2i>- Returns:
- the tangent vector.
-
getNormal
public Vector2i getNormal()
Description copied from interface:OrientedPoint2DReplies the normal vector at this point.- Specified by:
getNormalin interfaceOrientedPoint2D<Point2i,Vector2i>- Returns:
- the normal vector.
-
-