Package georegression.struct.point
Class Vector3D_F64
- All Implemented Interfaces:
Serializable
Spacial vector in 3D. A vector defines a direction.
- See Also:
-
Field Summary
Fields inherited from class georegression.struct.GeoTuple3D_F64
x, y, z
-
Constructor Summary
ConstructorDescriptionVector3D_F64
(double x, double y, double z) Vector3D_F64
(GeoTuple3D_F64 orig) Defines the vector using two points. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the acute angle between the two vectors.Creates a new tuple instance of the same type.void
Assigns this vector to the results of crossing the two passed in vectors.Crosses this matrix with 'b' and returns the resultvoid
divide
(double value) In-place divide operation.double
dot
(double x, double y, double z) double
dot
(Vector3D_F64 a) Dot product between this and 'a' = this.x * a.x + this.y * a.y + this.z * a.zvoid
minus
(Point3D_F64 a, Point3D_F64 b) In-place minus operation.void
setTo
(Vector3D_F64 src) Sets this equal to 'src'toString()
Methods inherited from class georegression.struct.GeoTuple3D_F64
_setTo, distance, distance, distance2, distance2, divideIP, equals, getDimension, getIdx, hashCode, isIdentical, isIdentical, isIdentical, isNaN, norm, normSq, plus, plus, plusIP, plusIP, print, scale, setIdx, setTo, setTo, times, timesIP, toString, zero
Methods inherited from class georegression.struct.GeoTuple_F64
copy, isInfinite
-
Constructor Details
-
Vector3D_F64
-
Vector3D_F64
public Vector3D_F64(double x, double y, double z) -
Vector3D_F64
public Vector3D_F64() -
Vector3D_F64
Defines the vector using two points. v = b - a;- Parameters:
a
- (Input) Pointb
- (Input) Point
-
-
Method Details
-
setTo
Description copied from class:GeoTuple
Sets this equal to 'src'- Overrides:
setTo
in classGeoTuple3D_F64<Vector3D_F64>
- Parameters:
src
- The tuple being copied- Returns:
- Reference to 'this' class instance. Used to chain operations.
-
minus
In-place minus operation. this = a - b.- Parameters:
a
- Pointb
- Point
-
divide
public void divide(double value) In-place divide operation. x /= value;- Parameters:
value
- The value each component is divided by
-
crossSetTo
Assigns this vector to the results of crossing the two passed in vectors.- Parameters:
a
- Vectorb
- Vector
-
crossWith
Crosses this matrix with 'b' and returns the result -
createNewInstance
Description copied from class:GeoTuple
Creates a new tuple instance of the same type.
- Specified by:
createNewInstance
in classGeoTuple<Vector3D_F64>
- Returns:
- new tuple instance.
-
toString
-
normalize
public void normalize() -
dot
Dot product between this and 'a' = this.x * a.x + this.y * a.y + this.z * a.z- Parameters:
a
- A vector- Returns:
- dot product.
-
dot
public double dot(double x, double y, double z) -
acute
Returns the acute angle between the two vectors. Computed using the dot product.- Parameters:
a
- Vector- Returns:
- Acute angle in radians between 'this' and 'a'.
-