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 ImmutableVector3Dclone()Clone this point.booleanequals(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.doublegetX()Get the x coordinate.doublegetY()Get the y coordinate.doublegetZ()Get the z coordinate.inthashCode()Returns a hash code value based on the data values in this object.intix()Get the x coordinate.intiy()Get the y coordinate.intiz()Get the z coordinate.voidtoJson(JsonBuffer buffer)Replies the Json representation of this node.StringtoString()ImmutableVector3DtoUnitVector()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:Tuple3DReturns 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:
equalsin interfaceTuple3D<ImmutableVector3D>- Overrides:
equalsin 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:Vector3DReplies the geometry factory associated to this point.- Specified by:
getGeomFactoryin interfaceVector3D<ImmutableVector3D,ImmutablePoint3D>- Returns:
- the factory.
-
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.- Specified by:
hashCodein interfaceTuple3D<ImmutableVector3D>- Overrides:
hashCodein classObject- Returns:
- the integer hash code value
-
toJson
public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObjectReplies the Json representation of this node.- Specified by:
toJsonin interfaceJsonableObject- Parameters:
buffer- the Json buffer.
-
clone
public ImmutableVector3D clone()
Description copied from interface:Tuple3DClone this point.- Specified by:
clonein interfaceTuple3D<ImmutableVector3D>- Overrides:
clonein classObject- Returns:
- the clone.
-
getX
public double getX()
Description copied from interface:Tuple3DGet the x coordinate.- Specified by:
getXin interfaceTuple3D<ImmutableVector3D>- Returns:
- the x coordinate.
-
ix
public int ix()
Description copied from interface:Tuple3DGet the x coordinate.- Specified by:
ixin interfaceTuple3D<ImmutableVector3D>- Returns:
- the x coordinate.
-
getY
public double getY()
Description copied from interface:Tuple3DGet the y coordinate.- Specified by:
getYin interfaceTuple3D<ImmutableVector3D>- Returns:
- the y coordinate.
-
iy
public int iy()
Description copied from interface:Tuple3DGet the y coordinate.- Specified by:
iyin interfaceTuple3D<ImmutableVector3D>- Returns:
- the y coordinate.
-
getZ
public double getZ()
Description copied from interface:Tuple3DGet the z coordinate.- Specified by:
getZin interfaceTuple3D<ImmutableVector3D>- Returns:
- the z coordinate.
-
iz
public int iz()
Description copied from interface:Tuple3DGet the z coordinate.- Specified by:
izin interfaceTuple3D<ImmutableVector3D>- Returns:
- the z coordinate.
-
toUnitVector
public ImmutableVector3D toUnitVector()
Description copied from interface:Vector3DReplies the unit vector of this vector.- Specified by:
toUnitVectorin interfaceVector3D<ImmutableVector3D,ImmutablePoint3D>- Returns:
- the unit vector of this vector.
-
toUnmodifiable
public UnmodifiableVector3D<ImmutableVector3D,ImmutablePoint3D> toUnmodifiable()
Description copied from interface:Vector3DReplies an unmodifiable copy of this vector.- Specified by:
toUnmodifiablein interfaceUnmodifiableVector3D<ImmutableVector3D,ImmutablePoint3D>- Specified by:
toUnmodifiablein interfaceVector3D<ImmutableVector3D,ImmutablePoint3D>- Returns:
- an unmodifiable copy.
-
-