Class OrientedPoint3d
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.d.Tuple3d<Point3d>
-
- org.arakhne.afc.math.geometry.d3.d.Point3d
-
- org.arakhne.afc.math.geometry.d3.d.OrientedPoint3d
-
- All Implemented Interfaces:
Serializable,Cloneable,OrientedPoint3D<Point3d,Vector3d>,Point3D<Point3d,Vector3d>,Tuple3D<Point3d>,JsonableObject
public class OrientedPoint3d extends Point3d implements OrientedPoint3D<Point3d,Vector3d>
2D oriented point with double 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 OrientedPoint3d()Construct an empty oriented point.OrientedPoint3d(double x, double y, double z)Construct an oriented point from the two given coordinates.OrientedPoint3d(double x, double y, double z, double tanX, double tanY, double tanZ)Construct an oriented point from the given coordinates.OrientedPoint3d(double x, double y, double z, double tanX, double tanY, double tanZ, double norX, double norY, double norZ)Construct an oriented point from the given coordinates.OrientedPoint3d(Point3D<?,?> point, Vector3D<?,?> vector)Construct an oriented point from a point and a tangent vector.OrientedPoint3d(Tuple3D<?> tuple)Constructor by copy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector3dgetNormal()Replies the normal vector.doublegetNormalX()Replies the X coordinate of the normal vector.doublegetNormalY()Replies the Y coordinate of the normal vector.doublegetNormalZ()Replies the Z coordinate of the normal vector.Vector3dgetSway()Replies the sway vector.Vector3dgetTangent()Replies the tangent vector .doublegetTangentX()Replies the X coordinate of the tangent vector.doublegetTangentY()Replies the Y coordinate of the tangent vector.doublegetTangentZ()Replies the Z coordinate of the tangent vector.inthashCode()Returns a hash code value based on the data values in this object.intinx()Replies the X coordinate of the normal vector.intiny()Replies the Y coordinate of the normal vector.intinz()Replies the Z coordinate of the normal vector.intitx()Replies the X coordinate of the tangent vector.intity()Replies the Y coordinate of the tangent vector.intitz()Replies the Z coordinate of the tangent vector.voidsetNormalX(double norX)Sets a new value in the X normal of the point.voidsetNormalX(int norX)Sets a new value in the X normal of the point.voidsetNormalY(double norY)Sets a new value in the Y normal of the point.voidsetNormalY(int norY)Sets a new value in the Y normal of the point.voidsetNormalZ(double norZ)Sets a new value in the Z normal of the point.voidsetNormalZ(int norZ)Sets a new value in the Z normal of the point.voidsetTangentX(double tanX)Sets a new value in the X tangent of the point.voidsetTangentX(int tanX)Sets a new value in the X tangent of the point.voidsetTangentY(double tanY)Sets a new value in the Y tangent of the point.voidsetTangentY(int tanY)Sets a new value in the Y tangent of the point.voidsetTangentZ(double tanZ)Sets a new value in the Z tangent of the point.voidsetTangentZ(int tanZ)Sets a new value in the Z tangent of the point.-
Methods inherited from class org.arakhne.afc.math.geometry.d3.d.Point3d
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.d3.d.Tuple3d
absolute, absolute, add, add, addX, addX, addY, addY, addZ, addZ, clone, equals, getX, getY, getZ, ix, iy, iz, negate, negate, scale, scale, scale, scale, set, set, set, set, set, setX, setX, setY, setY, setZ, setZ, sub, sub, subX, subX, subY, subY, subZ, subZ, 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.d3.OrientedPoint3D
equals, getPoint, getSwayX, getSwayY, getSwayZ, isx, isy, isz, set, set, set, setNormal, setTangent
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Point3D
add, add, add, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getGeomFactory, getIdistanceL1, getIdistanceLinf, operator_add, operator_and, operator_elvis, operator_equals, operator_minus, operator_minus, operator_notEquals, operator_plus, operator_remove, operator_upTo, operator_upTo, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleAdd, sub, sub, toUnmodifiable
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Tuple3D
absolute, absolute, add, add, addX, addX, addY, addY, addZ, addZ, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, clone, epsilonEquals, equals, equals, get, get, get, getX, getY, getZ, interpolate, interpolate, ix, iy, iz, negate, negate, scale, scale, scale, scale, set, set, set, set, set, setX, setX, setY, setY, setZ, setZ, sub, sub, subX, subX, subY, subY, subZ, subZ
-
-
-
-
Constructor Detail
-
OrientedPoint3d
public OrientedPoint3d()
Construct an empty oriented point.
-
OrientedPoint3d
public OrientedPoint3d(Tuple3D<?> tuple)
Constructor by copy.- Parameters:
tuple- the tuple to copy.
-
OrientedPoint3d
public OrientedPoint3d(double x, double y, double z)Construct an oriented point from the two given coordinates.- Parameters:
x- x coordinate of the point.y- y coordinate of the point.z- z coordinate of the point.
-
OrientedPoint3d
public OrientedPoint3d(Point3D<?,?> point, Vector3D<?,?> vector)
Construct an oriented point from a point and a tangent vector.- Parameters:
point- the point.vector- the tangent vector.
-
OrientedPoint3d
public OrientedPoint3d(double x, double y, double z, double tanX, double tanY, double tanZ)Construct an oriented point from the given coordinates.- Parameters:
x- x coordinate of the point.y- y coordinate of the point.z- z coordinate of the point.tanX- x coordinate of the vector.tanY- y coordinate of the vector.tanZ- z coordinate of the vector.
-
OrientedPoint3d
public OrientedPoint3d(double x, double y, double z, double tanX, double tanY, double tanZ, double norX, double norY, double norZ) throws ExceptionConstruct an oriented point from the given coordinates.- Parameters:
x- x coordinate of the point.y- y coordinate of the point.z- z coordinate of the point.tanX- x coordinate of the vector.tanY- y coordinate of the vector.tanZ- z coordinate of the vector.norX- x coordinate of the normal vector.norY- y coordinate of the normal vector.norZ- z coordinate of the normal vector.- Throws:
Exception- this exception is thrown when the given vectors are not orthogonal.
-
-
Method Detail
-
hashCode
@Pure public int hashCode()
Description copied from interface:Tuple3DReturns a hash code value based on the data values in this object. Two different Tuple2f objects with identical data values (i.e., Tuple2f.equals 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.
-
setTangentX
public void setTangentX(int tanX)
Description copied from interface:OrientedPoint3DSets a new value in the X tangent of the point.- Specified by:
setTangentXin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
tanX- the new value double x.
-
setTangentX
public void setTangentX(double tanX)
Description copied from interface:OrientedPoint3DSets a new value in the X tangent of the point.- Specified by:
setTangentXin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
tanX- the new value double x.
-
setTangentY
public void setTangentY(int tanY)
Description copied from interface:OrientedPoint3DSets a new value in the Y tangent of the point.- Specified by:
setTangentYin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
tanY- the new value double y.
-
setTangentY
public void setTangentY(double tanY)
Description copied from interface:OrientedPoint3DSets a new value in the Y tangent of the point.- Specified by:
setTangentYin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
tanY- the new value double y.
-
setTangentZ
public void setTangentZ(int tanZ)
Description copied from interface:OrientedPoint3DSets a new value in the Z tangent of the point.- Specified by:
setTangentZin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
tanZ- the new value double z.
-
setTangentZ
public void setTangentZ(double tanZ)
Description copied from interface:OrientedPoint3DSets a new value in the Z tangent of the point.- Specified by:
setTangentZin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
tanZ- the new value double z.
-
getTangentX
public double getTangentX()
Description copied from interface:OrientedPoint3DReplies the X coordinate of the tangent vector. If this point is not part of a polyline, the tangent vector is null.- Specified by:
getTangentXin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the x coordinate of the tangent vector.
-
itx
public int itx()
Description copied from interface:OrientedPoint3DReplies the X coordinate of the tangent vector. If this point is not part of a polyline, the tangent vector is null.- Specified by:
itxin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the x coordinate of the tangent vector.
-
getTangentY
public double getTangentY()
Description copied from interface:OrientedPoint3DReplies the Y coordinate of the tangent vector. If this point is not part of a polyline, the tangent vector is null.- Specified by:
getTangentYin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the y coordinate of the tangent vector.
-
ity
public int ity()
Description copied from interface:OrientedPoint3DReplies the Y coordinate of the tangent vector. If this point is not part of a polyline, the tangent vector is null.- Specified by:
ityin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the y coordinate of the tangent vector.
-
getTangentZ
public double getTangentZ()
Description copied from interface:OrientedPoint3DReplies the Z coordinate of the tangent vector. If this point is not part of a polyline, the tangent vector is null.- Specified by:
getTangentZin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the z coordinate of the tangent vector.
-
itz
public int itz()
Description copied from interface:OrientedPoint3DReplies the Z coordinate of the tangent vector. If this point is not part of a polyline, the tangent vector is null.- Specified by:
itzin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the z coordinate of the tangent vector.
-
getNormalX
public double getNormalX()
Description copied from interface:OrientedPoint3DReplies the X coordinate of the normal vector. If this point is not part of a polyline, the normal vector is null.- Specified by:
getNormalXin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the x coordinate of the normal vector.
-
inx
public int inx()
Description copied from interface:OrientedPoint3DReplies the X coordinate of the normal vector. If this point is not part of a polyline, the normal vector is null.- Specified by:
inxin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the x coordinate of the normal vector.
-
setNormalX
public void setNormalX(int norX)
Description copied from interface:OrientedPoint3DSets a new value in the X normal of the point.- Specified by:
setNormalXin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
norX- the new value double x.
-
setNormalX
public void setNormalX(double norX)
Description copied from interface:OrientedPoint3DSets a new value in the X normal of the point.- Specified by:
setNormalXin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
norX- the new value double x.
-
getNormalY
public double getNormalY()
Description copied from interface:OrientedPoint3DReplies the Y coordinate of the normal vector. If this point is not part of a polyline, the normal vector is null.- Specified by:
getNormalYin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the y coordinate of the normal vector.
-
iny
public int iny()
Description copied from interface:OrientedPoint3DReplies the Y coordinate of the normal vector. If this point is not part of a polyline, the normal vector is null.- Specified by:
inyin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the y coordinate of the normal vector.
-
setNormalY
public void setNormalY(int norY)
Description copied from interface:OrientedPoint3DSets a new value in the Y normal of the point.- Specified by:
setNormalYin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
norY- the new value double y.
-
setNormalY
public void setNormalY(double norY)
Description copied from interface:OrientedPoint3DSets a new value in the Y normal of the point.- Specified by:
setNormalYin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
norY- the new value double y.
-
getNormalZ
public double getNormalZ()
Description copied from interface:OrientedPoint3DReplies the Z coordinate of the normal vector. If this point is not part of a polyline, the normal vector is null.- Specified by:
getNormalZin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the z coordinate of the normal vector.
-
inz
public int inz()
Description copied from interface:OrientedPoint3DReplies the Z coordinate of the normal vector. If this point is not part of a polyline, the normal vector is null.- Specified by:
inzin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the z coordinate of the normal vector.
-
setNormalZ
public void setNormalZ(int norZ)
Description copied from interface:OrientedPoint3DSets a new value in the Z normal of the point.- Specified by:
setNormalZin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
norZ- the new value double z.
-
setNormalZ
public void setNormalZ(double norZ)
Description copied from interface:OrientedPoint3DSets a new value in the Z normal of the point.- Specified by:
setNormalZin interfaceOrientedPoint3D<Point3d,Vector3d>- Parameters:
norZ- the new value double z.
-
getTangent
public Vector3d getTangent()
Description copied from interface:OrientedPoint3DReplies the tangent vector .- Specified by:
getTangentin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the tangent vector to this point.
-
getNormal
public Vector3d getNormal()
Description copied from interface:OrientedPoint3DReplies the normal vector.- Specified by:
getNormalin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the normal vector to the point.
-
getSway
public Vector3d getSway()
Description copied from interface:OrientedPoint3DReplies the sway vector.- Specified by:
getSwayin interfaceOrientedPoint3D<Point3d,Vector3d>- Returns:
- the sway vector to this point.
-
-