Package org.arakhne.afc.math.geometry.d3
Class ImmutableVector3D
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.ImmutableVector3D
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Tuple3D<ImmutableVector3D>
,UnmodifiableTuple3D<ImmutableVector3D>
,UnmodifiableVector3D<ImmutableVector3D,ImmutablePoint3D>
,Vector3D<ImmutableVector3D,ImmutablePoint3D>
,JsonableObject
public final class ImmutableVector3D extends Object implements UnmodifiableVector3D<ImmutableVector3D,ImmutablePoint3D>
Immutable vector 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d3.Vector3D
Vector3D.PowerResult<T extends Vector3D<? super T,?>>
-
-
Constructor Summary
Constructors Constructor Description ImmutableVector3D(double x, double y, double z)
Constructor.ImmutableVector3D(int x, int y, int z)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableVector3D
clone()
Clone this point.boolean
equals(Object object)
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()
ImmutableVector3D
toUnitVector()
Replies the unit vector of this vector.UnmodifiableVector3D<ImmutableVector3D,ImmutablePoint3D>
toUnmodifiable()
Replies an unmodifiable copy of this vector.-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
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.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
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.UnmodifiableVector3D
add, add, cross, crossLeftHand, crossRightHand, normalize, normalize, operator_add, operator_remove, scaleAdd, scaleAdd, scaleAdd, scaleAdd, setLength, sub, sub, sub, turnVector
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Vector3D
angle, cross, crossLeftHand, crossRightHand, dot, getLength, getLengthSquared, isColinear, isUnitVector, operator_divide, operator_doubleDotLessThan, operator_elvis, operator_equals, operator_greaterThanDoubleDot, operator_minus, operator_minus, operator_multiply, operator_multiply, operator_notEquals, operator_plus, operator_plus, operator_power, operator_power, operator_upTo, perp, power, signedAngle, toColinearVector
-
-
-
-
Constructor Detail
-
ImmutableVector3D
public ImmutableVector3D(double x, double y, double z)
Constructor.- Parameters:
x
- x coordinate.y
- y coordinate.z
- z coordinate.
-
ImmutableVector3D
public ImmutableVector3D(int x, int y, int z)
Constructor.- Parameters:
x
- x coordinate.y
- y coordinate.z
- z coordinate.
-
-
Method Detail
-
equals
@Pure public boolean equals(Object object)
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<ImmutableVector3D>
- Overrides:
equals
in classObject
- Parameters:
object
- the object with which the comparison is made- Returns:
- true or false
-
getGeomFactory
public GeomFactory3D<ImmutableVector3D,ImmutablePoint3D> getGeomFactory()
Description copied from interface:Vector3D
Replies the geometry factory associated to this point.- Specified by:
getGeomFactory
in interfaceVector3D<ImmutableVector3D,ImmutablePoint3D>
- Returns:
- the factory.
-
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<ImmutableVector3D>
- 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
public ImmutableVector3D clone()
Description copied from interface:Tuple3D
Clone this point.- Specified by:
clone
in interfaceTuple3D<ImmutableVector3D>
- 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<ImmutableVector3D>
- Returns:
- the x coordinate.
-
ix
public int ix()
Description copied from interface:Tuple3D
Get the x coordinate.- Specified by:
ix
in interfaceTuple3D<ImmutableVector3D>
- Returns:
- the x coordinate.
-
getY
public double getY()
Description copied from interface:Tuple3D
Get the y coordinate.- Specified by:
getY
in interfaceTuple3D<ImmutableVector3D>
- Returns:
- the y coordinate.
-
iy
public int iy()
Description copied from interface:Tuple3D
Get the y coordinate.- Specified by:
iy
in interfaceTuple3D<ImmutableVector3D>
- Returns:
- the y coordinate.
-
getZ
public double getZ()
Description copied from interface:Tuple3D
Get the z coordinate.- Specified by:
getZ
in interfaceTuple3D<ImmutableVector3D>
- Returns:
- the z coordinate.
-
iz
public int iz()
Description copied from interface:Tuple3D
Get the z coordinate.- Specified by:
iz
in interfaceTuple3D<ImmutableVector3D>
- Returns:
- the z coordinate.
-
toUnitVector
public ImmutableVector3D toUnitVector()
Description copied from interface:Vector3D
Replies the unit vector of this vector.- Specified by:
toUnitVector
in interfaceVector3D<ImmutableVector3D,ImmutablePoint3D>
- Returns:
- the unit vector of this vector.
-
toUnmodifiable
public UnmodifiableVector3D<ImmutableVector3D,ImmutablePoint3D> toUnmodifiable()
Description copied from interface:Vector3D
Replies an unmodifiable copy of this vector.- Specified by:
toUnmodifiable
in interfaceUnmodifiableVector3D<ImmutableVector3D,ImmutablePoint3D>
- Specified by:
toUnmodifiable
in interfaceVector3D<ImmutableVector3D,ImmutablePoint3D>
- Returns:
- an unmodifiable copy.
-
-