Package org.arakhne.afc.math.geometry.d3
Class ImmutablePoint3D
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.ImmutablePoint3D
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Point3D<ImmutablePoint3D,ImmutableVector3D>
,Tuple3D<ImmutablePoint3D>
,UnmodifiablePoint3D<ImmutablePoint3D,ImmutableVector3D>
,UnmodifiableTuple3D<ImmutablePoint3D>
,JsonableObject
public final class ImmutablePoint3D extends Object implements UnmodifiablePoint3D<ImmutablePoint3D,ImmutableVector3D>
Immutable point 3D.- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Thomas PIOTROWSKI, Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Constructor Summary
Constructors Constructor Description ImmutablePoint3D(double x, double y, double z)
Constructor.ImmutablePoint3D(int x, int y, int z)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutablePoint3D
clone()
Clone this point.boolean
equals(Object obj)
Returns true if the Object t1 is of type Tuple2f and all of the data members of t1 are equal to the corresponding data members in this Tuple2f.GeomFactory3D<ImmutableVector3D,ImmutablePoint3D>
getGeomFactory()
Replies the geometry factory associated to this point.double
getX()
Get the x coordinate.double
getY()
Get the y coordinate.double
getZ()
Get the z coordinate.int
hashCode()
Returns a hash code value based on the data values in this object.int
ix()
Get the x coordinate.int
iy()
Get the y coordinate.int
iz()
Get the z coordinate.void
toJson(JsonBuffer buffer)
Replies the Json representation of this node.String
toString()
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Point3D
getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getIdistanceL1, getIdistanceLinf, operator_and, operator_elvis, operator_equals, operator_minus, operator_minus, operator_notEquals, operator_plus, operator_upTo, operator_upTo
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Tuple3D
epsilonEquals, equals, get, get, get
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.UnmodifiablePoint3D
add, add, add, operator_add, operator_remove, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleAdd, sub, sub, toUnmodifiable
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.UnmodifiableTuple3D
absolute, absolute, add, add, addX, addX, addY, addY, addZ, addZ, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, interpolate, interpolate, 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
-
ImmutablePoint3D
public ImmutablePoint3D(int x, int y, int z)
Constructor.- Parameters:
x
- x coordinate.y
- y coordinate.z
- z coordinate.
-
ImmutablePoint3D
public ImmutablePoint3D(double x, double y, double z)
Constructor.- Parameters:
x
- x coordinate.y
- y coordinate.z
- z coordinate.
-
-
Method Detail
-
equals
@Pure public boolean equals(Object obj)
Description copied from interface:Tuple3D
Returns true if the Object t1 is of type Tuple2f and all of the data members of t1 are equal to the corresponding data members in this Tuple2f.- Specified by:
equals
in interfaceTuple3D<ImmutablePoint3D>
- Overrides:
equals
in classObject
- Parameters:
obj
- the object with which the comparison is made- Returns:
- true or false
-
hashCode
@Pure public int hashCode()
Description copied from interface:Tuple3D
Returns 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.- Specified by:
hashCode
in interfaceTuple3D<ImmutablePoint3D>
- Overrides:
hashCode
in classObject
- Returns:
- the integer hash code value
-
toJson
public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObject
Replies the Json representation of this node.- Specified by:
toJson
in interfaceJsonableObject
- Parameters:
buffer
- the Json buffer.
-
clone
@Pure public ImmutablePoint3D clone()
Description copied from interface:Tuple3D
Clone this point.- Specified by:
clone
in interfaceTuple3D<ImmutablePoint3D>
- Overrides:
clone
in classObject
- Returns:
- the clone.
-
getX
public double getX()
Description copied from interface:Tuple3D
Get the x coordinate.- Specified by:
getX
in interfaceTuple3D<ImmutablePoint3D>
- Returns:
- the x coordinate.
-
ix
public int ix()
Description copied from interface:Tuple3D
Get the x coordinate.- Specified by:
ix
in interfaceTuple3D<ImmutablePoint3D>
- Returns:
- the x coordinate.
-
getY
public double getY()
Description copied from interface:Tuple3D
Get the y coordinate.- Specified by:
getY
in interfaceTuple3D<ImmutablePoint3D>
- Returns:
- the y coordinate.
-
iy
public int iy()
Description copied from interface:Tuple3D
Get the y coordinate.- Specified by:
iy
in interfaceTuple3D<ImmutablePoint3D>
- Returns:
- the y coordinate.
-
getZ
public double getZ()
Description copied from interface:Tuple3D
Get the z coordinate.- Specified by:
getZ
in interfaceTuple3D<ImmutablePoint3D>
- Returns:
- the z coordinate.
-
iz
public int iz()
Description copied from interface:Tuple3D
Get the z coordinate.- Specified by:
iz
in interfaceTuple3D<ImmutablePoint3D>
- Returns:
- the z coordinate.
-
getGeomFactory
public GeomFactory3D<ImmutableVector3D,ImmutablePoint3D> getGeomFactory()
Description copied from interface:Point3D
Replies the geometry factory associated to this point.- Specified by:
getGeomFactory
in interfacePoint3D<ImmutablePoint3D,ImmutableVector3D>
- Returns:
- the factory.
-
-