Package georegression.struct.point
Class Vector3D_F32
- All Implemented Interfaces:
Serializable
@Generated("georegression.struct.point.Vector3D_F64")
public class Vector3D_F32
extends GeoTuple3D_F32<Vector3D_F32>
Spacial vector in 3D. A vector defines a direction.
- See Also:
-
Field Summary
Fields inherited from class georegression.struct.GeoTuple3D_F32
x, y, z
-
Constructor Summary
ConstructorDescriptionVector3D_F32
(float x, float y, float z) Vector3D_F32
(GeoTuple3D_F32 orig) Defines the vector using two points. -
Method Summary
Modifier and TypeMethodDescriptionfloat
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
(float value) In-place divide operation.float
dot
(float x, float y, float z) float
dot
(Vector3D_F32 a) Dot product between this and 'a' = this.x * a.x + this.y * a.y + this.z * a.zvoid
minus
(Point3D_F32 a, Point3D_F32 b) In-place minus operation.void
setTo
(Vector3D_F32 src) Sets this equal to 'src'toString()
Methods inherited from class georegression.struct.GeoTuple3D_F32
_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_F32
copy, isInfinite
-
Constructor Details
-
Vector3D_F32
-
Vector3D_F32
public Vector3D_F32(float x, float y, float z) -
Vector3D_F32
public Vector3D_F32() -
Vector3D_F32
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_F32<Vector3D_F32>
- 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(float 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_F32>
- 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 float dot(float x, float y, float 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'.
-