Package org.anchoranalysis.spatial.point
Class Vector3d
- All Implemented Interfaces:
Serializable
A three-dimensional vector of double values.
We consider a vector to be a tuple with additional magnitude and direction, to give a physical interpretation.
- Author:
- Owen Feehan
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
crossProduct
(Vector3d other) Computes the cross-product of the tuple with another.boolean
int
hashCode()
Methods inherited from class org.anchoranalysis.spatial.point.Tuple3d
absolute, add, add, add, divideBy, divideBy, dotProduct, increment, incrementX, incrementY, incrementZ, length, normalize, scale, scaleXY, setValueByDimension, setX, setX, setY, setY, setZ, setZ, subtract, toString, valueByDimension, valueByDimension, x, y, z
-
Constructor Details
-
Vector3d
Creates with the same values as an existingTuple3d
.- Parameters:
tuple
- to copy values from.
-
Vector3d
public Vector3d(double x, double y, double z) Create with values for each dimension.- Parameters:
x
- the value for the X-dimension.y
- the value for the Y-dimension.z
- the value for the Z-dimension.
-
Vector3d
public Vector3d()
-
-
Method Details
-
crossProduct
Computes the cross-product of the tuple with another.- Parameters:
other
- the other tuple to use in the dot product operation.- Returns:
- the computed cross-product.
-
equals
-
canEqual
-
hashCode
public int hashCode()
-